Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hy17_hds
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
hy17_hds
Commits
b88eacad
Commit
b88eacad
authored
Jul 12, 2023
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
变声
parent
c2c5a222
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
hy17_hds.ts
assets/hy17_hds/scene/hy17_hds.ts
+14
-4
No files found.
assets/hy17_hds/scene/hy17_hds.ts
View file @
b88eacad
...
...
@@ -220,7 +220,15 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
microphoneAreaRecover
();
cc
.
audioEngine
.
stopAllEffects
();
courseware
&&
courseware
.
startTest
(
this
.
letter
);
//开始录音
courseware
&&
courseware
.
startTestConvert
(
this
.
letter
);
//开始录音
// (<any>window).courseware.startTestConvert('My name is Lucy');
// (<any>window).courseware.stopTestConvert(res => {
// // 录音评测返回结果, 与stopTest方法返回结果一致
// }, covert => {
// // 变声返回结果,结构为 {convertUrl: ‘http://jliasldfjsdfi.mp3'}
// });
}
async
onTouchRecordEnd
()
{
if
(
!
this
.
recording
)
return
;
...
...
@@ -251,14 +259,16 @@ export default class SceneComponent extends MyCocosSceneComponent {
if
(
!
courseware
)
{
return
this
.
recrodEnd
(
testData
)
}
courseware
&&
courseware
.
stopTest
((
res
)
=>
{
courseware
&&
courseware
.
stopTest
Convert
((
res
)
=>
{
res
=
JSON
.
parse
(
res
);
this
.
recrodEnd
(
res
);
});
//结束录音
},
covert
=>
{
this
.
recordAudio
=
covert
.
convertUrl
;
// 变声返回结果,结构为 {convertUrl: ‘http://jliasldfjsdfi.mp3'}
});
//结束录音
}
async
recrodEnd
(
data
)
{
this
.
hideVoiceFlash
();
this
.
recordAudio
=
data
.
audioUrl
;
let
score
=
data
.
result
.
overall
;
pg
.
event
.
emit
(
'
layer_record_score
'
,
score
);
this
.
recording
=
false
;
...
...
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