agentleFS
crazynomadcrazynomad/skills/tts/SKILL.md

tts

Skill27 starsChanged 8 months agoMITView on GitHub

Text-to-speech and speech-to-text on Apple Silicon using Vox CLI (Qwen3-TTS + MLX)

  • Installs packages

27 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use Video Generation, VLM 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.
  • huang-x-hSkill

    Video Generation

    Implement AI-powered video generation capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to generate videos from text prompts or images, create video content programmatically, or build applications that produce video outputs. Supports asynchronous task management with status polling and result retrieval.

    Also in 6 projects that use this

  • huang-x-hSkill

    VLM

    Implement vision-based AI chat capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to analyze images, describe visual content, or create applications that combine image understanding with conversational AI. Supports image URLs and base64 encoded images for multimodal interactions.

    Also in 6 projects that use this

  • dav-niu474Skill

    gift-evaluator

    The PRIMARY tool for Spring Festival gift analysis and social interaction generation. Use this skill when users upload photos of gifts (alcohol, tea, supplements, etc.) to inquire about their value, authenticity, or how to respond socially. Integrates visual perception, market valuation, and HTML card generation.

    Also in 5 projects that use this

  • dav-niu474Skill

    Podcast Generate

    Generate podcast episodes from user-provided content or by searching the web for specified topics. If user uploads a text file/article, creates a dual-host dialogue podcast (or single-host upon request). If no content is provided, searches the web for information about the user-specified topic and generates a podcast. Duration scales with content size (3-20 minutes, ~240 chars/min). Uses z-ai-web-dev-sdk for LLM script generation and TTS audio synthesis. Outputs both a podcast script (Markdown) and a complete audio file (WAV).

    Also in 5 projects that use this

  • +2 more from huang-x-h
  • +6 more from dav-niu474

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 9 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 21 edited versions we read keep these.

  • 9

    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. Distinctive:

    Use this skill when users:

    line 16
  2. Distinctive:

    Ask for "TTS", "text to speech", "语音合成", "文字转语音", "朗读"

    line 18
  3. Distinctive:

    Ask for batch text-to-speech conversion

    line 22
  4. Distinctive:

    Daemon Mode: Keep models resident in memory for faster subsequent calls

    line 33
  5. Distinctive:

    100% Local: All processing runs on-device via MLX

    line 35
  6. Distinctive:

    When user requests TTS, STT, or voice cloning:

    line 211
  7. Very specific:

    Run vox voices to see all preset voices.

    line 252
  8. Distinctive:

    Model Inference: Run Qwen3-TTS model via MLX on Apple Silicon GPU

    line 265
  9. Distinctive:

    Audio Loading: Read audio file and resample if needed

    line 270
  10. Distinctive:

    Model Inference: Run Qwen3-ASR model via MLX

    line 271

“Common” is measured: kept by at least 6 in 10 of the 21 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

Vox TTS / STT (Apple Silicon)

Local text-to-speech, speech-to-text, and voice cloning powered by Qwen3-TTS/ASR + MLX on Apple Silicon.

Description

A powerful local TTS/STT skill based on Vox CLI that runs entirely on Apple Silicon Macs. Features speech synthesis with preset and custom voices, voice cloning from audio samples, speech recognition with subtitle generation, and batch processing. All models run locally via MLX - your data never leaves your machine.

When to Use

Use this skill when users:

  • Want to convert text to speech, "read this aloud", "generate audio from text"
  • Ask for "TTS", "text to speech", "语音合成", "文字转语音", "朗读"
  • Want to transcribe audio to text, "STT", "speech to text", "语音识别", "转录"
  • Need voice cloning from a sample, "clone this voice", "克隆声音"
  • Want to generate subtitles (SRT/VTT) from audio
  • Ask for batch text-to-speech conversion
  • Mention "vox" or "Qwen3-TTS"

Features

  • Text-to-Speech: Synthesize speech with 20+ preset voices
  • Speech-to-Text: Transcribe audio with word-level timestamps
  • Voice Cloning: Clone a voice from a 3+ second audio sample
  • Voice Design: Describe a voice in natural language and generate it
  • Subtitle Generation: Output SRT/VTT with word-level timestamps
  • Batch Processing: Process multiple texts in one model-load cycle
  • Daemon Mode: Keep models resident in memory for faster subsequent calls
  • Multiple Models: 0.6B (small/fast) and 1.7B (large/quality) parameter models
  • 100% Local: All processing runs on-device via MLX

