Skip to content

Commit 390faf2

Browse files
committed
fix: prevent overlapping speech synthesis playback
--bug=1058747 --user=刘瑞斌 【应用】应用开启语音播放自动播放,使用移动端提问后没有自动播放 https://www.tapd.cn/62980211/s/1731646
1 parent 1b94f16 commit 390faf2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,9 @@ class AudioManage {
474474
}
475475
// 等待取消完成后重新播放
476476
setTimeout(() => {
477+
if (speechSynthesis.speaking) {
478+
return
479+
}
477480
speechSynthesis.speak(audioElement)
478481
this.statusList[index] = AudioStatus.PLAY_INT
479482
}, 500)

0 commit comments

Comments
 (0)