bored-finland-56176
11/28/2025, 9:49 AMopenai.realtime.RealtimeModel with AgentSession
Problem: Sometimes (not always) the voice output sounds robotic/metallic or like voices are mixing together. The weird part - when I listen to Twilio's call recording, the audio sounds perfectly fine. So the issue seems to be in the LiveKit → Realtime API part, not the Twilio input.
The voice can also suddenly slow down or change tone mid-conversation. It's really inconsistent which makes it hard to debug.
Current config:
python
AgentSession(
llm=openai.realtime.RealtimeModel(
voice="alloy",
temperature=0.1,
model="gpt-4o-realtime-preview-2024-12-17"
),
turn_detection="realtime_llm",
)
# Room input options
room_input_options=RoomInputOptions(
noise_cancellation=noise_cancellation.BVCTelephony()
)
Questions:
1. Is BVCTelephony() noise cancellation recommended for SIP calls, or should I use something lighter/disable it?
2. Does the temperature setting on RealtimeModel affect voice quality? I've got it at 0.1 right now.
3. Any known issues with audio buffering between SIP and Realtime API that could cause this?
The inconsistency is killing me - same setup, sometimes perfect audio, sometimes sounds like a robot. Any ideas what could be causing this?
Thanks!breezy-kangaroo-57146
11/30/2025, 11:21 PMbreezy-kangaroo-57146
11/30/2025, 11:21 PMbored-finland-56176
12/01/2025, 8:37 AMbreezy-kangaroo-57146
12/01/2025, 10:40 AM