Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

speech-generation

FreeNo executable scriptsNot checked

Convert text to speech using ElevenLabs voice AI through Letta. Use when generating audio from text, sending a voice message, reading text aloud, creating…

letta-aiby letta-ai★ 3,947 GitHub stars

About this skill

ElevenLabs Text-to-Speech (via Letta)

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.

This skill is adapted from ElevenLabs' text-to-speech skill (elevenlabs/skills, MIT; see LICENSE). Instead of calling ElevenLabs with your own key, you call Letta's hosted endpoint POST /v1/audio/speech. It forwards the request to ElevenLabs with Letta's key and charges the organization's Letta credits, so you do not need an ElevenLabs API key. The request body uses the same field names as ElevenLabs "Create speech" (the voice ID and output_format go in the body), and the response is the audio file itself, as with ElevenLabs.

Quick Start

base_url="${LETTA_BASE_URL%/}"

curl -sS -X POST "$base_url/v1/audio/speech" \
  -H "Authorization: Bearer $LETTA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Hello, welcome to ElevenLabs!","voice_id":"JBFqnCBsd6RMkjVDRZzb","model_id":"eleven_v4"}' \
  --output output.mp3 \
  --dump-header speech-headers.txt \
  --write-out '%{http_code} %{content_type}\n'

Use the runtime-provided LETTA_BASE_URL and LETTA_API_KEY together. Build URLs relative to ${LETTA_BASE_URL%/} and do not hardcode https://api.letta.com. If either variable is missing, the user needs to authenticate with Letta Cloud; do not ask for an ElevenLabs key.

A 200 with an audio/... content type means output.mp3 is the speech. Any other status means output.mp3 holds a JSON error with a message instead; read it (see "Error Handling") and do not share the file.

Share the saved file the way your current surface supports: attach or upload it to the conversation or channel you are replying in. Keep credit amounts out of replies unless the user asks about cost.

Word timings

Use POST /v1/audio/speech/with-timestamps for captions, cueing visuals to words, or lip-sync checks. It accepts the same body as plain speech (text, voice_id, model_id, voice_settings, and other options), with the same Letta authentication and billing; no ElevenLabs key is needed.

The response is JSON { audio_base64, alignment, normalized_alignment, words }. Each word is { text, type: "word", start, end }, with times in seconds. Words retain punctuation and use normalized spoken text when available; missing alignment produces an empty words array.

base_url="${LETTA_BASE_URL%/}"

curl -fsS -X POST "$base_url/v1/audio/speech/with-timestamps" \
  -H "Authorization: Bearer $LETTA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Hello world!","voice_id":"JBFqnCBsd6RMkjVDRZzb","model_id":"eleven_v4","output_format":"mp3_44100_128"}' \
  --output speech.json &&
jq -r '.audio_base64' speech.json | base64 --decode > output.mp3 &&
jq '.words' speech.json > words.json

Plain /v1/audio/speech still returns raw audio bytes.

Models

Model ID Languages Latency Best For
eleven_v4 90+ Standard Default. Highest quality, emotional range, audio tags, voice cloning accuracy
eleven_v4_turbo 90+ ~100ms Faster v4 for shorter, time-sensitive replies
eleven_flash_v2_5 32 ~75ms Lowest latency, lowest cost
eleven_flash_v2 English ~75ms English-only, lowest latency
eleven_multilingual_v2 29 Standard Previous generation; most stable on very long-form generations
eleven_v3 70+ Standard Previous 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) and does not support SSML. Direct delivery with audio tags such as [whispers], [laughs], [sarcastic] (see "Audio Tags").

Voice IDs

The Letta endpoint accepts ElevenLabs premade voices and voices Letta provides. If your memory names your own voice ID, use it whenever you speak as yourself. Other voices (cloned or designed voices from someone's own ElevenLabs account) are rejected with 400; to use one, call ElevenLabs directly with the user's own ELEVENLABS_API_KEY secret and ElevenLabs' text-to-speech skill.

Premade voices:

  • JBFqnCBsd6RMkjVDRZzb - George (male, warm storyteller)
  • EXAVITQu4vr4xnSDxMaL - Sarah (female, mature, reassuring)
  • cgSgspJ2msm6clMCkdW9 - Jessica (female, playful, conversational)
  • onwK4e9ZLuTAKqWW03F9 - Daniel (male, steady broadcaster)
  • SAz9YHcvj6GT2YYXdXww - River (neutral, relaxed)

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
Full SKILL.md on GitHub

Install speech-generation in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

Bundled files

LICENSEreferences/voice-settings.md

FAQ

What does the speech-generation skill do?

Convert text to speech using ElevenLabs voice AI through Letta. Use when generating audio from text, sending a voice message, reading text aloud, creating voiceovers, speaking in your own voice, or synthesizing speech in 90+ languages.

How do I install the speech-generation skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the speech-generation skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare speech-generation with