Response.audio.delta is very fast

I’m using Django Channels as a websocket proxy to forward voice from the user to the Realtime API and listen for messages from the Realtime API and forward those to the user.

I’m listening to the event response.audio.delta and forwarding that back to my app via websockets and streaming that to the user.

The problem is that the voice I hear is extremely fast. i.e the assistant is speaking in double/triple speed.

Has anyone else had this problem? Should I be streaming the delta from response.audio.delta back to the user? How do I get the voice to play back at “normal” speed? I think I’m waiting for each delta to play, before playing the next one…

1 Like

You likely have the playback sample rate wrong of the raw audio.
Try playing pcm16 as 24kHz mono 16 bit.

2 Likes

Thank you very much. That was indeed the problem!