Commit 6d58fd3f authored by 李维's avatar 李维

修复录音转写 异常

parent 46a224ac
......@@ -271,13 +271,13 @@ export default class NewClass extends cc.Component {
this.isRecording = false;
if(this.handlerSpeach) {
this.handlerSpeach((e)=>{
console.log("得到转换结果", e)
this.setEditboxString(e.text);
this.recordUrl = e.audioUrl;
this.preLoadAudio(this.recordUrl);
this.handlerSpeach = null;
},(e)=>{
console.log("得到转换结果", e)
console.log("Record result", e)
let obj = { text: "", audioUrl: "" }
try {
obj = JSON.parse(e)
} catch(err) {
console.log(err)
}
this.setEditboxString(e.text);
this.recordUrl = e.audioUrl;
this.preLoadAudio(this.recordUrl);
......
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