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