|
@@ -71,7 +71,7 @@
|
|
|
src="../../../assets/icon/course/copyTxt.png"
|
|
|
alt=""
|
|
|
/>
|
|
|
- <img @click.stop="aiTalkAll(item)" v-if="aiTalkUid==item.uid" style="width: 15px;margin:7px 0 7px 7px;" :src="require('../../../assets/icon/course/megaphone.svg')">
|
|
|
+ <img @click.stop="aiTalkAll(item)" v-if="aiTalkUid==item.uid && aiIsTalk" style="width: 15px;margin:7px 0 7px 7px;" :src="require('../../../assets/icon/course/megaphone.svg')">
|
|
|
<img @click.stop="aiTalkAll(item)" v-else style="width: 15px;margin:7px 0 7px 7px;" :src="require('../../../assets/icon/course/megaphone3.svg')">
|
|
|
<img v-if="chatList.length-2 == index" @click.stop="refresh(item)" style="width: 15px;margin:7px 0 7px 7px;" :src="require('../../../assets/icon/course/refresh.svg')">
|
|
|
</div>
|
|
@@ -370,6 +370,14 @@
|
|
|
src="https://beta.cloud.cocorobo.cn/browser/public/index.html"
|
|
|
ref="iiframe"
|
|
|
v-show="false"
|
|
|
+ ></iframe>
|
|
|
+
|
|
|
+ <!-- 文字转语音-->
|
|
|
+ <iframe
|
|
|
+ allow="camera *; microphone *;display-capture;midi;encrypted-media;"
|
|
|
+ src="https://beta.cloud.cocorobo.cn/browser/public/index1.html"
|
|
|
+ ref="iiframe2"
|
|
|
+ v-show="false"
|
|
|
></iframe>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -1175,24 +1183,24 @@ export default {
|
|
|
// }
|
|
|
},
|
|
|
aiTalkAll(item) {
|
|
|
- if(this.aiTalkUid!=item.uid){
|
|
|
- let _resultText = this.removeMarkdown(item.aiContent);
|
|
|
- this.aiTalkUid = item.uid;
|
|
|
- this.aiTalkList = [];
|
|
|
- this.aiTalkList.push(_resultText);
|
|
|
- this.aiTalk(0)
|
|
|
- }else{
|
|
|
- try {
|
|
|
- this.aiTalkList = [];
|
|
|
- let _talkTextIiframe2 = this.$refs.iiframe2;
|
|
|
- _talkTextIiframe2.contentWindow.pausesynthesizer();
|
|
|
+ if (this.aiTalkUid == item.uid && this.aiIsTalk) {
|
|
|
+ try {
|
|
|
+ this.aiTalkList = [];
|
|
|
+ let _talkTextIiframe2 = this.$refs.iiframe2;
|
|
|
+ _talkTextIiframe2.contentWindow.pausesynthesizer();
|
|
|
_talkTextIiframe2.contentWindow.closesynthesizer();
|
|
|
- this.aiIsTalk = false;
|
|
|
- } catch (error) {
|
|
|
- this.aiTalkList = [];
|
|
|
- this.aiIsTalk = false;
|
|
|
- }
|
|
|
- }
|
|
|
+ this.aiIsTalk = false;
|
|
|
+ } catch (error) {
|
|
|
+ this.aiTalkList = [];
|
|
|
+ this.aiIsTalk = false;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ let _resultText = this.removeMarkdown(item.aiContent);
|
|
|
+ this.aiTalkUid = item.uid;
|
|
|
+ this.aiTalkList = [];
|
|
|
+ this.aiTalkList.push(_resultText);
|
|
|
+ this.aiTalk(0);
|
|
|
+ }
|
|
|
// console.log(_resultText);
|
|
|
}
|
|
|
},
|