what sample rate does the BVCTelephony model use?
# ask-ai
i
what sample rate does the BVCTelephony model use?
t
Thanks for reaching out, Ed. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Could you please help me understand a bit more about what you mean by "BVCTelephony model"? Are you talking about a specific noise cancellation model used for telephony, the sample rate requirements for Background Voice Cancellation (BVC) in telephony, or maybe something else? Knowing this will really help me give you the best and most accurate information. I'm here to help! Sources: HD voice for SIP | LiveKit Docs | livekit-plugins/livekit-plugins-cartesia/livekit/plugins/cartesia/stt.py | livekit-rtc/livekit/rtc/audio_stream.py | Silero VAD plugin | LiveKit Docs | Rime TTS plugin guide | LiveKit Docs
i
yea the noise cancellation model is probably trained on a certain sample_rate, i want to know what the sample rate should be to know how we should be resampling audio in the room before it goes into noise cancellation process in the agent
t
Could you please let me know if you're using the Background Voice Cancellation (BVC) feature directly in LiveKit Cloud or through an agent like the Python or Node.js plugin? Also, it would be really helpful to understand the current sample rate of your audio input. Are you experiencing any particular issues with the BVC processing? This information will help us find the best sample rate for resampling and get everything working smoothly for you. Sources: Enhanced noise cancellation | LiveKit Docs | Tests/LiveKitCoreTests/AVFoundation/AVAudioPCMBufferTests.swift | livekit-agents/livekit/agents/voice/recorder_io/recorder_io.py | Smallest AI TTS plugin guide | LiveKit Docs | Processing raw media tracks | LiveKit Docs
i
we are using BVCTelephony through the agent python framework. the current sample rate is 8kHz from Twilio, but the livekit room by default resamples to 24kHz before passing the audio to the noise cancellation model. i'd like to know if 24kHz is the most optimal sample rate for the noise cancellation model
t
Thank you for your question! The sources don’t specifically confirm that 24kHz is the optimal sample rate for the Background Voice Cancellation (BVC) model in LiveKit's Python agent framework. However, from practical experience, 48kHz is often the go-to choice when working with BVC in this context. For example, many configurations set
audio_sample_rate=48000
when enabling BVC in
RoomInputOptions
. That said, 24kHz is used in other areas like OpenAI's Realtime API or some TTS integrations, but it doesn’t seem to be tailored specifically for BVC. Ultimately, the best sample rate might depend on your overall audio pipeline and what works best for your setup. If your current pipeline resamples to 24kHz and you’re happy with the audio quality, that’s perfectly fine! But if you want to follow common practices, you might want to try resampling to 48kHz before sending audio to the noise cancellation model. I hope this helps, and please feel free to reach out if you have any more questions or need further guidance! Sources: examples/play_audio_stream.py | basics/echo_transcriber_agent.py | Agent Session & Client Integration | livekit/livekit_composite | DeepWiki | livekit-plugins/livekit-plugins-silero/livekit/plugins/silero/vad.py | Smallest AI TTS plugin guide | LiveKit Docs
i
ok but it looks like the BVCTelephony model prefers 16kHz
t
Could you please help me understand where the "BVCTelephony model" is mentioned? Is it something that comes with LiveKit, a custom setup, or maybe a third-party add-on? Knowing this will really help us make sure that 16kHz is the right sample rate for this model. Thanks so much!
i
its the telephony noise cancellation model from livekit
t
Thanks so much for your question! The telephony noise cancellation model in LiveKit doesn’t have a clearly documented "preferred" sample rate in the sources, but I’m happy to share what’s typical in telephony contexts: • Traditional PSTN calls usually use 8kHz sample rates. • Modern VoIP and HD Voice often go with 16kHz for clearer audio quality. In LiveKit, the general audio processing defaults to 16kHz for AI inference systems and 48kHz for general audio streams, though the telephony noise cancellation likely adjusts to the call’s sample rate. If your current pipeline resamples to 24kHz, that can still work well! However, testing with 16kHz might give you results that align even better with common telephony and AI processing standards. Please feel free to reach out if you’d like any help optimizing your setup or trying out different configurations—I’m here to support you! Sources: HD voice for SIP | LiveKit Docs | livekit-rtc/livekit/rtc/audio_stream.py | livekit-agents/livekit/agents/voice/transcription/_speaking_rate.py | plugins/silero/src/vad.ts | Enhanced noise cancellation | LiveKit Docs