Usage

Basic Syntax

python scripts/vox_tts.py speak "Hello, this is a test" [OPTIONS]
python scripts/vox_tts.py transcribe audio.wav [OPTIONS]
python scripts/vox_tts.py clone "Text to speak" --ref voice_sample.wav [OPTIONS]

Common Scenarios

Speak text with default voice:

python scripts/vox_tts.py speak "Hello world" -o ./output

Speak text and play immediately:

python scripts/vox_tts.py speak "Hello world" --play

Speak with a specific voice:

python scripts/vox_tts.py speak "Hello world" --voice Chelsie -o ./output

Speak with emotion/style instruction:

python scripts/vox_tts.py speak "I can't believe it!" --instruct "excited and surprised" -o ./output

Speak Chinese text:

python scripts/vox_tts.py speak "你好,世界" --voice Chelsie -o ./output

Clone a voice and speak:

python scripts/vox_tts.py clone "Text in the cloned voice" --ref sample.wav -o ./output

Register a cloned voice for reuse:

python scripts/vox_tts.py clone --ref sample.wav --register my-voice
python scripts/vox_tts.py speak "Now using my custom voice" --voice my-voice

Design a voice from description:

python scripts/vox_tts.py design "Hello everyone" --desc "A warm, friendly female voice with a slight British accent" -o ./output

Transcribe audio to text:

python scripts/vox_tts.py transcribe recording.wav

Transcribe with subtitles:

python scripts/vox_tts.py transcribe recording.wav --subtitle srt -o ./output

Batch TTS from file (one line per utterance):

python scripts/vox_tts.py batch texts.txt --voice Chelsie -o ./output

Use large model for higher quality:

python scripts/vox_tts.py speak "High quality speech" --model large -o ./output

List available voices:

python scripts/vox_tts.py voices

Arguments

speak - Text-to-Speech

ArgumentDescriptionDefault
textText to synthesize (required)-
-o, --outputOutput directoryCurrent directory
-v, --voiceVoice name (see voices command)Chelsie
-m, --modelModel size: small, large, large-hqsmall
-s, --speedSpeech speed multiplier1.0
-i, --instructEmotion/style instructionNone
--playPlay audio after generationFalse
--subtitleGenerate subtitle: srt or vttNone

transcribe - Speech-to-Text

ArgumentDescriptionDefault
audioAudio file path (required)-
-o, --outputOutput directoryCurrent directory
--subtitleOutput format: srt, vtt, jsonplain text
--languageSource languageauto-detect

clone - Voice Cloning

ArgumentDescriptionDefault
textText to synthesizeNone
--refReference audio file (3+ seconds, required)-
--registerRegister as reusable voice nameNone
-o, --outputOutput directoryCurrent directory

design - Voice Design

ArgumentDescriptionDefault
textText to synthesize (required)-
--descVoice description in natural language (required)-
-o, --outputOutput directoryCurrent directory

batch - Batch Processing

ArgumentDescriptionDefault
fileText file, one utterance per line (required)-
-v, --voiceVoice nameChelsie
-o, --outputOutput directoryCurrent directory

Dependencies

# Requirements: Apple Silicon Mac (M1/M2/M3/M4), Python 3.10+, macOS 13+

# Install via pipx (recommended, global CLI)
brew install pipx
pipx ensurepath
git clone https://github.com/3Craft/tts.git /tmp/vox-tts
cd /tmp/vox-tts && pipx install .

# Or install via pip in a venv
pip install -e /path/to/tts

# Optional: Chinese text support
pipx inject vox-cli 'misaki[zh]'

# Optional: Japanese text support
pipx inject vox-cli 'misaki[ja]'

Output Structure

Single TTS

OutputDir/
├── output.wav              # Generated audio
└── output.srt              # Subtitle (if --subtitle srt)

Batch TTS

OutputDir/
├── 001_first_line.wav
├── 002_second_line.wav
└── ...

Transcription

OutputDir/
├── recording.txt           # Plain text transcript
└── recording.srt           # Subtitle (if --subtitle srt)

Claude Integration

