All Burki SDKs support real-time WebSocket streaming for live transcripts during calls and campaign progress monitoring. This enables building powerful real-time dashboards, monitoring tools, and analytics systems.
Overview
Burki provides two real-time streaming endpoints:Live Transcript Streaming
Stream real-time transcripts as they are generated during calls. Perfect for building:- Call monitoring dashboards
- Live supervisor interfaces
- Real-time sentiment analysis
- Accessibility features (live captions)
- Training and coaching tools
Event Types
Transcript Event Data
Implementation Examples
- Python
- JavaScript
- Go
The Python SDK uses async context managers for streaming:
Features:
- Automatic connection management with context manager
- Async iteration for events
- Clean disconnection on exit
Campaign Progress Streaming
Monitor campaign execution in real-time. Perfect for building:- Campaign progress dashboards
- Real-time analytics displays
- Automated alerting systems
- Performance monitoring tools
Event Types
Progress Event Data
Contact Completed Event
Implementation Examples
- Python
- JavaScript
- Go
Connection Management
Keepalive / Ping
Send periodic pings to keep the WebSocket connection alive, especially for long-running sessions:Reconnection Strategy
Implement exponential backoff for automatic reconnection:Best Practices
When to Use Streaming vs Polling
When to Use Streaming vs Polling
Use Streaming When:
- You need real-time updates (< 1 second latency)
- Building live dashboards or monitoring interfaces
- Processing events as they happen (e.g., sentiment analysis)
- Monitoring long-running operations (campaigns, calls)
- Periodic status checks are sufficient (> 30 seconds)
- Simple status display without live updates
- Lower resource usage is a priority
- Connection stability is a concern
Resource Management
Resource Management
Always Clean Up:
- Close streams when done (
close(),disconnect(), or context manager exit) - Cancel keepalive tasks/goroutines
- Handle disconnection events gracefully
- Don’t store all events in memory for long streams
- Process or persist events as they arrive
- Use bounded buffers if accumulating data
- Maximum 10 concurrent connections per call
- Maximum 100 messages per second per connection
- Consider connection pooling for multiple streams
Error Handling
Error Handling
Handle All Error Types:
- Connection errors (network issues)
- Authentication errors (invalid API key)
- Not found errors (invalid call_sid or campaign_id)
- Rate limit errors (too many connections)
- Fall back to polling if streaming fails
- Show stale data with “updating…” indicator
- Log errors for debugging
- Show connection status to users
- Indicate when data may be stale
- Provide manual refresh option
Security Considerations
Security Considerations
API Key Protection:
- Never expose API keys in client-side code (browser)
- Use server-side proxies for browser applications
- Store keys in environment variables
- Transcripts may contain sensitive information
- Implement appropriate access controls
- Consider data retention policies
- Always use WSS (WebSocket Secure) in production
- Validate SSL certificates
- Implement authentication tokens if needed
Use Case Examples
Call Monitoring Dashboard
Build a real-time call center monitoring interface:Real-time Sentiment Analysis
Analyze call sentiment as transcripts arrive:Campaign Progress Webhook
Forward campaign events to external systems:Next Steps
Python SDK
Full Python SDK documentation
JavaScript SDK
Full JavaScript/TypeScript SDK documentation
Go SDK
Full Go SDK documentation
Live Transcript API
REST API WebSocket reference