Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
8d40c510
Commit
8d40c510
authored
Nov 30, 2021
by
helinlin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改阿里云音频识别demo
parent
f36e247b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
SpeechTranscriber.java
.../main/java/com/yeejoin/amos/speech/SpeechTranscriber.java
+1
-1
SpeechApplicationTests.java
...src/test/java/com/yejoin/amos/SpeechApplicationTests.java
+1
-1
No files found.
amos-boot-utils/amos-boot-utils-speech/src/main/java/com/yeejoin/amos/speech/SpeechTranscriber.java
View file @
8d40c510
...
@@ -26,7 +26,7 @@ public class SpeechTranscriber {
...
@@ -26,7 +26,7 @@ public class SpeechTranscriber {
private
final
SpeechTranscriberListener
listener
;
private
final
SpeechTranscriberListener
listener
;
public
SpeechTranscriber
(
File
speechFile
,
SpeechTranscriberListener
listener
)
{
public
SpeechTranscriber
(
File
speechFile
,
SpeechTranscriberListener
listener
)
{
if
(
speechFile
==
null
||
!
speechFile
.
exists
()
||
!
speechFile
.
isFile
())
{
if
(
speechFile
!=
null
&&
speechFile
.
exists
()
&&
speechFile
.
isFile
())
{
this
.
speechFile
=
speechFile
;
this
.
speechFile
=
speechFile
;
this
.
listener
=
listener
;
this
.
listener
=
listener
;
}
else
{
}
else
{
...
...
amos-boot-utils/amos-boot-utils-speech/src/test/java/com/yejoin/amos/SpeechApplicationTests.java
View file @
8d40c510
...
@@ -26,7 +26,7 @@ public class SpeechApplicationTests {
...
@@ -26,7 +26,7 @@ public class SpeechApplicationTests {
//本案例使用本地文件模拟发送实时流数据。您在实际使用时,可以实时采集或接收语音流并发送到ASR服务端。
//本案例使用本地文件模拟发送实时流数据。您在实际使用时,可以实时采集或接收语音流并发送到ASR服务端。
String
fileLink
=
"https://gw.alipayobjects.com/os/bmw-prod/0574ee2e-f494-45a5-820f-63aee583045a.wav"
;
String
fileLink
=
"https://gw.alipayobjects.com/os/bmw-prod/0574ee2e-f494-45a5-820f-63aee583045a.wav"
;
//将上面fileLink文件下载到本地后,替换filepath为本地地址测试
//将上面fileLink文件下载到本地后,替换filepath为本地地址测试
String
filepath
=
"D:\\ffmpeg-4.4-full_build-shared\\bin\\
test1.wav
"
;
String
filepath
=
"D:\\ffmpeg-4.4-full_build-shared\\bin\\
out.pcm
"
;
SpeechTranscriber
transcriber
=
new
SpeechTranscriber
(
new
File
(
filepath
),
new
SpeechTranscriberListener
()
{
SpeechTranscriber
transcriber
=
new
SpeechTranscriber
(
new
File
(
filepath
),
new
SpeechTranscriberListener
()
{
/**
/**
* 语音识别过程中返回的结果。仅当setEnableIntermediateResult为true时,才会返回该消息。
* 语音识别过程中返回的结果。仅当setEnableIntermediateResult为true时,才会返回该消息。
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment