better-sandwich-65834
12/10/2025, 1:45 PMtall-airline-16756
12/10/2025, 1:45 PMtall-airline-16756
12/10/2025, 1:46 PMreduce_latency=True to skip slow normalization steps (may affect pronunciation).
• Increase speech rate
◦ Use a speed_alpha or equivalent parameter (e.g., speed_alpha=0.9) to synthesize faster.
• Increase audio buffering
◦ Make the AudioSource queue larger so temporary TTS slowness won’t immediately flush:
▪︎ Example: set queue_size_ms to a higher value (e.g., 2000 ms).
• Use a faster TTS model or provider
◦ Switch to a lower-latency model or provider settings that prioritize speed over fidelity.
• Use efficient sample rate/encoding
◦ Lower sample rates (16kHz/24kHz) or simpler encodings reduce generation/processing time.
• Make audio generation non-blocking
◦ Ensure TTS synthesis runs asynchronously/streaming so frames are emitted continuously rather than in large blocking chunks.
• Monitor and profile TTS
◦ Measure per-step latencies (preprocessing, inference, postprocessing) to find the bottleneck and apply the targeted change above.
If you want, tell me:
• which TTS plugin/provider and model you’re using,
• your sample rate and queue_size_ms (or AudioSource settings),
and I’ll recommend the most effective single change to try first.
Sources: Debugging Audio/Video Sync Issues in LiveKit Publishing | Rime TTS plugin guide | LiveKit Docs | Resolving "InvalidState - failed to capture frame" errors in AudioSource | LiveKit Docs | Agent speech and audio | LiveKit docsbetter-sandwich-65834
12/10/2025, 1:46 PMtts = TTS.with_azure(
azure_endpoint=azure_openai_tts_settings.endpoint,
api_key=azure_openai_tts_settings.api_key,
model=agent_settings.TTS_MODEL,
azure_deployment=agent_settings.TTS_MODEL,
voice=agent_settings.TTS_VOICE,
speed=agent_settings.TTS_SPEED,
instructions=vibe_instructions,
)tall-airline-16756
12/10/2025, 1:47 PMqueue_size_ms (e.g., 1000–2000 ms) so temporary synthesis delays don’t trigger flushes.
• Raise speech rate slightly: increase speed (or use speed_alpha if supported) to shorten synthesis time.
• Use lower sample rate/encoding if acceptable (16 kHz or 24 kHz, PCM) to reduce processing overhead.
• Stream or async synth if possible: ensure your Azure TTS client emits audio chunks as they’re generated instead of waiting for the whole utterance.
Two quick diagnostics to tell me next
1. Which Azure deployment/model name are you using for agent_settings.TTS_MODEL?
2. What are your AudioSource settings (sample rate, queue_size_ms) and the typical utterance length?
With those I’ll recommend the single most effective change to try first.