is anyone having issues with background audio play...
# agents
i
is anyone having issues with background audio player? i tried to integrate it ambient sound and thinking sounds, but don't hear anything. Also tried just running the example in docs (https://github.com/livekit/agents/blob/main/examples/voice_agents/background_audio.py). still don't hear anything, using the official sandbox frontend to connect, so it doesn't seem like a frontend issue. tried with livekit agents 1.2.8 and 1.2.7, python SDK
👀 1
f
@incalculable-window-31491 it works normally for me. If it helps, this is what I use: PYTHON_VERSION=3.13 Libraries:
Copy code
livekit==1.0.12
livekit-agents==1.2.6
livekit-plugins-openai==1.2.6
livekit-plugins-elevenlabs==1.2.6
livekit-plugins-silero==1.2.6
livekit-plugins-deepgram==1.2.6
livekit-plugins-turn-detector==1.2.6
livekit-plugins-noise-cancellation==0.2.5
python-dotenv==1.0.1
requests==2.31.0
Code chunk:
Copy code
async def entrypoint(ctx: JobContext):
    sessiondata = SessionData()
    
)
   
    intake_agent = IntakeAgent()

    # Register all agents in the sessiondata
    sessiondata.agents.update(
        {
            "intake": intake_agent
        }
    )

    session = AgentSession[SessionData](
        userdata=sessiondata, 
        stt=deepgram.STT(model=STT_MODEL),
        llm=openai.LLM(
            model=LLM_MODEL,
            parallel_tool_calls=LLM_PARALLEL_TOOLS,
            temperature=LLM_TEMPERATURE
        ),  # Session LLM for workflows like GetEmailTask
        tts=elevenlabs.TTS(
            model=TTS_MODEL,
            voice_id=TTS_VOICE_ID,
            voice_settings=elevenlabs.VoiceSettings(
                speed=TTS_SPEED,
                stability=TTS_STABILITY,
                similarity_boost=TTS_SIMILARITY_BOOST,
            ),
            auto_mode=TTS_AUTO_MODE,
            enable_ssml_parsing=TTS_ENABLE_SSML
        ), # Session-level TTS
        turn_detection=get_turn_detection_model(),
        vad=get_vad_model())


    background_audio = BackgroundAudioPlayer(
        # play keyboard typing sound when the agent is thinking
        thinking_sound=[
            AudioConfig(BuiltinAudioClip.KEYBOARD_TYPING, volume=0.8),
            AudioConfig(BuiltinAudioClip.KEYBOARD_TYPING2, volume=0.7),
        ],
    )


    await session.start(
        agent=sessiondata.agents["intake"],
        room=ctx.room,
        room_input_options=RoomInputOptions(
            noise_cancellation=noise_cancellation.BVCTelephony(),
        ),
    )
âž• 1
p.s. not using any frontend on my side, just telephoni
j
just tested with the background_audio example and it works, perhaps the volume of the background audio is too low? can you hear the thinking sound?
âž• 1
i
didn't hear it in my testing. I will try this again with the above, thank you!