Skip to main content

ElevenLabs TTS integration for Vision Agents

Project description

ElevenLabs Text-to-Speech Plugin

A high-quality Text-to-Speech (TTS) plugin for GetStream that uses the ElevenLabs API.

Installation

pip install getstream-plugins-elevenlabs

Usage

from getstream.plugins.elevenlabs import ElevenLabsTTS
from getstream.video.rtc.audio_track import AudioStreamTrack

# Initialize with API key from environment variable
tts = ElevenLabsTTS()

# Or specify API key directly
tts = ElevenLabsTTS(api_key="your_elevenlabs_api_key")

# Create an audio track to output speech
track = AudioStreamTrack(framerate=16000)
tts.set_output_track(track)

# Register event handlers
@tts.on("audio")
def on_audio(audio_data, user):
    print(f"Received audio chunk: {len(audio_data)} bytes")

# Send text to be converted to speech
await tts.send("Hello, this is a test of the ElevenLabs text-to-speech plugin.")

Configuration Options

  • api_key: ElevenLabs API key (default: reads from ELEVENLABS_API_KEY environment variable)
  • voice_id: The voice ID to use for synthesis (default: "VR6AewLTigWG4xSOukaG")
  • model_id: The model ID to use for synthesis (default: "eleven_multilingual_v2")

Requirements

  • Python 3.10+
  • elevenlabs>=2.5.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vision_agents_plugins_elevenlabs-0.1.5.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file vision_agents_plugins_elevenlabs-0.1.5.tar.gz.

File metadata

File hashes

Hashes for vision_agents_plugins_elevenlabs-0.1.5.tar.gz
Algorithm Hash digest
SHA256 a56aad591e5774084e33b7f649fc89622dad828d00e918e9359d6f65dacd7b87
MD5 b1da30468fe24f9b4e9b7559a08ed2ec
BLAKE2b-256 c39329939dff8f2c89cf068981cc25218458088f09d31ed81066bcc8eb22e8da

See more details on using hashes here.

File details

Details for the file vision_agents_plugins_elevenlabs-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for vision_agents_plugins_elevenlabs-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a7f3073fa19f99571afe1b75377c3a382f75a0bae906e19dc91ce0cf5f2282ae
MD5 b4e27d5a68ae7feb010e344e30bb0779
BLAKE2b-256 5a174304fd9b0f31d50acbfb3786f3c86abe03635a48296884eb2b366de5b09d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page