Real Time Voice API stops responding

I have been trying to build something on top of realtime voice API and it was working fine, I did some rigorous testing and all of a sudden it stopped responding

I know my API key is working because the transcribe API works fine, only the response from realtime voice API isn’t coming to the client. It doesn’t receive any message or any error. The problem is that it isn’t even erroring out it just doesn’t respond.

It’s very random, sometimes it responds sometimes it doesn’t, not sure if this is a rate limit issue but haven’t been able to debug because it doesn’t throw an error.

3 Likes

Mind sharing some code? Have you tried the playground?

Using the code from the realtime-console. Have changed nothing.

1 Like

im having the same exact issue

2 Likes

did u manage to solve it? having same issue

Does it work for you in the playground? :hugs:

Was not able to resolve it. So went ahead and switched to Hume for now

Same issue here with the new realtime preview client side (web)

Sometimes out of a sudden, no responses come back. I talk, get all events, transcription is coming, but no audio response.

Any ideas?

Basically just using the web based code example:

const baseUrl = “… .. ..api.openai.com/v1/realtime”;
const model = “gpt-4o-realtime-preview-2024-12-17”;
const sdpResponse = await fetch(`${baseUrl}?model=${model}`, {
method: “POST”,
body: offer.sdp,
headers: {
    Authorization: `Bearer ${EPHEMERAL_KEY}`,
    “Content-Type”: “application/sdp”
},
});

const sdp = await sdpResponse.text();
console.log("sdpResponse.text()", sdp);

const answer = {
  type: "answer",
  sdp: sdp,
};
await pc.setRemoteDescription(answer);