|
@@ -476,11 +476,12 @@ export default {
|
|
|
this.sendFnType = newValue;
|
|
|
},
|
|
|
talk() {
|
|
|
- this.isTalk = true;
|
|
|
+ let iiframe = this.$refs["iiframe"];
|
|
|
iiframe.contentWindow.window.document.getElementById(
|
|
|
"languageOptions"
|
|
|
).selectedIndex = 2; //普通话
|
|
|
iiframe.contentWindow.testdoContinuousPronunciationAssessment();
|
|
|
+ this.isTalk = true;
|
|
|
iiframe.contentWindow.onRecognizedResult = e => {
|
|
|
let _msg = e.privText;
|
|
|
if (!_msg) this.text += _msg;
|
|
@@ -1282,16 +1283,6 @@ Instruction: Based on the context, follow "Format example", write content.
|
|
|
},
|
|
|
aiTalk(type = 0) {
|
|
|
//0 新的 1继续
|
|
|
- if (!this.openMegaphone) {
|
|
|
- try {
|
|
|
- _talkTextIiframe2.contentWindow.closesynthesizer();
|
|
|
- _talkTextIiframe2.contentWindow.pausesynthesizer();
|
|
|
- this.aiIsTalk = false;
|
|
|
- } catch (error) {
|
|
|
- this.aiIsTalk = false;
|
|
|
- }
|
|
|
- return;
|
|
|
- }
|
|
|
if (type == 0 && this.aiIsTalk) {
|
|
|
let _talkTextIiframe2 = this.$refs.iiframe2;
|
|
|
try {
|
|
@@ -1322,7 +1313,12 @@ Instruction: Based on the context, follow "Format example", write content.
|
|
|
);
|
|
|
} else {
|
|
|
this.aiIsTalk = false;
|
|
|
- _talkTextIiframe2.contentWindow.closesynthesizer();
|
|
|
+ try {
|
|
|
+ _talkTextIiframe2.contentWindow.closesynthesizer();
|
|
|
+ } catch (error) {
|
|
|
+ return
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|