|
@@ -339,38 +339,67 @@ export default {
|
|
|
if (this.cjson.type == 'theme' || this.cjson.type == 'QA') {
|
|
|
this.isloading = true
|
|
|
let _this = this
|
|
|
+ let _result = ``;
|
|
|
iiframe.contentWindow.onRecognizedResult = function (e) {
|
|
|
console.log('onRecognizedResult', e);
|
|
|
let privText = e.privText
|
|
|
- _this.beforeUpload1(audioFile, 3, privText);
|
|
|
+ _result+=privText;
|
|
|
+
|
|
|
+ // _this.beforeUpload1(audioFile, 3, privText);
|
|
|
}
|
|
|
|
|
|
+ iiframe.contentWindow.onSessionStopped = function(e){
|
|
|
+ console.log("转译完成")
|
|
|
+ console.log(e);
|
|
|
+ _this.beforeUpload1(audioFile, 3, _result);
|
|
|
+ }
|
|
|
+
|
|
|
iiframe.contentWindow.doContinuousPronunciationAssessment('', { files: [audioFile] })
|
|
|
} else if (this.cjson.type == 'createRole') {
|
|
|
// this.isloading = true
|
|
|
// this.beforeUpload1(audioFile, 3);
|
|
|
this.isloading = true
|
|
|
let _this = this
|
|
|
+ let _result = ``;
|
|
|
iiframe.contentWindow.onRecognizedResult = function (e) {
|
|
|
console.log('onRecognizedResult', e);
|
|
|
let privText = e.privText
|
|
|
- _this.beforeUpload1(audioFile, 3, privText);
|
|
|
+ _result+=privText;
|
|
|
+ // _this.beforeUpload1(audioFile, 3, privText);
|
|
|
}
|
|
|
|
|
|
+ iiframe.contentWindow.onSessionStopped = function(e){
|
|
|
+ console.log("转译完成")
|
|
|
+ console.log(e);
|
|
|
+ _this.beforeUpload1(audioFile, 3, _result);
|
|
|
+ }
|
|
|
+
|
|
|
iiframe.contentWindow.doContinuousPronunciationAssessment('', { files: [audioFile] })
|
|
|
} else {
|
|
|
this.isloading = true
|
|
|
let _this = this
|
|
|
+ let _result = ``;
|
|
|
+ let _star = ``;
|
|
|
iiframe.contentWindow.onRecognizedResult = function (e) {
|
|
|
console.log('onRecognizedResult', e);
|
|
|
let privText = e.privText
|
|
|
- let star = JSON.parse(e.privJson).NBest[0].PronunciationAssessment
|
|
|
- console.log('star', star)
|
|
|
+ _result +=privText;
|
|
|
+ _star = JSON.parse(e.privJson).NBest[0].PronunciationAssessment
|
|
|
+ console.log(_star)
|
|
|
+ // console.log('star', star)
|
|
|
// e.privText
|
|
|
// JSON.parse(e.privJson).NBest[0].PronunciationAssessment
|
|
|
|
|
|
- _this.beforeUpload1(audioFile, 3, privText, star);
|
|
|
+ // _this.beforeUpload1(audioFile, 3, privText, star);
|
|
|
}
|
|
|
+
|
|
|
+ iiframe.contentWindow.onSessionStopped = function(e){
|
|
|
+ console.log("转译完成")
|
|
|
+ console.log(e);
|
|
|
+ _this.beforeUpload1(audioFile, 3, _result, _star);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
iiframe.contentWindow.doContinuousPronunciationAssessment(this.cjson.content, { files: [audioFile] })
|
|
|
}
|
|
|
|