agentgui 1.0.189 → 1.0.190
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/static/js/voice.js +2 -5
package/package.json
CHANGED
package/static/js/voice.js
CHANGED
|
@@ -392,8 +392,7 @@
|
|
|
392
392
|
}
|
|
393
393
|
|
|
394
394
|
function tryStreaming() {
|
|
395
|
-
if (!streamingSupported
|
|
396
|
-
streamingSupported = true;
|
|
395
|
+
if (!streamingSupported) { tryNonStreaming(text); return; }
|
|
397
396
|
fetch(BASE + '/api/tts-stream', {
|
|
398
397
|
method: 'POST',
|
|
399
398
|
headers: { 'Content-Type': 'application/json' },
|
|
@@ -458,10 +457,8 @@
|
|
|
458
457
|
onTtsSuccess();
|
|
459
458
|
var blob = new Blob([buf], { type: 'audio/wav' });
|
|
460
459
|
audioChunkQueue.push(blob);
|
|
461
|
-
if (!isPlayingChunk) playNextChunk();
|
|
462
460
|
streamDone = true;
|
|
463
|
-
|
|
464
|
-
processQueue();
|
|
461
|
+
if (!isPlayingChunk) playNextChunk();
|
|
465
462
|
}).catch(function() {
|
|
466
463
|
onTtsFailed();
|
|
467
464
|
});
|