ElevenLabs Python SDK
ActiveDescription
Official Python SDK for ElevenLabs voice AI services — text-to-speech, voice cloning, real-time streaming, and Conversational AI agents.
Key Features
- Multiple TTS models: Eleven v3 (70+ languages), Multilingual v2 (29 langs), Flash v2.5 (ultra-low latency)
- Voice cloning from audio samples with instant voice creation
- Real-time audio streaming for low-latency applications
- Conversational AI agents with custom tool registration and async support
- Speech Engine for building server-side voice agents with WebSocket integration
- Async client for non-blocking API calls in production applications
Use Cases
Tags
Categories
Quick Start
1. Install: pip install elevenlabs. 2. Set your API key as ELEVEN_API_KEY environment variable or pass it to ElevenLabs(). 3. Convert text to speech: elevenlabs.text_to_speech.convert(text='Hello world', voice_id='JBFqnCBsd6RMkjVDRZzb', model_id='eleven_v3'). 4. For streaming: use elevenlabs.text_to_speech.stream() and iterate over chunks. 5. For conversational agents: create a Conversation with agent_id and DefaultAudioInterface.