Commit 961f5134 authored by Tt's avatar Tt

修改

parent 916bfab6
...@@ -274,14 +274,24 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -274,14 +274,24 @@ export default class SceneComponent extends MyCocosSceneComponent {
courseware && courseware.stopTestConvert((res) => { courseware && courseware.stopTestConvert((res) => {
this.log("---------------stopTestConvert:" + res) this.log("---------------stopTestConvert:" + res)
res = JSON.parse(res); res = JSON.parse(res);
this.recrodEnd(res); this.tempRes = res
this.recordCheck();
}, covert => { }, covert => {
this.log("---------------convertUrl:" + covert.convertUrl) this.log("---------------convertUrl:" + covert)
covert = JSON.parse(covert);
this.recordAudio = covert.convertUrl; this.recordAudio = covert.convertUrl;
this.recordCheck();
// 变声返回结果,结构为 {convertUrl: ‘http://jliasldfjsdfi.mp3'} // 变声返回结果,结构为 {convertUrl: ‘http://jliasldfjsdfi.mp3'}
});//结束录音 });//结束录音
} }
async recrodEnd(data) { private tempRes: any;
recordCheck() {
this.log("---------------recordCheck:" + this.recordAudio + "|" + this.tempRes)
if (this.recordAudio && this.tempRes) {
this.recrodEnd(this.tempRes);
}
}
async recrodEnd(data?: any) {
this.hideVoiceFlash(); this.hideVoiceFlash();
let score = data.result.overall; let score = data.result.overall;
pg.event.emit('layer_record_score', score); pg.event.emit('layer_record_score', score);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment