Skip to main content

Real-time Transcript Updates

Overview

During AI Assistant conversations, 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.

Transcript Properties

The SDK provides two main ways to access transcript data:

Custom Publisher for Real-time Updates

Current Transcript Access

TranscriptionItem Structure

Setting Up Transcript Updates

Processing Individual Transcript Items

Manual Transcript Access

You can also manually retrieve the current transcript at any time:

Filtering Transcripts

The SDK provides convenient methods to filter transcripts by role or status:

Handling Partial Responses

AI Assistant responses may come in chunks (partial responses). Handle these appropriately:

Complete Example with UITableView

Delegate Pattern (Alternative Approach)

You can also use the delegate pattern to receive transcript updates:

Widget Settings Access

Access AI conversation widget settings:

Connection State Monitoring

Monitor the AI Assistant connection state:

Clearing Transcripts

You can clear transcripts manually if needed:

Important Notes

  • AI Assistant Only: Transcript updates are only available during AI Assistant conversations initiated through anonymousLogin
  • Real-time Updates: Transcripts update in real-time as the conversation progresses
  • Partial Responses: Assistant responses may come in chunks - handle isPartial flag appropriately
  • Memory Management: Transcripts are automatically cleared when calls end or when disconnecting
  • Thread Safety: Publisher updates are dispatched on the main thread automatically
  • Multiple Subscribers: You can have multiple subscribers to the same transcript updates

Error Handling

Next Steps

After setting up transcript updates:
  1. Send text messages to interact with the AI Assistant via text