一键导入
mlx-tts
Use when needing to generate speech audio from text files on Apple Silicon Mac using Qwen3-TTS (MLX framework, fast, prompt-based voice design)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when needing to generate speech audio from text files on Apple Silicon Mac using Qwen3-TTS (MLX framework, fast, prompt-based voice design)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when the user wants to learn a new topic quickly, understand a complex subject, study for an exam, prepare a learning plan, or use accelerated learning techniques. Trigger phrases: "learn fast", "blitz", "understand quickly", "study guide", "learning roadmap", "master [topic]", "spaced repetition", "active recall", "Feynman technique", "first principles".
文本去AI味技能。用 "检测→删除→声纹校准→改写→反查" 五步法去除文字中的AI痕迹,保留真实人味。触发场景:用户说"去AI味""太像AI写的""帮我润色得更像人写的""有机器味""不够自然";用户给了一段文字让你改写得更口语化、更有个性、更有"活人感";用户抱怨内容有宣传腔、公文腔、爆款腔、PPT腔、假人味;任何需要让文字听起来不像AI生成的场景。
从 URL 或文本内容生成可定制样式的信息卡片图片。智能分析内容结构,动态选择最适合的视觉呈现方式。默认输出与原文同语言的单语卡片到 ~/Downloads/infocard-img/。使用方法:/infocard <URL|文本> [--theme=slate|ocean|sunset|coral|indigo|forest|dark|purple] [--width=1080] [--lang=auto|zh|en|both]
Translate video/audio content into another language with dubbed voice and synchronized subtitles. Use this skill whenever the user asks to: translate a video, dub a video, generate foreign-language voiceover for a video, add translated subtitles with dubbed audio, or any workflow involving ASR → translate → TTS → video composition.
阅读理解图片或文本内容,生成社交媒体爆款标题、评论描述和标签。内置去AI味处理,确保输出通过AI检测。使用方法:/viral-hook [图片路径或文本],支持 /viral-hook --platform=<小红书|微博|twitter|朋友圈> --style=<悬念|数据|对比|情绪|反常识> --count=3
全自动安装和配置 Hermes Agent(NousResearch)——从零开始,7 天搭建一个 自我进化的 AI 个人 Operator。涵盖安装、身份/SOUL.md、模型选择、记忆系统、 消息网关(Telegram/Discord/Slack/WhatsApp)、Skills 技能系统、Cron 定时任务、 /goal 自主执行、Dashboard/Kanban、多 Profile 隔离、安全配置。 综合 @zaimiri 7日指南 + @PrajwalTomar_ 深度剖析 + 官方文档最佳实践。 Use when the user asks to install/setup/configure Hermes Agent, deploy a personal AI agent, "搭建 Hermes", or any request about NousResearch's agent.
| name | mlx-tts |
| description | Use when needing to generate speech audio from text files on Apple Silicon Mac using Qwen3-TTS (MLX framework, fast, prompt-based voice design) |
High-quality local text-to-speech synthesis for Apple Silicon Macs using Qwen3-TTS via MLX framework. Optimized for Apple Neural Engine, runs entirely on-device.
Qwen3-TTS is a 1.7B parameter TTS model optimized for Apple Silicon (M1/M2/M3/M4) using the MLX framework. Features:
brew install ffmpeg uv && uv tool install --force "mlx-audio" --prerelease=allow
uv tool list | grep mlx
# Should show: mlx-audio v0.4.2
Models auto-download on first run (~2GB total) to ~/.cache/huggingface/hub/:
mlx-community/Qwen3-TTS-12Hz-1.7B-VoiceDesign-8bitmlx-community/Qwen3-ASR-0.6B-bf16For China users (accelerated download):
Option 1 - HuggingFace mirror:
export HF_ENDPOINT=https://hf-mirror.com
Option 2 - ModelScope (faster):
pip install modelscope
# Download TTS model
modelscope download \
--model mlx-community/Qwen3-TTS-12Hz-1.7B-VoiceDesign-8bit \
--local_dir ~/.cache/huggingface/hub/Qwen3-TTS
# Download ASR model
modelscope download \
--model mlx-community/Qwen3-ASR-0.6B-bf16 \
--local_dir ~/.cache/huggingface/hub/Qwen3-ASR
mlx_audio.tts.generate \
--text "你好,这是本地 TTS 测试" \
--output-path ./output.wav
mlx_audio.tts.generate \
--text "我是明日香" \
--instruct "a confident teenage girl, flirtatious, seductive edge" \
--output-path ./asuka.wav
| Style | Prompt |
|---|---|
| 自信少女 | "a confident teenage girl, German-Japanese, EVA pilot" |
| 温柔女声 | "a warm, gentle female voice, slightly soft" |
| 磁性男声 | "a deep, masculine voice with authority" |
| 儿童声音 | "a cheerful little child, about 5 years old" |
| 新闻播报 | "a professional news anchor, clear and authoritative" |
| 温柔妈妈 | "a caring mother, warm and soothing" |
| 神秘低语 | "a mysterious whisper, soft and intimate, close to microphone" |
| 激动演讲 | "an energetic public speaker, passionate and enthusiastic" |
| 悲伤叙述 | "a melancholic storyteller, slow and reflective" |
Delivery Instructions (Qwen3-TTS supports these):
"speak slowly and clearly""whisper gently""speak with excitement""calm and soothing tone""fast-paced, energetic delivery"Combine multiple descriptors:
--instruct "a warm female voice, slightly soft, speak slowly with gentle pauses"
For texts longer than ~500 characters, use auto-chunking to avoid memory issues:
Option 1: Manual script
# Split text into sentences and generate separately
python3 << 'EOF'
import subprocess
import re
text = """Your long text here... Multiple sentences."""
# Split by sentence boundaries
sentences = re.split(r'(?<=[。!?.!?])\s+', text)
chunks = []
current_chunk = ""
for sent in sentences:
if len(current_chunk) + len(sent) < 300: # Max 300 chars per chunk
current_chunk += sent
else:
if current_chunk:
chunks.append(current_chunk)
current_chunk = sent
if current_chunk:
chunks.append(current_chunk)
# Generate each chunk
for i, chunk in enumerate(chunks):
subprocess.run([
"mlx_audio.tts.generate",
"--text", chunk,
"--instruct", "a warm, gentle female voice",
"--output-path", f"./chunk_{i:03d}.wav"
])
print(f"Generated {len(chunks)} chunks. Use ffmpeg to concatenate.")
EOF
Option 2: Concatenate with ffmpeg
# After generating chunks, merge them
ffmpeg -i "concat:$(echo chunk_*.wav | tr ' ' '|')" -acodec copy final_output.wav
# Or with crossfade (smooth transition)
ffmpeg -f concat -safe 0 -i <(for f in chunk_*.wav; do echo "file '$PWD/$f'"; done) -c copy output.wav
mlx_audio.stt.generate \
--audio ./input.wav \
--output-path ./transcript.txt \
--language zh
Long audio (auto-chunking):
mlx_audio.stt.generate \
--audio /path/to/long_audio.m4a \
--output-path ./transcript.txt \
--format txt \
--language zh \
--chunk-duration 30
Batch TTS from file list:
# Create text file with lines to synthesize
cat > texts.txt << 'EOF'
第一行要转换的文字
第二行要转换的文字
第三行要转换的文字
EOF
# Process each line
while IFS= read -r line; do
safe_name=$(echo "$line" | tr -cd '[:alnum:]\n' | cut -c1-20)
mlx_audio.tts.generate \
--text "$line" \
--instruct "a professional news anchor" \
--output-path "./output/${safe_name}.wav"
done < texts.txt
Batch ASR:
# Batch convert all audio files in directory
for f in *.wav; do
mlx_audio.stt.generate \
--audio "$f" \
--output-path "${f%.wav}.txt" \
--language zh
done
While mlx-audio doesn't have built-in effects like Voicebox, you can use ffmpeg:
Pitch Shift (音色调整):
# Raise pitch by 2 semitones (更尖声)
ffmpeg -i input.wav -af "asetrate=48000*1.12,aresample=48000" output_high.wav
# Lower pitch by 2 semitones (更低沉)
ffmpeg -i input.wav -af "asetrate=48000*0.89,aresample=48000" output_low.wav
Add Reverb (混响):
ffmpeg -i input.wav -af "aecho=0.8:0.9:1000:0.3" output_reverb.wav
Speed Control (语速):
# Speed up 1.2x (更快)
ffmpeg -i input.wav -af "atempo=1.2" output_fast.wav
# Slow down 0.8x (更慢)
ffmpeg -i input.wav -af "atempo=0.8" output_slow.wav
Volume Normalize (音量标准化):
ffmpeg -i input.wav -af "loudnorm" output_normalized.wav
Convert Format (格式转换):
# WAV to MP3
ffmpeg -i input.wav -b:a 192k output.mp3
# WAV to AAC (for Apple devices)
ffmpeg -i input.wav -c:a aac -b:a 192k output.m4a
# WAV to FLAC (lossless compression)
ffmpeg -i input.wav output.flac
Create ~/bin/tts.sh for quick TTS:
#!/bin/bash
TEXT="${1:-"Hello, Human!"}"
INSTRUCT="${2:-"a confident teenage girl with a flirtatious, seductive edge"}"
OUTPUT_DIR=./voice_output
mkdir -p "$OUTPUT_DIR"
mlx_audio.tts.generate \
--text "$TEXT" \
--instruct "$INSTRUCT" \
--output-path "$OUTPUT_DIR/output.wav" \
--audio-format wav
echo "Generated: $OUTPUT_DIR/output.wav"
Make executable and use:
chmod +x ~/bin/tts.sh
# Usage
tts.sh "要转换的文字"
tts.sh "要转换的文字" "a warm, gentle female voice"
Create ~/bin/tts-advanced.sh with more features:
#!/bin/bash
# TTS with auto-chunking for long texts
TEXT="${1:-"Hello"}"
VOICE="${2:-"a warm, gentle female voice"}"
OUTPUT="${3:-"./output.wav"}"
MAX_CHARS=300
# Check if text needs chunking
if [ ${#TEXT} -le $MAX_CHARS ]; then
# Short text - direct generation
mlx_audio.tts.generate \
--text "$TEXT" \
--instruct "$VOICE" \
--output-path "$OUTPUT"
echo "Generated: $OUTPUT"
else
# Long text - need chunking
echo "Text too long (${#TEXT} chars), auto-chunking..."
# Create temp directory
TMPDIR=$(mktemp -d)
# Split by sentences (simplified)
echo "$TEXT" | fold -w $MAX_CHARS -s | split -l 1 - "$TMPDIR/chunk_"
# Generate each chunk
i=0
for chunk in "$TMPDIR"/chunk_*; do
CHUNK_TEXT=$(cat "$chunk")
[ -z "$CHUNK_TEXT" ] && continue
mlx_audio.tts.generate \
--text "$CHUNK_TEXT" \
--instruct "$VOICE" \
--output-path "$TMPDIR/part_$(printf "%03d" $i).wav"
i=$((i+1))
done
# Concatenate with ffmpeg
ffmpeg -f concat -safe 0 -i \
<(for f in "$TMPDIR"/part_*.wav; do echo "file '$f'"; done) \
-c copy "$OUTPUT"
# Cleanup
rm -rf "$TMPDIR"
echo "Generated: $OUTPUT"
fi
| Feature | Voicebox | MLX-TTS (Qwen3-TTS) |
|---|---|---|
| Platform | macOS/Windows/Linux | Apple Silicon only |
| GUI | ✅ Desktop app | ❌ CLI only |
| Multi-engine | 5 engines (Qwen3, Lux, Chatterbox, TADA) | Qwen3-TTS only |
| Voice cloning | ✅ From reference audio | ❌ Prompt-based only |
| Effects | Built-in (reverb, pitch, delay) | ffmpeg post-processing |
| Timeline editor | ✅ Stories editor | ❌ |
| Batch processing | ✅ | Script-based |
| API | REST API | ❌ |
| Setup | Download DMG/MSI | One-command install |
| Speed | Fast | Fast (MLX optimized) |
| Memory | Configurable | ~8GB |
| Privacy | Local | Local |
When to use Voicebox:
When to use MLX-TTS:
brew install)| Task | Command |
|---|---|
| Basic TTS | mlx_audio.tts.generate --text "Hello" --output out.wav |
| With voice design | Add --instruct "voice description" |
| ASR | mlx_audio.stt.generate --audio in.wav --output out.txt |
| Long audio ASR | Add --chunk-duration 30 |
| Batch TTS | See "Batch Processing" section |
| Pitch shift | Use ffmpeg: -af "asetrate=48000*1.12,aresample=48000" |
| Change format | Use ffmpeg: -i input.wav -b:a 192k output.mp3 |
--audio-format wav|mp3|flacNote: mlx-audio outputs WAV by default. Convert to other formats with ffmpeg:
# High-quality MP3
ffmpeg -i input.wav -b:a 256k output.mp3
# AAC for Apple devices
ffmpeg -i input.wav -c:a aac -b:a 256k output.m4a
# FLAC for lossless
ffmpeg -i input.wav output.flac
# OGG Vorbis
ffmpeg -i input.wav -c:a libvorbis -q:a 6 output.ogg
--format txt: Plain text (default)--format json: JSON with timestamps--format srt: Subtitle format# Create consistent narrator voice
VOICE="a warm, articulate narrator, clear and engaging"
# Generate chapters
for chapter in {1..10}; do
mlx_audio.tts.generate \
--text "Chapter $chapter" \
--instruct "a professional announcer, clear and authoritative" \
--output-path "./podcast/chapter_${chapter}_title.wav"
mlx_audio.tts.generate \
--text "$(cat chapter_${chapter}.txt)" \
--instruct "$VOICE" \
--output-path "./podcast/chapter_${chapter}_content.wav"
done
# Merge with ffmpeg
ffmpeg -f concat -safe 0 -i <(for f in ./podcast/*.wav; do echo "file '$PWD/$f'"; done) -c copy audiobook.wav
# Character A (confident young woman)
mlx_audio.tts.generate \
--text "I'll take care of this." \
--instruct "a confident teenage girl, slightly energetic" \
--output-path ./voice_a.wav
# Character B (elderly wise man)
mlx_audio.tts.generate \
--text "Be careful, my child." \
--instruct "an elderly male voice, wise and gentle, slower pace" \
--output-path ./voice_b.wav
# Character C (robot/AI)
mlx_audio.tts.generate \
--text "Processing complete." \
--instruct "a synthetic robotic voice, monotone, slightly metallic" \
--output-path ./voice_c.wav
# Add robotic effect with ffmpeg
ffmpeg -i voice_c.wav -af "asetrate=48000*0.95,aresample=48000,aecho=0.6:0.4:300:0.5" voice_c_robot.wav
Create reusable voice templates:
# Save templates in a file
cat > ~/voice_templates.txt << 'EOF'
narration=a warm, articulate narrator, clear and engaging, moderate pace
news=a professional news anchor, clear and authoritative, precise diction
friendly=a friendly, approachable voice, warm and inviting
teacher=a patient educator, clear and encouraging, moderate pace
storyteller=a mysterious storyteller, dramatic and engaging
calm=a soothing, meditative voice, very slow and gentle
excited=a highly energetic voice, fast-paced and enthusiastic
dramatic=a theatrical voice, expressive and emotional
EOF
# Usage
VOICE=$(grep "^narration=" ~/voice_templates.txt | cut -d'=' -f2)
mlx_audio.tts.generate \
--text "Your text here" \
--instruct "$VOICE" \
--output-path output.wav
| Issue | Solution |
|---|---|
| Model download fails/timeout | Use HF_ENDPOINT=https://hf-mirror.com or ModelScope |
| Memory不足 (OOM) | Model already 8-bit quantized; close other apps; use chunking for long text |
| Command not found | Restart terminal or run uv tool update-shell |
| Audio format not supported | Convert: ffmpeg -i input.mp3 output.wav |
| M1/M2 errors | Ensure macOS 14.0+; MLX requires Apple Silicon |
| Model path error | Use absolute path or realpath |
| Poor voice quality | Try different --instruct prompts; simpler is often better |
| Audio cuts off | Text too long; use auto-chunking for >500 chars |
| Pronunciation issues | Use phonetic spelling or hyphens: "AI" → "A I", "COVID" → "Co-vid" |
# Verbose output
mlx_audio.tts.generate --verbose --text "Hello" --output test.wav
# Check model cache
ls -la ~/.cache/huggingface/hub/ | grep mlx
# Check disk space
df -h ~/.cache/huggingface/
# Test with minimal text
mlx_audio.tts.generate --text "Test" --output /tmp/test.wav