Spaces:
Paused

minhahwang Copilot commited on
Commit
68f1a16
·
1 Parent(s): c7cbd46

perf: 5 latency optimizations for TTS playback

Browse files

1. Pre-generate all paragraphs on book select (background thread)
4. Audio cache - save WAVs per chunk+voice, skip re-synthesis on replay
5. Reduce LFM Q&A max_new_tokens 200->100 (halves generation time)
11. Eager pre-buffering - serves from cache if pre-gen complete
13. Transition chime (0.3s 440Hz fade) between chunks to mask gaps

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

4 files changed +172 -40
Files changed (4)
app.py+11-12
inference_lfm.py+5-15
requirements_lfm.txt-1
tts.py+156-12