Skip to content
Development
Skill

/speech-generation

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.

BOOST
From plugin
letta-code
3.6k26 skills8 hooks
Install
$ npx -y skills add letta-ai/letta-code --skill speech-generation --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/speech-generation

Context preview

The summary Claude sees to decide when to auto-load this skill.

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.

SKILL.md

speech-generation.SKILL.md
name: speech-generation
description: 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.
license: MIT

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](https://github.com/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 goes in the body.

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"}' \
  > speech-response.json

python3 - <<'PY'
import base64, json

with open("speech-response.json") as f:
    response = json.load(f)
if "audio_b64" not in response:
    raise SystemExit(response.get("message", response))

with open("output.mp3", "wb") as f:
    f.write(base64.b64decode(response["audio_b64"]))
print("saved output.mp3")
PY

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.

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

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 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.
{
  "text": "Customize my voice settings.",
  "voice_id": "JBFqnCBsd6RMkjVDRZzb",
  "model_id": "eleven_v4",
  "voice_settings": {
    "stability": 0.5,
    "similarity_boost": 0.75
  }
}

`stability`: lower = more expressive, higher = more consistent. `similarity_boost`: higher = closer to the reference voice. See [references/voice-settings.md](references/voice-settings.md) for ranges and use-case presets.

Audio Tags

Eleven v4 reads bracketed, natural-language cues in `text` as stage directions:

  • Place a tag before the words it affects: `[shouts] I can't believe you said that to me.`
  • A tag's emotion carries forward, so add another tag only where the delivery should shift.
  • Combine tags inside one set of brackets: `[whispering, playful]`. Plain-language tags work, such as `[nervous, trying to sound confident]` or `[phone buzzing]`.
  • Use one emotion per clause; contrasting tags on the same words blur the performance.
  • Pair tags with punctuation: ellipses slow a line, dashes cut a speaker off, and `[pause]` / `[long pause]` add beats.
  • If a delivery misses, swap the tag (try `[let down]` instead of `[despair]`) and regenerate rather than rewriting the line.

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`.

Read more
Ships withletta-code

Letta Code is a stateful agent harness for creating agents that are more like people than tools. Letta Code agents have memory, identity, and a sense of experience over time.

Get the whole plugin
Stats
3,601
Stars
438
Forks
Active
Maintenance
TypeScript
Language
Apache-2.0
License
7m ago
Last commit
11mo ago
Created

Repo: letta-ai/letta-code

Other skills on letta-code.