When theere is noise in the background, the tts mo...
# ask-ai
g
When theere is noise in the background, the tts model waits for input instead of closing
✅ 1
t
Thanks for reaching out, Apratim. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’m sorry you’re seeing the TTS session hang when there’s background noise. To help diagnose and fix this, can you share a few details? • Which TTS model/service are you using (model name/version)? • How are you sending audio/input to the model (web client, SDK, REST API)? Include the SDK and version if applicable. • Is the TTS part of a larger voice recognition flow (speech-to-text → TTS) or a direct TTS session that listens for end-of-input? • What behavior do you expect when noise is present (auto-close after silence, a timeout, manual stop)? • Any relevant configuration or code for input handling, VAD/silence detection, or timeouts you’ve set (share snippets if possible). • Are there logs, timestamps, or error messages showing the session waiting indefinitely? With this info I can suggest targeted fixes (VAD settings, silence/timeouts, noise suppression, or a polling/timeout fallback) and show exact code changes. , with interactive elements
l
Can you explain a bit more about you noise issue? Have you tried noise cancelling options, including ai-coustics with our dedicated VAD?
t
Thanks — I’m following up about the TTS session hanging when there’s background noise and your question about noise-cancelling and ai-coustics/VAD. Yes — LiveKit provides noise cancellation and a dedicated VAD you can enable to reduce background-noise-triggered waiting: • Use ai-coustics audio enhancement (example:
ai_coustics.audio_enhancement(model=ai_coustics.EnhancerModel.QUAIL_VF_L)
) to filter voice from background noise. • Enable noise cancellation in the agent/room options when starting the session; pick
BVC
for typical WebRTC audio or
BVCTelephony
for SIP/narrow-band audio. • LiveKit’s default VAD is Silero VAD; enabling VAD improves end-of-turn detection so the session can close when speech stops rather than waiting through noisy input. If you want, tell me: • Which TTS model/version and SDK (and version) you’re using, and whether participants connect via WebRTC or SIP. • Your current room/session options or code that configures noise cancellation, VAD, or timeouts. With those details I’ll suggest the exact room options and code changes (or a timeout fallback) to prevent the TTS session from waiting indefinitely. Sources: Turns overview | LiveKit Documentation | Using Noise Cancellation for SIP and WebRTC Participants | Google AI and LiveKit | LiveKit Documentation | Turn Detection for Voice Agents: VAD, Endpointing, and Model-Based Detectio... | LiveKit Platform | Build, run, and observe voice AI agents | LiveKit, with interactive elements