|
@@ -215,21 +215,23 @@ export default {
|
|
|
},
|
|
|
recordStart(_text) {
|
|
|
try {
|
|
|
- this.show = true;
|
|
|
- this.showIndex = 0;
|
|
|
+ let iiframe = this.$refs["iiframe"];
|
|
|
+ iiframe.contentWindow.window.document.getElementById(
|
|
|
+ "languageOptions"
|
|
|
+ ).selectedIndex = 2; //普通话
|
|
|
+ iiframe.contentWindow.testdoContinuousPronunciationAssessment();
|
|
|
+
|
|
|
// return
|
|
|
var OpenCC = require("opencc-js");
|
|
|
let converter = OpenCC.Converter({
|
|
|
from: "hk",
|
|
|
to: "cn"
|
|
|
});
|
|
|
- if (this.isOpen)
|
|
|
- return this.$message.info("已开启语音助手,无需重复开启");
|
|
|
- let iiframe = this.$refs["iiframe"];
|
|
|
- iiframe.contentWindow.window.document.getElementById(
|
|
|
- "languageOptions"
|
|
|
- ).selectedIndex = 2; //普通话
|
|
|
- iiframe.contentWindow.testdoContinuousPronunciationAssessment();
|
|
|
+ this.show = true;
|
|
|
+ this.showIndex = 0;
|
|
|
+ this.showTextIndex = 0;
|
|
|
+ this.chatLoading = false;
|
|
|
+ this.talkLoading = false;
|
|
|
this.isOpen = true;
|
|
|
this.show = true;
|
|
|
this.aiText = "我是可可同学,我是个小小百事通,你有什么想和我聊一聊?";
|
|
@@ -331,6 +333,7 @@ export default {
|
|
|
converter("发送成功")
|
|
|
) {
|
|
|
this.userText = "";
|
|
|
+ this.showIndex = 0;
|
|
|
} else {
|
|
|
// this.$message.warning(res.data.FunctionResponse.result);
|
|
|
console.log(res.data.FunctionResponse.result);
|
|
@@ -486,6 +489,7 @@ export default {
|
|
|
// let _talkIndex = 0;
|
|
|
// const md = new MarkdownIt();
|
|
|
this.source.onmessage = _e => {
|
|
|
+ this.showIndex = 0;
|
|
|
let _eData = JSON.parse(_e.data);
|
|
|
if (_eData.content.replace("'", "").replace("'", "") == "[DONE]") {
|
|
|
this.source.close();
|