mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-22 07:03:53 +08:00
fix:修复测试页面音频重复播放问题
This commit is contained in:
@@ -879,6 +879,7 @@
|
||||
// 流已结束且没有更多数据
|
||||
log("音频播放完成", 'info');
|
||||
isAudioPlaying = false;
|
||||
this.endOfStream = false;
|
||||
streamingContext = null;
|
||||
} else {
|
||||
// 等待更多数据
|
||||
@@ -1563,6 +1564,10 @@
|
||||
const message = messageInput.value.trim();
|
||||
if (message === '' || !websocket || websocket.readyState !== WebSocket.OPEN) return;
|
||||
|
||||
audioBufferQueue = [];
|
||||
isAudioBuffering = false;
|
||||
isAudioPlaying = false;
|
||||
|
||||
try {
|
||||
// 直接发送listen消息,不需要重复发送hello
|
||||
const listenMessage = {
|
||||
|
||||
Reference in New Issue
Block a user