salmon-belgium-62133
11/27/2025, 10:37 AMtall-airline-16756
11/27/2025, 10:37 AMtall-airline-16756
11/27/2025, 10:37 AMaudio_sample_rate setting you can change to set the incoming audio sample rate (Hz). Example in Python:
input_options = RoomInputOptions(
audio_sample_rate=16000 # sets audio sample rate to 16 kHz
)
If you want, tell me which SDK/language you're using and the target sample rate so I can give a matching code example.
Sources: Agent session | LiveKit docssalmon-belgium-62133
11/27/2025, 12:12 PMAudioInputOptions and RoomInputOptionstall-airline-16756
11/27/2025, 12:13 PMRoomInputOptions and AudioInputOptions — good question.
• RoomInputOptions
◦ Room-level, higher‑level config passed to AgentSession.start() to control how the agent receives all input from a room (audio, video, text).
◦ Includes broad audio settings like audio_enabled, audio_sample_rate, channels, noise cancellation, and room connection behavior.
◦ Use this when you want simple, direct configuration for an agent session.
• AudioInputOptions
◦ Lower-level, audio-specific config used inside room_options (e.g., room_io.RoomOptions).
◦ Allows finer-grained or conditional audio handling (for example, applying different noise cancellation depending on participant type).
◦ Use this when you need advanced or per-participant audio logic.
If you tell me which SDK/language and the exact behavior you want (simple sample-rate change vs. conditional processing), I can show a short code example for that case.
Sources: Agent session | LiveKit docs | Voice AI quickstart | LiveKit docssalmon-belgium-62133
11/27/2025, 12:16 PMRoomInputOptions or in AudioInputOptionstall-airline-16756
11/27/2025, 12:16 PMaudio_sample_rate (Hz) for how the agent receives audio. AudioInputOptions is for more granular/conditional audio handling (noise cancellation, per-participant logic) and not where you set the global sample rate.
Example (Python):
input_options = RoomInputOptions(
audio_enabled=True,
audio_sample_rate=16000
)
session.start(room=ctx.room, agent=MyAgent(), room_input_options=input_options)
Do you need the same example for a specific SDK/language or for client-side capture settings?salmon-belgium-62133
11/27/2025, 12:34 PMtall-airline-16756
11/27/2025, 12:35 PMaudio_sample_rate=16000 in RoomInputOptions controls the sample rate the agent receives audio at — the agent will get (or be resampled to) 16 kHz.
The client’s capture/transmit sample rate is independent and is determined by the client SDK/browser (WebRTC clients typically capture at 48 kHz). LiveKit will resample as needed so the agent receives 16 kHz even if the client sent 48 kHz.
If you need the agent-to-client (outbound) sample rate changed, that is controlled by RoomOutputOptions.audio_sample_rate (default 24000 Hz). Would you like an example for your SDK/language to show receive vs. send settings?
Sources: Agent session | LiveKit docs | Processing raw media tracks | LiveKit docs