Fix(AI):[#4049]语音播放AI回复内容,点击[重新生成],语音仍在播放
This commit is contained in:
@@ -152,6 +152,7 @@ export const chatMixins = {
|
||||
},
|
||||
// 重新生成
|
||||
regenerateHandle(item) {
|
||||
this.audioStopHandle()
|
||||
deleteChatItemByConversationId(item.conversationId).then(res => {
|
||||
const { success } = res
|
||||
if (success) {
|
||||
@@ -411,6 +412,14 @@ export const chatMixins = {
|
||||
console.log('send failed (' + err.code + ')')
|
||||
}
|
||||
},
|
||||
audioStopHandle() {
|
||||
// Fix bug#4049
|
||||
this.audioAyy = []
|
||||
if (this.audioContext) {
|
||||
this.audioContext.stop()
|
||||
}
|
||||
this.isPlayAudio = false
|
||||
},
|
||||
ttsHandle(item) {
|
||||
this.audioAyy = []
|
||||
if (this.audioContext) {
|
||||
|
||||
Reference in New Issue
Block a user