Agent skill · Backend & API

api-ai-elevenlabs

ElevenLabs voice AI SDK patterns for TypeScript/Node.js -- text-to-speech, streaming, voice cloning, speech-to-speech, pronunciation control, and conversational AI

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill api-ai-elevenlabs --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 20 KB
Bundled scripts: none
Path: skills/ai-llm/api-ai-elevenlabs/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

Guides using the ElevenLabs SDKs to perform text-to-speech (convert and stream), manage voices (search/get), clone voices, convert speech-to-speech, and build real-time conversational AI agents with voice interactions. It explains model choices (eleven_v3, eleven_flash_v2_5, eleven_multilingual_v2) and how to handle streams as ReadableStream<Uint8Array>, including piping to files or HTTP responses. It also covers pronunciation control, SSML, and error handling patterns.

How it works

  • Use the official @elevenlabs/elevenlabs-js package for server-side TTS, voice management, and speech-to-speech, and @elevenlabs/client for real-time conversational AI agents.
  • Initialize a client (examples show a minimal setup and production configuration) and rely on environment variable ELEVENLABS_API_KEY for authentication.
  • For TTS, call textToSpeech.convert(VOICE_ID, { text, modelId, ... }) to generate full audio as a ReadableStream<Uint8Array>, or textToSpeech.stream(VOICE_ID, { text, modelId, ... }) for low-latency streaming; the SDK returns ReadableStream<Uint8Array> that must be consumed (pipe to file or HTTP response).
  • Voice settings can be adjusted via voiceSettings (stability, similarityBoost, style, speed, etc.).
  • Manage voices with voices.search() and voices.get(VOICE_ID). Voice cloning uses voices.ivc.create with sample files; speech-to-speech uses speechToSpeech.convert with an input audio stream and model.
  • Examples illustrate consuming streams, piping to files, and error handling with ElevenLabsError types.

When to use it

  • Generating speech audio from text (narration, audiobooks, announcements)
  • Streaming audio in real-time for low-latency playback
  • Cloning voices from audio samples
  • Converting speech from one voice to another (speech-to-speech)
  • Building real-time conversational AI agents with voice interaction
  • Controlling pronunciation with SSML or pronunciation dictionaries
  • Generating audio with character-level timestamp alignment

What it can touch

  • Client initialization and configuration (retries, timeouts, API key)
  • Text-to-speech conversion and streaming (convert, stream, timestamps)
  • Voice settings (stability, similarityBoost, style, speed)
  • Voice selection and management (voices.search, voices.get)
  • Voice cloning (voices.ivc.create)
  • Speech-to-speech (speechToSpeech.convert)
  • WebSocket input streaming for real-time patterns
  • Pronunciation dictionaries and SSML
  • Conversational AI agents ( @elevenlabs/client )

Caveats

  • Requires environment variable ELEVENLABS_API_KEY; never hardcode keys.
  • Streams must be consumed to avoid resource leaks.
  • voiceId must be passed as the first positional argument to textToSpeech methods (not inside options).
  • Model selection should match use case (quality vs latency vs long-form stability).
  • Handles specific error types (ElevenLabsTimeoutError, ElevenLabsError) for robust debugging.
From the SKILL.md

# ElevenLabs Patterns > **Quick Guide:** Use the official `@elevenlabs/elevenlabs-js` package to interact with the ElevenLabs API. Use `client.textToSpeech.convert()` for full audio generation or `client.textToSpeech.stream()` for low-latency streaming. Voice settings (`stability`, `similarityBoost`, `style`) control output character. Use `eleven_v3` for best quality, `eleven_flash_v2_5` for lowest latency, or `eleven_multilingual_v2` for stable long-form content. The SDK returns `ReadableStream<Uint8Array>` -- pipe to files or HTTP responses. Use `@elevenlabs/client` for real-time conversational AI agents. --- <critical_requirements> ## CRITICAL: Before Using This Skill > **All code must follow project conventions in CLAUDE.md** (kebab-case, named exports, import ordering, `import type`, named constants) **(You MUST use `@elevenlabs/elevenlabs-js` for server-side TTS, voice management, and speech-to-speech -- use `@elevenlabs/client` only for conversational AI agents)** **(You MUST never hardcode API keys -- always use environment variables via `process.env.ELEVENLABS_API_KEY` which the SDK reads automatically)** **(You MUST consume the `ReadableStream<Uint8Array>` returned by `co

What's inside
Steps it walks through
  1. CRITICAL: Before Using This Skill
  2. Examples Index
  3. Philosophy
  4. Core Patterns
  5. Pattern 1: Client Setup
  6. Pattern 2: Text-to-Speech (Convert)
  7. Pattern 3: Text-to-Speech (Stream)
  8. Pattern 4: Voice Settings
  9. Pattern 5: Voice Selection and Management
  10. Pattern 6: Voice Cloning (Instant)
  11. Pattern 7: Speech-to-Speech
  12. Pattern 8: Error Handling
  13. Performance Optimization
  14. Model Selection for Latency/Quality
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the api-ai-elevenlabs skill do?

ElevenLabs voice AI SDK patterns for TypeScript/Node.js -- text-to-speech, streaming, voice cloning, speech-to-speech, pronunciation control, and conversational AI

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill api-ai-elevenlabs --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going