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.9.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.9.tar.gz.

File metadata

File hashes

Hashes for vision_agents_plugins_elevenlabs-0.1.9.tar.gz
Algorithm Hash digest
SHA256 ca0e02db18a8ba3744d5b9d322446da54fe2b0112e523a88bcf80e206fab38a5
MD5 2b5621d4e5d49ea59f013f9a80887893
BLAKE2b-256 16644fe19a5e8d3e2f79d6d7e506c0d346d9d1da7d086c39677f15ae760c6a7e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vision_agents_plugins_elevenlabs-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 5a882dc9a308170f385a0dde83ce2017011d8cecc719918e11cd3ce191ee9311
MD5 134992aa9ee13bb489dc07ff4f715554
BLAKE2b-256 8461b40235084a1ff6d31236dda446a3a0b36a8dee2c3e253352b1d1435bc303

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