important-judge-78504
09/16/2025, 2:40 PMtall-airline-16756
09/16/2025, 2:40 PMtall-airline-16756
09/16/2025, 2:41 PMstt_node of LiveKit Agents. These frames don’t come with a predefined length property, but no worries—you can easily figure out the duration yourself using the samples_per_channel and sample_rate properties of the AudioFrame objects. Here’s the simple formula:
frame_duration = frame.samples_per_channel / frame.sample_rate
For instance, a 10ms frame at 48kHz would have 480 samples per channel. If you’d like, I’m here to help you with implementing this or tailoring your stt_node to fit your needs. Just let me know!
Sources: Receiving and publishing tracks | LiveKit Docs | Capturing metrics | LiveKit Docs | livekit-agents/livekit/agents/voice/transcription/_speaking_rate.py | agents/src/voice/io.ts | Camera & microphone | LiveKit Docsimportant-judge-78504
09/16/2025, 2:53 PMtall-airline-16756
09/16/2025, 2:53 PMRoomInputOptions audio sample rate to match the 8 kHz sample rate of your Silero VAD and STT. The system is designed to automatically handle resampling for you, ensuring everything works smoothly. By default, the sample rate is set to 24 kHz, which actually helps provide better audio quality for your initial input, and then it internally resamples to the 8 kHz rate that Silero uses.
That said, if you’re looking to optimize performance and reduce the resampling work, you can definitely set the sample rate to 8 kHz. Just let me know if you’d like a hand with setting this up—I’m here to help!
Sources: Silero VAD plugin | LiveKit Docs | agents/src/voice/audio_recognition.ts | pipeline-tts/rime_tts.py | tests/test_stt.py | Silero VAD plugin | LiveKit Docsimportant-judge-78504
09/16/2025, 2:54 PMtall-airline-16756
09/16/2025, 2:55 PMimportant-judge-78504
09/16/2025, 2:56 PMtall-airline-16756
09/16/2025, 2:58 PMimportant-judge-78504
09/16/2025, 3:12 PMtall-airline-16756
09/16/2025, 3:13 PM