tts-voice-creator-clone-and.../static
mARTin-B78 34870fed27 Pipeline TTS with LLM streaming for lower latency
Replace serial LLM-wait-TTS with overlapped execution:
- LLM streams via background thread → asyncio.Queue (non-blocking event loop)
- _sentence_split() detects sentence boundaries in the token stream
- asyncio.create_task fires TTS for each sentence immediately — TTS for
  sentence 1 runs while LLM is still generating sentences 2, 3, …
- Audio chunks stream to frontend in order as each task completes
- Time-to-first-audio drops from (LLM total + TTS total) to
  roughly (LLM time-to-first-sentence + TTS latency for one sentence)

Frontend audio queue:
- enqueueAudio() / playNextAudio() chain multi-chunk responses seamlessly
- clearAudio() stops playback and cancels queue on new turn or mic click
- scheduleAutoMic() waits for queue to drain before restarting mic
- Error paths clear the queue to avoid stale audio playing after failure

Also fix missing contextlib import (silent bug when audio temp files
needed cleanup in the STT path).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-29 19:06:07 +02:00
..
js Pipeline TTS with LLM streaming for lower latency 2026-05-29 19:06:07 +02:00
sections v1.2.0: VAD, live preview, hands-free mic, restore last section 2026-05-29 18:47:00 +02:00
vendor Add skeleton loading, self-host assets, fix LLM empty response 2026-05-29 17:28:42 +02:00
app.js Security audit, modular refactor, and container-name field 2026-05-29 12:13:07 +02:00
index.html Add skeleton loading, self-host assets, fix LLM empty response 2026-05-29 17:28:42 +02:00
loader.js Add skeleton loading, self-host assets, fix LLM empty response 2026-05-29 17:28:42 +02:00
nav.js v1.2.0: VAD, live preview, hands-free mic, restore last section 2026-05-29 18:47:00 +02:00
style.css v1.2.0: VAD, live preview, hands-free mic, restore last section 2026-05-29 18:47:00 +02:00