Real-time Transcript Updates
Overview
During an AI Assistant conversation, the SDK provides real-time transcript updates that include both the caller’s speech and the AI Assistant’s responses. This allows you to display a live conversation transcript in your application.Setting Up Transcript Updates
To receive transcript updates, set up theonTranscriptUpdate callback on your TelnyxClient instance:
TranscriptItem Properties
TheTranscriptItem class contains the following properties:
Manual Transcript Management
Retrieving Current Transcript
You can manually retrieve the current transcript at any time:Clearing Transcript
To clear the transcript (for example, when starting a new conversation):UI Implementation Examples
Simple List View
Chat Bubble Style
Real-time Processing
Filtering Transcript Items
Saving Transcript Data
Important Notes
- AI Assistant Only: Transcript updates are only available during AI Assistant conversations initiated through
anonymousLogin - Real-time Updates: Transcripts are updated in real-time as the conversation progresses
- Persistent: The transcript persists throughout the call duration
- Memory Management: Consider clearing transcripts for long conversations to manage memory
- Text Messages: Text messages sent via
sendConversationMessagealso appear in the transcript
Troubleshooting
No Transcript Updates
If you’re not receiving transcript updates:- Ensure you’re using
anonymousLogin(not regular authentication) - Verify the
onTranscriptUpdatecallback is set before starting the call - Check that the AI assistant is properly configured for transcription
- Confirm the call is active and connected
Missing Messages
If some messages are missing from the transcript:- Check network connectivity during the call
- Ensure the callback isn’t being overridden
- Verify the AI assistant is configured to provide transcripts
Next Steps
- Send text messages to the AI agent during calls