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.1.tar.gz (5.8 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.1.tar.gz.

File metadata

File hashes

Hashes for vision_agents_plugins_elevenlabs-0.2.1.tar.gz
Algorithm Hash digest
SHA256 b1f4f404aa6b0cf7cb5b75e83cbd563d6e39ab4dad4230cef79b6395f7a68a7d
MD5 2f6bc12de7f30ebf579e4b7afae22145
BLAKE2b-256 d2aeb12d3799a04a557f55b08b2dc0ff177ac4b367a18dab20e2a9a3066402a6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vision_agents_plugins_elevenlabs-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f3d2766f332ed61edb49aeda72a65d8027fd04b457a3cd0db6040543a0cd7530
MD5 25b77fa61fbab7aeec2f43b691357857
BLAKE2b-256 7afdbc0aed262da59b9579c08bbb4069b9e5aaafdfec3925041c5c615e86872a

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