Skip to main content
Triggered when the user’s speech has been fully transcribed. Handle this event to display the user message in your chat interface and save it to conversation history.

Event Properties

type
string
Event type. Always "realtime.conversation.item.input_audio_transcription.completed" for this event.
data
object
Event data object containing transcription information.
data.content
string
The complete transcribed text of user speech.Example: "Hello, how are you today?"
data.transcript
string
Alternative field name for the transcribed text. May be present for compatibility.Example: "Hello, how are you today?"
{
  "type": "realtime.conversation.item.input_audio_transcription.completed",
  "data": {
    "content": "Hello, how are you today?"
  }
}

Usage Example

const NavTalkMessageType = Object.freeze({
    REALTIME_CONVERSATION_ITEM_COMPLETED: "realtime.conversation.item.input_audio_transcription.completed",
    // ... other event types
});

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