Chisle
The coding-agent plugin that bills 52% of a bare model across 20 live tasks. Terse persona + tool-output compressor + context diet.
翻訳待ち
The official Python SDK for the ElevenLabs API.
翻訳待ち
開発ツールPythonGitHub @elevenlabs自分でインストール所有者未確認
Paste into Claude or ChatGPT for installation instructions suited to your environment.
Have you tried it? One tap is enough. No sign-in needed.
Loading the full README. The saved excerpt is shown below.
The official Python SDK for ElevenLabs. ElevenLabs brings the most compelling, rich and lifelike voices to creators and developers in just a few lines of code.
Check out the HTTP API documentation.
1. Eleven v3 (eleven_v3)
• Dramatic delivery and performances
• 70+ languages supported
• Supported for natural multi-speaker dialogue
• Excels in stability, language diversity, and accent accuracy
• Supports 29 languages
• Recommended for most use cases
• Ultra-low latency
• Supports 32 languages
• Faster model, 50% lower price per characterRead the full README ↗The official Python SDK for ElevenLabs. ElevenLabs brings the most compelling, rich and lifelike voices to creators and developers in just a few lines of code.
Check out the HTTP API documentation.
pip install elevenlabs
Eleven v4 (eleven_v4)
Eleven v4 Turbo (eleven_v4_turbo)
Eleven Multilingual v2 (eleven_multilingual_v2)
Eleven Flash v2.5 (eleven_flash_v2_5)
For speech to text use Scribe v2 (scribe_v2, or scribe_v2_realtime for live audio), and for music use Eleven Music v2.5 (music_v2_5). For more detailed information about these models and others, visit the ElevenLabs Models documentation.
from dotenv import load_dotenv
from elevenlabs.client import ElevenLabs
from elevenlabs.play import play
load_dotenv()
elevenlabs = ElevenLabs()
audio = elevenlabs.text_to_speech.convert(
text="The first move is what sets everything in motion.",
voice_id="JBFqnCBsd6RMkjVDRZzb",
model_id="eleven_v4",
output_format="mp3_44100_128",
)
play(audio)
🎧 Try it out! Want to hear our voices in action? Visit the ElevenLabs Voice Lab to experiment with different voices, languages, and settings.
List all your available voices with search().
from elevenlabs.client import ElevenLabs
elevenlabs = ElevenLabs(
api_key="YOUR_API_KEY",
)
response = elevenlabs.voices.search()
print(response.voices)
For information about the structure of the voices output, please refer to the official ElevenLabs API documentation for Get Voices.
Build a voice object with custom settings to personalize the voice style, or call
elevenlabs.voices.settings.get("your-voice-id") to get the default settings for the voice.
Clone your voice in an instant. Note that voice cloning requires an API key, see below.
from elevenlabs.client import ElevenLabs
from elevenlabs.play import play
elevenlabs = ElevenLabs(
api_key="YOUR_API_KEY",
)
voice = elevenlabs.voices.ivc.create(
name="Alex",
description="An old American male voice with a slight hoarseness in his throat. Perfect for news", # Optional
files=["./sample_0.mp3", "./sample_1.mp3", "./sample_2.mp3"],
)
Stream audio in real-time, as it's being generated.
from elevenlabs import stream
from elevenlabs.client import ElevenLabs
elevenlabs = ElevenLabs(
api_key="YOUR_API_KEY",
)
audio_stream = elevenlabs.text_to_speech.stream(
text="This is a test",
voice_id="JBFqnCBsd6RMkjVDRZzb",
model_id="eleven_v4"
)
# option 1: play the streamed audio locally
stream(audio_stream)
# option 2: process the audio bytes manually
for chunk in audio_stream:
if isinstance(chunk, bytes):
print(chunk)
Use AsyncElevenLabs if you want to make API calls asynchronously.
import asyncio
from elevenlabs.client import AsyncElevenLabs
elevenlabs = AsyncElevenLabs(
api_key="MY_API_KEY"
)
async def print_models() -> None:
models = await elevenlabs.models.list()
print(models)
asyncio.run(print_models())
Build interactive AI agents with real-time audio capabilities using ElevenAgents.
from elevenlabs.client import ElevenLabs
from elevenlabs.conversational_ai.conversation import Conversation, ClientTools
from elevenlabs.conversational_ai.default_audio_interface import DefaultAudioInterface
elevenlabs = ElevenLabs(
api_key="YOUR_API_KEY",
)
# Create audio interface for real-time audio input/output
audio_interface = DefaultAudioInterface()
# Create conversation
conversation = Conversation(
client=elevenlabs,
agent_id="your-agent-id",
requires_auth=True,
audio_interface=audio_interface,
)
# Start the conversation
conversation.start_session()
# The conversation runs in background until you call:
conversation.end_session()
Pass callback_disconnect to distinguish user shutdown, normal server closure, and errors. It replaces callback_end_session, which is deprecated:
This is the beginning of the README. Read the rest at the original. Read the full README ↗