Skip to main content
Triggered when the AI has finished generating the complete text response. Handle this event to save the complete response to conversation history.

Event Properties

type
string
Event type. Always "realtime.response.audio_transcript.done" for this event.
data
object
Event data object containing response information.
data.content
string
The complete transcribed text of the AI response.Example: "Hello there! How can I help you today?"
data.transcript
string
Alternative field name for the complete transcript. May be present for compatibility.Example: "Hello there! How can I help you today?"
data.id
string
Unique identifier for this response. Matches the id from delta events.Example: "resp-123456"
{
  "type": "realtime.response.audio_transcript.done",
  "data": {
    "content": "Hello there! How can I help you today?",
    "id": "resp-123456"
  }
}

Usage Example

const NavTalkMessageType = Object.freeze({
    REALTIME_RESPONSE_AUDIO_TRANSCRIPT_DONE: "realtime.response.audio_transcript.done",
    // ... other event types
});

async function handleReceivedMessage(data) {
    const nav_data = data.data;
    
    switch (data.type) {
        case NavTalkMessageType.REALTIME_RESPONSE_AUDIO_TRANSCRIPT_DONE:
            const transcript = nav_data.content;
            console.log("Received transcription: " + transcript);
            
            // Save to history
            await appendRealtimeChatHistory("assistant", transcript);
            break;
    }
}