Video service implementation for generating AI avatar responses using Tavus
TavusVideoService
enables the creation of AI avatar video responses by sending audio to Tavus’s API. It handles real-time audio streaming, conversation management, and video generation through Tavus’s platform.
To use TavusVideoService
, install the required dependencies:
You’ll need to set up the following environment variables:
TAVUS_API_KEY
- Your Tavus API keyTAVUS_REPLICA_ID
- Your Tavus replica identifierYou can obtain a Tavus API key by signing up at Tavus.
Your Tavus API key
Tavus replica identifier
Tavus persona identifier
pipecat0
. To use the LLM output and TTS voice, do not set the persona_id. Instead, leave it set to the default value, pipecat0
.HTTP client session for API communication
Raw audio data for avatar speech
Signals start of speech synthesis
Signals end of speech synthesis
Signals conversation interruption
Signals end of conversation
Signals conversation cancellation
Initializes a new conversation and returns the conversation URL.
Retrieves the name of the configured persona.
The service collects processing metrics:
AI Video Avatars
Interactive Presentations
Real-time Communication
Video service implementation for generating AI avatar responses using Tavus
TavusVideoService
enables the creation of AI avatar video responses by sending audio to Tavus’s API. It handles real-time audio streaming, conversation management, and video generation through Tavus’s platform.
To use TavusVideoService
, install the required dependencies:
You’ll need to set up the following environment variables:
TAVUS_API_KEY
- Your Tavus API keyTAVUS_REPLICA_ID
- Your Tavus replica identifierYou can obtain a Tavus API key by signing up at Tavus.
Your Tavus API key
Tavus replica identifier
Tavus persona identifier
pipecat0
. To use the LLM output and TTS voice, do not set the persona_id. Instead, leave it set to the default value, pipecat0
.HTTP client session for API communication
Raw audio data for avatar speech
Signals start of speech synthesis
Signals end of speech synthesis
Signals conversation interruption
Signals end of conversation
Signals conversation cancellation
Initializes a new conversation and returns the conversation URL.
Retrieves the name of the configured persona.
The service collects processing metrics:
AI Video Avatars
Interactive Presentations
Real-time Communication