astonishing-gpu-67869
10/02/2025, 8:42 PMtall-airline-16756
10/02/2025, 8:42 PMtall-airline-16756
10/02/2025, 8:42 PMsession.say() with Pre-Synthesized Audio: This approach lets you load a pre-recorded audio file (like a .wav), convert it into an rtc.AudioFrame, and stream it using an async generator. It’s perfect for playing short audio clips during agent responses.
• Using `BackgroundAudioPlayer.play()`: This option is fantastic for playing audio clips on demand, with features like looping and managing multiple audio sources. It works well for background ambience or sound effects and supports formats such as .wav and .ogg.
If you'd like, I can provide detailed examples or guide you through the implementation—just let me know how I can assist you further!
Sources: tests/test_agent_session.py | Agent speech and audio | LiveKit Docs | examples/play_audio_stream.py | Docs::Agents | docs/index.yamlastonishing-gpu-67869
10/02/2025, 9:37 PMtall-airline-16756
10/02/2025, 9:37 PMBackgroundAudioPlayer class and include some handy built-in options like:
• KEYBOARD_TYPING: This one mimics the sound of typing (file: keyboard-typing.ogg).
• KEYBOARD_TYPING2: A slightly different typing sound variation (file: keyboard-typing2.ogg).
You can easily configure these sounds using the BuiltinAudioClip enum and sync them with the agent’s lifecycle. If you’d like, I’m here to walk you through the setup or chat about any specific needs you have—just let me know!
Sources: Docs::Agents | External data and RAG | LiveKit Docs | Agent speech and audio | LiveKit Docs | Agent speech and audio | LiveKit Docs | livekit-plugins/livekit-plugins-google/livekit/plugins/google/llm.py