Agent skill

Text To Speech

by elevenlabs in elevenlabs/skills

Convert text to speech using ElevenLabs voice AI. An agent skill from elevenlabs/skills.

MITAuto-check passedMedia & Creative

Install Text To Speech

skills CLI
$ npx skills add elevenlabs/skills --skill text-to-speech -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install elevenlabs/skills text-to-speech --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/elevenlabs/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/text-to-speech .claude/skills/text-to-speech && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
text-to-speech
GitHub stars
482
Token cost
~2.2k tokens
SKILL.md length
607 words
Files
4 (incl. references)
Skills in repo
8
Repo updated
First seen
Licence
MIT

At a glance

Convert text to speech using ElevenLabs voice AI. An agent skill from elevenlabs/skills.

  • Generating audio from text
  • SKILL.md covers Quick Start, Models, Voice IDs and Voice Settings, plus 8 more sections
  • Needs ELEVENLABS_API_KEY
  • Creating voiceovers

What it does

Text To Speech is an agent skill from elevenlabs/skills. Convert text to speech using ElevenLabs voice AI. Use when generating audio from text, creating voiceovers, building voice apps, or synthesizing speech in 90+ languages.

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/installation.md`, `references/streaming.md` and `references/voice-settings.md`). Compatibility notes: Requires internet access and an ElevenLabs API key (ELEVENLABSAPIKEY).

It sits in Media & Creative, covering Text to speech and voice. It works with ElevenLabs. The repository describes itself as: Collections of skills for building with ElevenLabs. The licence is MIT.

When your agent uses it

  • Generating audio from text
  • Creating voiceovers
  • Building voice apps
  • Synthesizing speech in 90+ languages

Example prompts

  • “/text-to-speech”

Requirements

  • Python 3
  • A credential in ELEVENLABS_API_KEY
  • Compatibility (from SKILL.md): Requires internet access and an ElevenLabs API key (ELEVENLABS_API_KEY).

What it can do on your machine

Read from SKILL.md and the folder at commit 1d08a4a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python, bash and javascript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • ELEVENLABS_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Requires internet access and an ElevenLabs API key (ELEVENLABS_API_KEY).

    From compatibility in the SKILL.md frontmatter.

Context cost

Text To Speech loads about 2.2k tokens when it runs, and up to ~7k if it reads all its reference files. Until then it costs about 46 tokens; SKILL.md has 607 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~46
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from elevenlabs/skills at commit 1d08a4a, republished under its MIT licence (© elevenlabs). 607 words, ~2,208 tokens.

Download SKILL.mdSave it as .claude/skills/text-to-speech/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
text-to-speech
description
Convert text to speech using ElevenLabs voice AI. Use when generating audio from text, creating voiceovers, building voice apps, or synthesizing speech in 90+ languages.
compatibility
Requires internet access and an ElevenLabs API key (ELEVENLABS_API_KEY).
license
MIT

ElevenLabs Text-to-Speech

Generate natural speech from text - supports 90+ languages, multiple models for quality vs latency tradeoffs. Examples default to eleven_v4, the latest and highest-quality model.

Setup: See Installation Guide. For JavaScript, use @elevenlabs/* packages only.

Quick Start

Python
python
from elevenlabs import ElevenLabs

client = ElevenLabs()

audio = client.text_to_speech.convert(
    text="Hello, welcome to ElevenLabs!",
    voice_id="JBFqnCBsd6RMkjVDRZzb",  # George
    model_id="eleven_v4"
)

with open("output.mp3", "wb") as f:
    for chunk in audio:
        f.write(chunk)
JavaScript
javascript
import { ElevenLabsClient } from "@elevenlabs/elevenlabs-js";
import { createWriteStream } from "fs";
import { Readable } from "stream";

const client = new ElevenLabsClient();
const audio = await client.textToSpeech.convert("JBFqnCBsd6RMkjVDRZzb", {
  text: "Hello, welcome to ElevenLabs!",
  modelId: "eleven_v4",
});
// convert() returns a web ReadableStream — bridge it to a Node stream to write to disk
Readable.fromWeb(audio).pipe(createWriteStream("output.mp3"));
CLI

Use say to play text immediately with the default voice and eleven_v3 model:

bash
elevenlabs say "Hello!"

Pipe text into say when another command produces the input:

bash
echo "The build finished successfully." | elevenlabs say

Use the API command when you need to set request parameters directly:

bash
elevenlabs text-to-speech convert --voice-id JBFqnCBsd6RMkjVDRZzb \
  --text "Hello!" --model-id eleven_v4 --output output.mp3

The CLI reads ELEVENLABS_API_KEY from the environment automatically.

Models

Model IDLanguagesLatencyBest For
eleven_v490+StandardDefault. Highest quality, emotional range, audio tags, voice cloning accuracy
eleven_v4_turbo90+~100msReal-time v4 quality for agents and interactive apps (via Text to Dialogue WebSocket)
eleven_flash_v2_532~75msLowest latency, lowest cost, stream-input WebSocket
eleven_flash_v2English~75msEnglish-only, lowest latency
eleven_multilingual_v229StandardPrevious generation; most stable on very long-form generations
eleven_v370+StandardPrevious generation expressive model

eleven_turbo_v2_5 and eleven_turbo_v2 are superseded by the Flash models (same output, lower latency) — use eleven_flash_v2_5 / eleven_flash_v2 instead.

Eleven v4 notes: supports only stability and similarity_boost voice settings (no style or speed), does not support SSML, and is not available on the stream-input TTS WebSocket. Direct delivery with audio tags such as [whispers], [laughs], [sarcastic].

Voice IDs

Use pre-made voices or create custom voices in the dashboard.

Popular voices:

  • JBFqnCBsd6RMkjVDRZzb - George (male, narrative)
  • EXAVITQu4vr4xnSDxMaL - Sarah (female, soft)
  • onwK4e9ZLuTAKqWW03F9 - Daniel (male, authoritative)
  • XB0fDUnXU5powFXDhCwa - Charlotte (female, conversational)
python
voices = client.voices.get_all()
for voice in voices.voices:
    print(f"{voice.voice_id}: {voice.name}")

Voice Settings

Fine-tune how the voice sounds:

  • Stability: How consistent the voice stays. Lower values = more emotional range and variation, but can sound unstable. Higher = steady, predictable delivery.
  • Similarity boost: How closely to match the original voice sample. Higher values sound more like the original but may amplify audio artifacts.
  • Style: Exaggerates the voice's unique style characteristics (v2/v3 models; not supported on Eleven v4).
  • Speed: Speech speed multiplier (v2/v3 models; not supported on Eleven v4).
  • Speaker boost: Post-processing that enhances clarity and voice similarity.
python
from elevenlabs import VoiceSettings

audio = client.text_to_speech.convert(
    text="Customize my voice settings.",
    voice_id="JBFqnCBsd6RMkjVDRZzb",
    model_id="eleven_v4",
    voice_settings=VoiceSettings(
        stability=0.5,          # Lower = more expressive, higher = more consistent
        similarity_boost=0.75,  # Higher = closer to the reference voice
    )
)

Language Selection

Use language_code with models that support language enforcement to guide pronunciation and text normalization. Unsupported language codes are ignored, and language_code is not supported on eleven_multilingual_v2.

python
audio = client.text_to_speech.convert(
    text="Bonjour, comment allez-vous?",
    voice_id="JBFqnCBsd6RMkjVDRZzb",
    model_id="eleven_v4",
    language_code="fr"  # ISO 639-1 code
)
Show full SKILL.md (258 more words)Show less

Text Normalization

Controls how numbers, dates, and abbreviations are converted to spoken words. For example, "01/15/2026" becomes "January fifteenth, twenty twenty-six":

  • "auto" (default): Model decides based on context
  • "on": Always normalize (use when you want natural speech)
  • "off": Speak literally (use when you want "zero one slash one five...")
python
audio = client.text_to_speech.convert(
    text="Call 1-800-555-0123 on 01/15/2026",
    voice_id="JBFqnCBsd6RMkjVDRZzb",
    model_id="eleven_v4",
    apply_text_normalization="on"
)

Request Stitching

When generating long audio in multiple requests, the audio can have pops, unnatural pauses, or tone shifts at the boundaries. Request stitching solves this by letting each request know what comes before/after it:

python
# First request
audio1 = client.text_to_speech.convert(
    text="This is the first part.",
    voice_id="JBFqnCBsd6RMkjVDRZzb",
    model_id="eleven_v4",
    next_text="And this continues the story."
)

# Second request using previous context
audio2 = client.text_to_speech.convert(
    text="And this continues the story.",
    voice_id="JBFqnCBsd6RMkjVDRZzb",
    model_id="eleven_v4",
    previous_text="This is the first part."
)

Output Formats

FormatDescription
mp3_44100_128MP3 44.1kHz 128kbps (default) - compressed, good for web/apps
mp3_44100_192MP3 44.1kHz 192kbps (Creator+) - higher quality compressed
mp3_44100_64MP3 44.1kHz 64kbps - lower quality, smaller files
mp3_22050_32MP3 22.05kHz 32kbps - smallest MP3 files
pcm_16000Raw PCM 16kHz - use for real-time processing
pcm_22050Raw PCM 22.05kHz
pcm_24000Raw PCM 24kHz - good balance for streaming
pcm_44100Raw PCM 44.1kHz (Pro+) - CD quality
pcm_48000Raw PCM 48kHz (Pro+) - highest quality
ulaw_8000μ-law 8kHz - standard for phone systems (Twilio, telephony)
alaw_8000A-law 8kHz - telephony (alternative to μ-law)
opus_48000_64Opus 48kHz 64kbps - efficient streaming codec
wav_44100WAV 44.1kHz - uncompressed with headers

Streaming

Use the stream method to receive audio chunks as they're generated:

python
audio_stream = client.text_to_speech.stream(
    text="This text will be streamed as audio.",
    voice_id="JBFqnCBsd6RMkjVDRZzb",
    model_id="eleven_v4"
)

for chunk in audio_stream:
    play_audio(chunk)

For real-time apps where latency matters most, use eleven_v4_turbo (~100ms) over the Text to Dialogue WebSocket, or eleven_flash_v2_5 (~75ms) over HTTP streaming or the stream-input WebSocket. See references/streaming.md.

Error Handling

python
try:
    audio = client.text_to_speech.convert(
        text="Generate speech",
        voice_id="invalid-voice-id",
        model_id="eleven_v4"
    )
except Exception as e:
    print(f"API error: {e}")

Common errors:

  • 401: Invalid API key
  • 422: Invalid parameters (check voice_id, model_id)
  • 429: Rate limit exceeded

Tracking Costs

Monitor character usage via response headers (x-character-count, request-id):

python
response = client.text_to_speech.convert.with_raw_response(
    text="Hello!", voice_id="JBFqnCBsd6RMkjVDRZzb", model_id="eleven_v4"
)
audio = response.parse()
print(f"Characters used: {response.headers.get('x-character-count')}")

References

© elevenlabs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in text-to-speech of elevenlabs/skills.

  • SKILL.md
  • references/installation.md
  • references/streaming.md
  • references/voice-settings.md

Open the folder on GitHubat commit 1d08a4a

Compare with similar skills

Text To Speech next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Text To Speech compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Text To Speech this skillelevenlabs/skills482—~2.2kAutomated safety check: PassMIT
Musictadaspetra/loop2962 repos~827Automated safety check: PassMIT
Sound Effectstadaspetra/loop2962 repos~1.1kAutomated safety check: PassMIT
Elevenlabs Transcribeqdhenry/Claude-Command-Suite1.3k—~1.5kAutomated safety check: NotesNone
Sagtrpc-group/trpc-agent-go1.9k15 repos~574Automated safety check: PassApache-2.0
MusicbozhouDev/video-skills-toolkit150—~3.6kAutomated safety check: PassMIT

Similar skills

  • Music

    tadaspetra/loop

    Generate music using ElevenLabs Music API. An agent skill from tadaspetra/loop.

    296 GitHub starsUsed in 2 repos~827 tokens
    Media & CreativeAuto-check passed
  • Sound Effects

    tadaspetra/loop

    Generate sound effects from text descriptions using ElevenLabs.

    296 GitHub starsUsed in 2 repos~1.1k tokens
    Media & CreativeAuto-check passed
  • Elevenlabs Transcribe

    qdhenry/Claude-Command-Suite

    Transcribes audio/video files using ElevenLabs Scribe v2 API.

    1.3k GitHub stars~1.5k tokensUpdated 7 mo ago
    Media & CreativeAuto-check: notes
  • Sag

    trpc-group/trpc-agent-go

    ElevenLabs text-to-speech with mac-style say UX. An agent skill from trpc-group/trpc-agent-go.

    1.9k GitHub starsUsed in 15 repos~574 tokens
    Media & CreativeAuto-check passed
  • Music

    bozhouDev/video-skills-toolkit

    Generate music using ElevenLabs Music API. An agent skill from bozhouDev/video-skills-toolkit.

    150 GitHub stars~3.6k tokensUpdated 2 mo ago
    Media & CreativeAuto-check passed
  • Setup API Key

    calesthio/OpenMontage

    Guides users through setting up an ElevenLabs API key for ElevenLabs MCP tools.

    66k GitHub stars~717 tokensUpdated 7 days ago
    Media & CreativeAuto-check: notes

More from elevenlabs/skills

All 8 skills in this repo
  • Dubbing

    elevenlabs/skills

    Dub audio and video into other languages using the ElevenLabs Dubbing API (dubbingv2), preserving the original speakers' voices.

    482 GitHub stars~3.3k tokensUpdated yesterday
    Auto-check passed
  • Voice Changer

    elevenlabs/skills

    Transform the voice in an audio recording into a different target voice while preserving emotion, timing, and delivery using the ElevenLabs Voice Changer (speech-to-speech) API.

    482 GitHub stars~2.9k tokensUpdated yesterday
    Auto-check passed
  • Voice Isolator

    elevenlabs/skills

    Remove background noise and isolate vocals/speech from audio using ElevenLabs Voice Isolator (audio isolation) API.

    482 GitHub stars~923 tokensUpdated yesterday
    Auto-check passed
  • Speech Engine

    elevenlabs/skills

    Add real-time voice conversations to a custom agent runtime with ElevenLabs Speech Engine.

    482 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check: warnings
  • Agents

    elevenlabs/skills

    Build voice AI agents with ElevenLabs. An agent skill from elevenlabs/skills.

    482 GitHub stars~6.5k tokensUpdated yesterday
    Auto-check passed
  • Setup API Key

    elevenlabs/skills

    Guides users through setting up an ElevenLabs API key for REST API and SDK workflows.

    482 GitHub stars~954 tokensUpdated yesterday
    Auto-check: notes

Works with

Questions about Text To Speech

What does Text To Speech do?

Convert text to speech using ElevenLabs voice AI. An agent skill from elevenlabs/skills. Text To Speech is an agent skill from elevenlabs/skills. Convert text to speech using ElevenLabs voice AI.

When should I use Text To Speech?

Text To Speech fits situations like: generating audio from text; creating voiceovers; building voice apps; synthesizing speech in 90+ languages.

How do I install Text To Speech in Claude Code?

Run `npx skills add elevenlabs/skills --skill text-to-speech -a claude-code`. Or copy the skill folder (text-to-speech in elevenlabs/skills) into .claude/skills/text-to-speech in your project. Claude Code loads it when a task matches its description.

How do I install Text To Speech in Codex?

Run `npx skills add elevenlabs/skills --skill text-to-speech -a codex`. Or copy the skill folder (text-to-speech in elevenlabs/skills) into .agents/skills/text-to-speech in your project. Codex loads it when a task matches its description.

Can I use Text To Speech in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add elevenlabs/skills --skill text-to-speech -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/text-to-speech, .gemini/skills/text-to-speech, .github/skills/text-to-speech and .opencode/skills/text-to-speech in your project.

What does Text To Speech need to run?

Going by SKILL.md and its folder, Text To Speech needs credentials named ELEVENLABS_API_KEY. Our summary lists: Python 3; A credential in ELEVENLABS_API_KEY. Compatibility (from SKILL.md): Requires internet access and an ElevenLabs API key (ELEVENLABS_API_KEY)..

Does Text To Speech access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Text To Speech safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Text To Speech use?

Text To Speech is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Text To Speech use?

About 2.2k tokens (SKILL.md is roughly 8.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.7k tokens, read only when the agent opens those files.

What are the alternatives to Text To Speech?

Skills that share tags, products or a category with Text To Speech: Music (tadaspetra/loop, 296 stars), Sound Effects (tadaspetra/loop, 296 stars), Elevenlabs Transcribe (qdhenry/Claude-Command-Suite, 1.3k stars) and Sag (trpc-group/trpc-agent-go, 1.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Text To Speech?

elevenlabs (a GitHub organization) maintains it in elevenlabs/skills, which has 482 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on October 9, 2026.

Source: elevenlabs/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.