When user requests TTS, STT, or voice cloning:

  1. Read skill documentation:
    view("/mnt/skills/user/tts/SKILL.md")
  2. Check if vox is installed:
    python /mnt/skills/user/tts/scripts/vox_tts.py check
  3. Install if needed:
    brew install pipx && pipx ensurepath
    git clone https://github.com/3Craft/tts.git /tmp/vox-tts
    cd /tmp/vox-tts && pipx install .
  4. Execute command:
    # TTS
    python /mnt/skills/user/tts/scripts/vox_tts.py speak "TEXT" \
      --voice Chelsie -o /mnt/user-data/outputs
    
    # STT
    python /mnt/skills/user/tts/scripts/vox_tts.py transcribe audio.wav \
      -o /mnt/user-data/outputs
    
    # Voice cloning
    python /mnt/skills/user/tts/scripts/vox_tts.py clone "TEXT" \
      --ref sample.wav -o /mnt/user-data/outputs
  5. Present files to user:
    present_files(["/mnt/user-data/outputs/..."])

Available Voices

Run vox voices to see all preset voices. Some commonly used:

VoiceDescription
ChelsieDefault female voice
EthanMale voice

Custom voices can be registered via clone --register.

How It Works

TTS Workflow

  1. Text Processing: Tokenize and normalize input text
  2. Model Inference: Run Qwen3-TTS model via MLX on Apple Silicon GPU
  3. Audio Generation: Generate WAV audio at 24kHz
  4. Post-Processing: Apply speed adjustment, generate subtitles if requested

STT Workflow

  1. Audio Loading: Read audio file and resample if needed
  2. Model Inference: Run Qwen3-ASR model via MLX
  3. Decoding: Generate text with word-level timestamps
  4. Output: Format as plain text, SRT, VTT, or JSON

Under the Hood

  • Models are downloaded from HuggingFace on first use (~1-3 GB)
  • 8-bit quantization by default for memory efficiency
  • bf16 mode available via large-hq for highest quality
  • Daemon mode (vox serve) keeps models in memory for sub-second response

Common Issues

Q: First run is slow? A: Models are downloaded on first use (1-3 GB). Subsequent runs are much faster. Use daemon mode (vox serve) for instant response.

Q: "Not Apple Silicon" error? A: Vox CLI requires Apple Silicon (M1/M2/M3/M4). It uses MLX which only runs on Apple's Neural Engine.

Q: Chinese/Japanese text sounds wrong? A: Install language support: pipx inject vox-cli 'misaki[zh]' or pipx inject vox-cli 'misaki[ja]'

Q: Out of memory? A: Use the small model (default) instead of large. Close other apps to free memory.

Q: How to use a custom voice persistently? A: Register it: vox clone --ref sample.wav --register my-voice, then use --voice my-voice.

Example Conversations

User: "帮我把这段文字转成语音:今天天气真好"

Claude:

python /mnt/skills/user/tts/scripts/vox_tts.py speak "今天天气真好" \
  --voice Chelsie -o /mnt/user-data/outputs --play

User: "Transcribe this audio file to SRT subtitles"

Claude:

python /mnt/skills/user/tts/scripts/vox_tts.py transcribe recording.wav \
  --subtitle srt -o /mnt/user-data/outputs

User: "用这段录音克隆一个声音,然后用它朗读一段话"

Claude:

# Register the cloned voice
python /mnt/skills/user/tts/scripts/vox_tts.py clone \
  --ref sample.wav --register custom-voice

# Speak with the cloned voice
python /mnt/skills/user/tts/scripts/vox_tts.py speak "这是用克隆声音朗读的文字" \
  --voice custom-voice -o /mnt/user-data/outputs --play

Limitations

  • Apple Silicon only: Requires M1/M2/M3/M4 Mac (MLX dependency)
  • macOS 13+: Minimum OS version requirement
  • Memory: Large model needs ~4GB RAM; small model ~2GB
  • Languages: Best quality for English and Chinese; other languages may vary
  • Voice cloning: Requires 3+ seconds of clear speech reference audio

Version History

v1.0 (Current)

  • Initial release wrapping Vox CLI v0.3.3
  • TTS, STT, voice cloning, voice design
  • Batch processing and subtitle generation
  • Daemon mode support

References

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.