How can I reduce the volume of thinking sound in B...
# ask-ai
a
How can I reduce the volume of thinking sound in Background Audio?? Even though I've set it to 0.1 it still so much louder on telephony call.. how do I control/change it?
t
Thanks for reaching out, Hiren. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I hear you: your thinking sound set to 0.1 still sounds too loud on telephony calls. Let’s fix that. Short checklist to try (fast, ordered steps): 1. Confirm you’re setting the thinking sound volume on the BackgroundAudioPlayer (example):
Copy code
background_audio = BackgroundAudioPlayer(
  thinking_sound=AudioConfig(BuiltinAudioClip.KEYBOARD_TYPING, volume=0.1)
)
1. If that’s already set, try a quieter pre-synthesized file instead of the built-in clip (volume baked in): • Export a WAV/MP3 with lower gain and pass the file path as
thinking_sound
. 1. Check for downstream processing that can raise perceived loudness on SIP/PSTN: • Telephony transcoding, endpoint gain/AGC, or noise-cancellation can change loudness. • Test the same thinking sound on a non-telephony WebRTC call to see if it’s specific to SIP. 1. If you need programmatic normalization: • Use a lower
volume
(e.g., 0.05) or reduce the file gain before upload. • Consider disabling any automatic gain control on the endpoint if enabled. If you want, tell me: • Are you using the built-in clip or a custom file? • Are you seeing the loudness only on SIP/PSTN calls or also on normal WebRTC calls? I’ll suggest the exact next steps based on your answers. Sources: Background audio | LiveKit Documentation | How telli automates high-volume enterprise phone operations with LiveKit an... | Turn-taking tuning | LiveKit Documentation | Agent session | LiveKit Documentation | Agent speech and audio | LiveKit Documentation, with interactive elements
a
how can I set my custom mp3 file as a thinking sound
t
Thanks — you want to use a custom MP3 as the thinking sound. Below are concise steps and examples for Python and Node.js, plus quick tips. Prepare the file • Normalize or reduce the file’s gain offline (export a quieter MP3/WAV) so telephony processing doesn’t make it too loud. • Place the file where your agent runtime can access it (local path or accessible URL). Python example 1. Import and set the
thinking_sound
to the file path:
Copy code
background_audio = BackgroundAudioPlayer(
    thinking_sound="/path/to/quiet_thinking.mp3"
)
await background_audio.start(room=room, agent_session=session)
Node.js example 1. Provide the file path or URL when creating the BackgroundAudioPlayer:
Copy code
const backgroundAudio = new BackgroundAudioPlayer({
  thinking_sound: "/path/to/quiet_thinking.mp3"
});
await backgroundAudio.start({ room, agentSession });
Tips & troubleshooting • If it still sounds loud on telephony calls, test the same file on a WebRTC call to confirm SIP/PSTN processing is the cause. • Lower the file’s gain further or set a smaller in-code volume (if supported) before using it. • Use WAV if you need lossless control during preprocessing. If you tell me your runtime (Python or Node) and where the file is hosted (local path or URL), I’ll give the exact code snippet you should paste in. , with interactive elements