Overview
TavusVideoService
integrates with Tavus to generate AI-powered video avatars that speak your text-to-speech output in real-time. The service takes audio input and produces synchronized video of a realistic avatar speaking, enabling engaging conversational AI experiences with visual presence.
API Reference
Complete API documentation and method details
Tavus Docs
Official Tavus replica and avatar documentation
Example Code
Working example with avatar video generation
Installation
To use Tavus services, install the required dependency:TAVUS_API_KEY
- Your Tavus API keyTAVUS_REPLICA_ID
- ID of your trained voice replica
Sign up for a Tavus account at Tavus
Platform to get your API
key and create voice replicas.
Frames
Input
TTSAudioRawFrame
- Text-to-speech audio to be spoken by the avatarStartInterruptionFrame
- Signals conversation interruptionEndFrame
- Signals end of conversation
Output
OutputImageRawFrame
- Generated avatar video framesOutputAudioRawFrame
- Synchronized audio from the avatarStartInterruptionFrame
- Forwarded interruption signals
Service Features
- Realistic Avatars: High-quality AI-generated talking heads
- Real-time Generation: Low-latency video creation for live conversations
- Audio Synchronization: Perfect lip-sync with generated speech
- Video Streaming: Optimized for real-time video transport
Usage Example
Avatar Configuration
Voice Replicas
Tavus uses voice replicas to generate speech that matches a specific voice:Integration Patterns
With Daily Transport
Tavus works seamlessly with Daily for video conferencing applications:With WebRTC Transport
For peer-to-peer video communication:Additional Notes
- Latency Optimization: Designed for real-time conversation with minimal delay
- Network Requirements: Video streaming requires sufficient bandwidth for quality delivery
- Processing Requirements: Ensure sufficient server resources for real-time video processing and streaming
- Session Management: Automatically handles avatar lifecycle and cleanup
- Error Handling: Robust error recovery for uninterrupted conversations