Skip to main content

ElevenLabs TTS and STT 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.2.4.tar.gz (6.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.2.4.tar.gz.

File metadata

File hashes

Hashes for vision_agents_plugins_elevenlabs-0.2.4.tar.gz
Algorithm Hash digest
SHA256 a3c8fe15f2498792d657df1ed310960673fbc85882f7a54036fcc3fc2edb5cfe
MD5 fb1608cc5c8276dc1f2248dd5ff3c224
BLAKE2b-256 255c7aeb2b3391a8fcf2e0f150238b6ae2e4b83c96a22e4b51aa9cc5c69431a0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vision_agents_plugins_elevenlabs-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9caebeeb9ad398f35d5c198d81d4a32699824ea14a4b0c5eb14aa93ec3f1c64e
MD5 f22e0f3a5df41d76ee649e98d9832cdf
BLAKE2b-256 00355a1f032fce2b623fb428a58fcf959b644730d46c615f599fcf205e7d5301

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