Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
DG_FAF
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
template admin
DG_FAF
Commits
b93a3dba
Commit
b93a3dba
authored
Mar 24, 2023
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试语音评测
parent
1015ae99
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
RecordModal_DG_FAF.ts
assets/DG_FAF/prefabs/RecordModal/RecordModal_DG_FAF.ts
+7
-8
No files found.
assets/DG_FAF/prefabs/RecordModal/RecordModal_DG_FAF.ts
View file @
b93a3dba
...
...
@@ -247,12 +247,7 @@ export default class NewClass extends cc.Component {
this
.
playRecordButton
.
active
=
false
;
this
.
updatePlayAndReplayButtons
(
"
play
"
,
"
init
"
);
this
.
isRecording
=
true
;
this
.
handlerSpeach
=
speechToTextRequest
((
e
)
=>
{
this
.
setEditboxString
(
e
.
text
);
this
.
recordUrl
=
e
.
audioUrl
;
this
.
preLoadAudio
(
this
.
recordUrl
);
this
.
handlerSpeach
=
null
;
})
this
.
handlerSpeach
=
speechToTextRequest
();
const
recProgress
=
cc
.
find
(
"
progress
"
,
this
.
recordButton
);
//录音中进度条
if
(
this
.
intervalIDTranslate
)
{
...
...
@@ -275,7 +270,12 @@ export default class NewClass extends cc.Component {
stopRealTimeTranslate
()
{
this
.
isRecording
=
false
;
if
(
this
.
handlerSpeach
)
{
this
.
handlerSpeach
():
this
.
handlerSpeach
(()
=>
{
this
.
setEditboxString
(
e
.
text
);
this
.
recordUrl
=
e
.
audioUrl
;
this
.
preLoadAudio
(
this
.
recordUrl
);
this
.
handlerSpeach
=
null
;
});
}
// 结束录音 显示提交按钮
this
.
submitBtn
.
active
=
true
;
...
...
@@ -296,7 +296,6 @@ export default class NewClass extends cc.Component {
}
}
intervalIDPlayRecord
=
null
;
currentPlayAudioId
=
null
;
// 听回放
...
...
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