Stopping the realtime audio

When interfacing with text version of ChatGPT you can manually stop the output stream. However, in the realtime version (using audio), it seems not to be possible to send an event to stop the stream of audio coming in and the token consumption that goes with that?
Use case: When talking to the realtime assistant, you sometimes want to stop the output and steer the assistant to another direction.

2 Likes

There’s a response.cancel messag you can send to the API ( I found It in this very useful doc, enjoy ! - https://platform.openai.com/docs/api-reference/realtime-client-events/response/cancel)

This doesnt work for me. Has it worked for you?

yeah i’ll be honest it did,