Skip to content

Commit 5a86b38

Browse files
Merge pull request #2057 from eric-urban/eur/realtime-how-to
realtime how-to updates
2 parents 18335a2 + 38a2fe3 commit 5a86b38

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

articles/ai-services/openai/how-to/realtime-audio.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,14 @@ sequenceDiagram
269269
Server->>Client: conversation.item.deleted
270270
-->
271271

272+
## Response interuption
273+
274+
The client [`response.cancel`](../realtime-audio-reference.md#realtimeclienteventresponsecancel) event is used to cancel an in-progress response.
275+
276+
A user might want to interrupt the assistant's response or ask the assistant to stop talking. The server produces audio faster than realtime. The client can send a [`conversation.item.truncate`](../realtime-audio-reference.md#realtimeclienteventconversationitemtruncate) event to truncate the audio before it's played.
277+
- The server's understanding of the audio with the client's playback is synchronized.
278+
- Truncating audio deletes the server-side text transcript to ensure there isn't text in the context that the user doesn't know about.
279+
- The server responds with a [`conversation.item.truncated`](../realtime-audio-reference.md#realtimeservereventconversationitemtruncated) event.
272280

273281
## Related content
274282

0 commit comments

Comments
 (0)