Multilingual Voice Lab
Testing low-latency neural speech synthesis and streaming voice translation.
Real-time speech applications frequently suffer from high latency and unnatural prosody when transitioning between languages like Indonesian and English.
Buffer incoming text tokens into semantic chunk boundaries (phrases/clauses) before dispatching to neural text-to-speech engines to reduce time-to-first-byte while preserving natural intonation.
Built a bidirectional WebSocket streaming server that accepts text chunks, streams synthesized PCM audio back to the browser, and plays it via Web Audio API audio buffers.
Chunking at punctuation and conjunction boundaries reduced perceived latency by ~45% while eliminating audio clipping.
Direct word-by-word streaming resulted in robotic cadence and flat pitch transitions.
Natural speech synthesis requires small semantic units rather than raw token streaming.
A working prototype demonstrating under 350ms time-to-first-audio playback with smooth phrase boundaries.
Experiment with local ONNX speech models running directly in WebAssembly to remove cloud dependency.