agentleFS
claude-worldclaude-world/claude-agent/.claude/skills/text-to-speech/SKILL.md

text-to-speech

Skill5 starsChanged 8 months agoMITView on GitHub

Convert text to audio using macOS built-in `say` command (offline, instant), sherpa-onnx-tts (local neural TTS), or ElevenLabs API (high quality). Use when user says "read this out loud", "generate audio from text", "text to speech", "create voiceover", "speak this", or any TTS request.

  • Reads credentials
  • Installs packages
  • Sends data out

22 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use voice-changer, voice-isolator and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • wlzhSkill

    voice-changer

    音频变声处理工具 - 使用 RVC AI 模型进行真实的声音转换,支持视频直接输入

    Also in 5 projects that use this

  • RobStrayerSkill

    voice-isolator

    Remove background noise and isolate vocals/speech from audio using ElevenLabs Voice Isolator (audio isolation) API. Use when cleaning up noisy recordings, removing music or background ambience from dialogue, isolating speech from field recordings, preparing audio for transcription, extracting vocals, or any "denoise / clean up / isolate voice" task.

    Also in 4 projects that use this

  • RobStrayerSkill

    speech-engine

    Add real-time voice conversations to a custom agent runtime with ElevenLabs Speech Engine. Use when building Speech Engine servers, WebSocket handlers, WebRTC browser clients, conversation token endpoints, interruption-aware streaming responses, or voice-enabled chat agents that connect developer-owned server logic to ElevenLabs speech-to-text and text-to-speech.

    Also in 3 projects that use this

  • LinHao-citySkill

    setup-api-key

    Guides users through setting up an ElevenLabs API key for ElevenLabs MCP tools. Use when the user needs to configure an ElevenLabs API key, when ElevenLabs tools fail due to missing API key, or when the user mentions needing access to ElevenLabs. First checks whether ELEVENLABS_API_KEY is already configured and valid, and only runs full setup when needed.

    Also in 6 projects that use this

  • perso-aiSkill

    dubbing

    Auto-dub (voice-translate) videos into other languages, with lip-sync (Perso AI Dubbing).

    Also in 4 projects that use this

  • LinHao-citySkill

    bfl-api

    BFL FLUX API integration guide covering endpoints, async polling patterns, rate limiting, error handling, webhooks, and regional endpoints with Python and TypeScript code examples.

    Also in 3 projects that use this

  • +5 more from LinHao-city

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 19 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Default: use say for quick playback, save to file with -o.

    line 33
  2. Distinctive:

    If user wants higher quality, suggest sherpa-onnx or ElevenLabs

    line 143
  3. Distinctive:

    Never hardcode API keys — always read from environment variable

    line 145

“Common” is measured: kept by at least 6 in 10 of the 19 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Text to Speech

Convert text to audio. Three engine options from instant offline to high-quality cloud.

Engines Overview

EngineQualitySpeedCostInstall
say (macOS)DecentInstantFreeBuilt-in
sherpa-onnx-ttsGoodFastFreepip install
ElevenLabs APIExcellent~2sPaidAPI key

Default: use say for quick playback, save to file with -o.

Engine 1: macOS say (Built-in, No Install)

# Speak immediately
say "Hello, world!"

# Save to audio file
say "Your message here" -o output.aiff

# Convert to MP3 (requires ffmpeg)
say "Your message here" -o /tmp/tts.aiff && ffmpeg -y -i /tmp/tts.aiff output.mp3

# List available voices
say -v ?

# Use specific voice
say -v Samantha "Hello from Samantha"
say -v Daniel "Hello from Daniel"
say -v Mei-Jia "你好,這是中文語音"
say -v Kyoko "こんにちは、日本語です"

# Control speed (default 200 wpm)
say -r 150 "Slower speech"
say -r 250 "Faster speech"

# Read from file
say -f input.txt -o output.aiff

Popular macOS Voices

LanguageVoiceNote
EnglishSamanthaDefault US
EnglishDanielUK accent
ChineseMei-JiaTraditional Chinese
ChineseTing-TingSimplified Chinese
JapaneseKyokoJapanese

Engine 2: sherpa-onnx-tts (Local Neural TTS)

# Install
pip install sherpa-onnx

# Download a model (example: VITS English)
# See: https://k2-fsa.github.io/sherpa/onnx/tts/index.html
sherpa-onnx-tts --help

# Generate audio
sherpa-onnx-tts \
  --vits-model=./model.onnx \
  --vits-lexicon=./lexicon.txt \
  --vits-tokens=./tokens.txt \
  --output-filename=output.wav \
  "Text to convert to speech"

Engine 3: ElevenLabs API (Highest Quality)

# Requires: export ELEVENLABS_API_KEY=your_key_here

# List voices
curl -s https://api.elevenlabs.io/v1/voices \
  -H "xi-api-key: $ELEVENLABS_API_KEY" | jq '.voices[].name'

# Generate audio (Rachel voice)
curl -s -X POST \
  "https://api.elevenlabs.io/v1/text-to-speech/21m00Tcm4TlvDq8ikWAM" \
  -H "xi-api-key: $ELEVENLABS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "Your text here", "model_id": "eleven_monolingual_v1"}' \
  -o output.mp3

Usage Examples

"Read this out loud: Good morning" (immediate playback)

say "Good morning"

"Save 'Meeting starts in 5 minutes' to audio"

say "Meeting starts in 5 minutes" -o ~/Desktop/reminder.aiff

"Generate MP3 from this text"

say "Your text here" -o /tmp/tts_out.aiff
ffmpeg -y -i /tmp/tts_out.aiff ~/Desktop/output.mp3 2>/dev/null
echo "Saved: ~/Desktop/output.mp3"

"What voices are available?"

say -v ? | head -20

"Read this in Chinese"

say -v Mei-Jia "你好,歡迎使用語音服務"

Rules

  • say is always available on macOS — use it as default, no install check needed
  • For file output: default save to ~/Desktop/tts_output_<timestamp>.aiff
  • Convert to MP3 only if user requests it and ffmpeg is available
  • If user wants higher quality, suggest sherpa-onnx or ElevenLabs
  • For ElevenLabs, check ELEVENLABS_API_KEY is set before attempting API call
  • Never hardcode API keys — always read from environment variable
  • Long text (>500 words): warn user it may take a moment, especially for sherpa/ElevenLabs
  • For non-English, default to the appropriate system voice (Mei-Jia for ZH, Kyoko for JA)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.