简介
基于 ElevenLabs API 的专业语音合成工具包,提供18种声音角色、32语言支持、AI音效生成与自定义语音设计,适合内容创作者与开发者。
原始描述
High-quality voice synthesis with 18 personas, 32 languages, sound effects, batch processing, and voice design using ElevenLabs API.
通过你的 Agent 添加
安装目录:elevenlabs-voices/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
ElevenLabs Voice Personas 是一套完整的语音合成解决方案,通过 CLI 脚本与 Python API 提供多维度音频生成能力。
基础 TTS:python3 scripts/tts.py --text "内容" --voice rachel --output file.mp3,支持18种预设角色(如 Rachel、Adam、George)及10+快捷预设(narrator、professional、broadcaster 等)。
多语言合成:使用 --lang 参数覆盖32种语言,包括中日韩、欧洲主要语种及阿拉伯语、印地语等,基于 eleven_multilingual_v2 模型。
高级功能:
- 流式生成:
--stream标志实现实时音频输出,适合长文本场景 - 批量处理:JSON 或纯文本列表批量转换,支持每行独立配置不同声音
- AI 音效:
sfx.py根据文本描述生成0.5-22秒环境音效(如"机械键盘敲击声") - 语音设计:
voice-design.py通过性别、年龄、口音等参数创建定制声音并保存至库 - 发音词典:
pronunciations.json自定义词汇发音规则
成本监控:内置字符用量统计与分级定价估算(Starter $0.30/千字符至 Scale $0.11/千字符),支持月度预算限制。
显著优点
- 声音质量行业领先:ElevenLabs 的语音克隆与自然度被广泛认为是商业 TTS 顶级水准
- 角色化设计明确:18种声音附带人格标签(warm、storyteller、trustworthy),降低选择成本
- 工作流整合完善:从设置向导、批量处理到 OpenClaw 内置 TTS 集成,覆盖开发到生产
- 隐私设计合理:API 密钥仅本地存储,自动排除版本控制
潜在局限
- 商业成本敏感:高频使用场景下(如有声书制作)API 费用累积显著,需配合成本追踪
- 网络依赖性强:所有合成实时调用云端 API,离线不可用
- 声音定制深度有限:Voice Design 生成的是"新声音"而非精确克隆特定真人
- 中文支持质量参差:多语言模型对中文的韵律自然度弱于英语母语优化
适合人群
用户类型
典型场景
内容创作者
YouTube 配音、播客多角色演绎、社交媒体短视频
开发者/产品经理
应用内语音提示、IVR 系统、游戏 NPC 对话
有声书制作人
批量章节转换、多角色区分朗读
教育工作者
多语言教学材料、无障碍内容制作
营销团队
品牌声音一致性维护、广告旁白 A/B 测试
常规风险
风险类型
说明
缓解建议
API 密钥泄露
环境变量或 .env 文件配置不当
使用专用密钥、定期轮换、避免硬编码
成本超支
未设置预算上限的高频调用
启用 --stats 监控,配置月度限额
合规争议
AI 语音可能触及深度伪造伦理边界
明确标注合成内容,获得 voice-clone 授权
服务中断
ElevenLabs 平台可用性影响业务
关键场景保留本地 TTS 降级方案
数据跨境
音频内容传输至 ElevenLabs 服务器
敏感内容评估本地部署替代方案
- 商业成本敏感:高频使用场景下(如有声书制作)API 费用累积显著,需配合成本追踪
- 网络依赖性强:所有合成实时调用云端 API,离线不可用
- 声音定制深度有限:Voice Design 生成的是"新声音"而非精确克隆特定真人
- 中文支持质量参差:多语言模型对中文的韵律自然度弱于英语母语优化
适合人群
用户类型
典型场景
内容创作者
YouTube 配音、播客多角色演绎、社交媒体短视频
开发者/产品经理
应用内语音提示、IVR 系统、游戏 NPC 对话
有声书制作人
批量章节转换、多角色区分朗读
教育工作者
多语言教学材料、无障碍内容制作
营销团队
品牌声音一致性维护、广告旁白 A/B 测试
常规风险
风险类型
说明
缓解建议
API 密钥泄露
环境变量或 .env 文件配置不当
使用专用密钥、定期轮换、避免硬编码
成本超支
未设置预算上限的高频调用
启用 --stats 监控,配置月度限额
合规争议
AI 语音可能触及深度伪造伦理边界
明确标注合成内容,获得 voice-clone 授权
服务中断
ElevenLabs 平台可用性影响业务
关键场景保留本地 TTS 降级方案
数据跨境
音频内容传输至 ElevenLabs 服务器
敏感内容评估本地部署替代方案
| 用户类型 | 典型场景 |
|---|---|
| 内容创作者 | YouTube 配音、播客多角色演绎、社交媒体短视频 |
| 开发者/产品经理 | 应用内语音提示、IVR 系统、游戏 NPC 对话 |
| 有声书制作人 | 批量章节转换、多角色区分朗读 |
| 教育工作者 | 多语言教学材料、无障碍内容制作 |
| 营销团队 | 品牌声音一致性维护、广告旁白 A/B 测试 |
| 风险类型 | 说明 | 缓解建议 |
|---|---|---|
| API 密钥泄露 | 环境变量或 .env 文件配置不当 |
使用专用密钥、定期轮换、避免硬编码 |
| 成本超支 | 未设置预算上限的高频调用 | 启用 --stats 监控,配置月度限额 |
| 合规争议 | AI 语音可能触及深度伪造伦理边界 | 明确标注合成内容,获得 voice-clone 授权 |
| 服务中断 | ElevenLabs 平台可用性影响业务 | 关键场景保留本地 TTS 降级方案 |
| 数据跨境 | 音频内容传输至 ElevenLabs 服务器 | 敏感内容评估本地部署替代方案 |
技能正文
name: elevenlabs-voices
version: 2.2.0
description: High-quality voice synthesis with 18 personas, 32 languages, sound effects, batch processing, and voice design using ElevenLabs API.
tags: [tts, voice, speech, elevenlabs, audio, sound-effects, voice-design, multilingual]
metadata:
openclaw:
requires:
bins: ["python3"]
primaryEnv: ELEVEN_API_KEY
envVars:
- name: ELEVEN_API_KEY
required: false
description: "ElevenLabs API key used by this skill's scripts."
- name: ELEVENLABS_API_KEY
required: false
description: "Accepted alias. Also the variable OpenClaw's built-in TTS reads."
note: "Set ELEVEN_API_KEY or ELEVENLABS_API_KEY - the scripts accept either. OpenClaw has no way to require one-of-two environment variables, so the skill loads without a key and the scripts fail on the first call if none is set. OpenClaw built-in TTS reads ELEVENLABS_API_KEY or XI_API_KEY."
ElevenLabs Voice Personas v2.2
Comprehensive voice synthesis toolkit using ElevenLabs API.
🚀 First Run - Setup Wizard
When you first use this skill (no config.json exists), run the interactive setup wizard:
python3 scripts/setup.py
The wizard will guide you through:
- API Key - Enter your ElevenLabs API key (required)
- Default Voice - Choose from popular voices (Rachel, Adam, Bella, etc.)
- Language - Set your preferred language (32 supported)
- Audio Quality - Standard or high quality output
- Cost Tracking - Enable usage and cost monitoring
- Budget Limit - Optional monthly spending cap
🔒 Privacy: Your API key is stored locally in config.json only. It never leaves your machine and is automatically excluded from git via .gitignore.
To reconfigure at any time, simply run the setup wizard again.
✨ Features
- 18 Voice Personas - Carefully curated voices for different use cases
- 32 Languages - Multi-language synthesis with the multilingual v2 model
- Streaming Mode - Real-time audio output as it generates
- Sound Effects (SFX) - AI-generated sound effects from text prompts
- Batch Processing - Process multiple texts in one go
- Cost Tracking - Monitor character usage and estimated costs
- Voice Design - Create custom voices from descriptions
- Pronunciation Dictionary - Custom word pronunciation rules
- OpenClaw Integration - Works with OpenClaw's built-in TTS
🎙 Available Voices
Voice
Accent
Gender
Persona
Best For
rachel
🇺🇸 US
female
warm
Conversations, tutorials
adam
🇺🇸 US
male
narrator
Documentaries, audiobooks
bella
🇺🇸 US
female
professional
Business, presentations
brian
🇺🇸 US
male
comforting
Meditation, calm content
george
🇬🇧 UK
male
storyteller
Audiobooks, storytelling
alice
🇬🇧 UK
female
educator
Tutorials, explanations
callum
🇺🇸 US
male
trickster
Playful, gaming
charlie
🇦🇺 AU
male
energetic
Sports, motivation
jessica
🇺🇸 US
female
playful
Social media, casual
lily
🇬🇧 UK
female
actress
Drama, elegant content
matilda
🇺🇸 US
female
professional
Corporate, news
river
🇺🇸 US
neutral
neutral
Inclusive, informative
roger
🇺🇸 US
male
casual
Podcasts, relaxed
daniel
🇬🇧 UK
male
broadcaster
News, announcements
eric
🇺🇸 US
male
trustworthy
Business, corporate
chris
🇺🇸 US
male
friendly
Tutorials, approachable
will
🇺🇸 US
male
optimist
Motivation, uplifting
liam
🇺🇸 US
male
social
YouTube, social media
🎯 Quick Presets
default → rachel (warm, friendly)
narrator → adam (documentaries)
professional → matilda (corporate)
storyteller → george (audiobooks)
educator → alice (tutorials)
calm → brian (meditation)
energetic → liam (social media)
trustworthy → eric (business)
neutral → river (inclusive)
british → george
australian → charlie
broadcaster → daniel (news)
🌍 Supported Languages (32)
| Voice | Accent | Gender | Persona | Best For |
|---|---|---|---|---|
| rachel | 🇺🇸 US | female | warm | Conversations, tutorials |
| adam | 🇺🇸 US | male | narrator | Documentaries, audiobooks |
| bella | 🇺🇸 US | female | professional | Business, presentations |
| brian | 🇺🇸 US | male | comforting | Meditation, calm content |
| george | 🇬🇧 UK | male | storyteller | Audiobooks, storytelling |
| alice | 🇬🇧 UK | female | educator | Tutorials, explanations |
| callum | 🇺🇸 US | male | trickster | Playful, gaming |
| charlie | 🇦🇺 AU | male | energetic | Sports, motivation |
| jessica | 🇺🇸 US | female | playful | Social media, casual |
| lily | 🇬🇧 UK | female | actress | Drama, elegant content |
| matilda | 🇺🇸 US | female | professional | Corporate, news |
| river | 🇺🇸 US | neutral | neutral | Inclusive, informative |
| roger | 🇺🇸 US | male | casual | Podcasts, relaxed |
| daniel | 🇬🇧 UK | male | broadcaster | News, announcements |
| eric | 🇺🇸 US | male | trustworthy | Business, corporate |
| chris | 🇺🇸 US | male | friendly | Tutorials, approachable |
| will | 🇺🇸 US | male | optimist | Motivation, uplifting |
| liam | 🇺🇸 US | male | social | YouTube, social media |
🎯 Quick Presets
default → rachel (warm, friendly)
narrator → adam (documentaries)
professional → matilda (corporate)
storyteller → george (audiobooks)
educator → alice (tutorials)
calm → brian (meditation)
energetic → liam (social media)
trustworthy → eric (business)
neutral → river (inclusive)
british → george
australian → charlie
broadcaster → daniel (news)
🌍 Supported Languages (32)
default → rachel (warm, friendly)narrator → adam (documentaries)professional → matilda (corporate)storyteller → george (audiobooks)educator → alice (tutorials)calm → brian (meditation)energetic → liam (social media)trustworthy → eric (business)neutral → river (inclusive)british → georgeaustralian → charliebroadcaster → daniel (news)The multilingual v2 model supports these languages:
| Code | Language | Code | Language |
|---|---|---|---|
| en | English | pl | Polish |
| de | German | nl | Dutch |
| es | Spanish | sv | Swedish |
| fr | French | da | Danish |
| it | Italian | fi | Finnish |
| pt | Portuguese | no | Norwegian |
| ru | Russian | tr | Turkish |
| uk | Ukrainian | cs | Czech |
| ja | Japanese | sk | Slovak |
| ko | Korean | hu | Hungarian |
| zh | Chinese | ro | Romanian |
| ar | Arabic | bg | Bulgarian |
| hi | Hindi | hr | Croatian |
| ta | Tamil | el | Greek |
| id | Indonesian | ms | Malay |
| vi | Vietnamese | th | Thai |
# Synthesize in German
python3 tts.py --text "Guten Tag!" --voice rachel --lang de
# Synthesize in French
python3 tts.py --text "Bonjour le monde!" --voice adam --lang fr
# List all languages
python3 tts.py --languages
💻 CLI Usage
Basic Text-to-Speech
# List all voices
python3 scripts/tts.py --list
# Generate speech
python3 scripts/tts.py --text "Hello world" --voice rachel --output hello.mp3
# Use a preset
python3 scripts/tts.py --text "Breaking news..." --voice broadcaster --output news.mp3
# Multi-language
python3 scripts/tts.py --text "Bonjour!" --voice rachel --lang fr --output french.mp3
Streaming Mode
Generate audio with real-time streaming (good for long texts):
# Stream audio as it generates
python3 scripts/tts.py --text "This is a long story..." --voice adam --stream
# Streaming with custom output
python3 scripts/tts.py --text "Chapter one..." --voice george --stream --output chapter1.mp3
Batch Processing
Process multiple texts from a file:
# From newline-separated text file
python3 scripts/tts.py --batch texts.txt --voice rachel --output-dir ./audio
# From JSON file
python3 scripts/tts.py --batch batch.json --output-dir ./output
JSON batch format:
[
{"text": "First line", "voice": "rachel", "output": "line1.mp3"},
{"text": "Second line", "voice": "adam", "output": "line2.mp3"},
{"text": "Third line"}
]
Simple text format (one per line):
Hello, this is the first sentence.
This is the second sentence.
And this is the third.
Usage Statistics
# Show usage stats and cost estimates
python3 scripts/tts.py --stats
# Reset statistics
python3 scripts/tts.py --reset-stats
🎵 Sound Effects (SFX)
# Show usage stats and cost estimates
python3 scripts/tts.py --stats
# Reset statistics
python3 scripts/tts.py --reset-stats
Generate AI-powered sound effects from text descriptions:
# Generate a sound effect
python3 scripts/sfx.py --prompt "Thunder rumbling in the distance"
# With specific duration (0.5-22 seconds)
python3 scripts/sfx.py --prompt "Cat meowing" --duration 3 --output cat.mp3
# Adjust prompt influence (0.0-1.0)
python3 scripts/sfx.py --prompt "Footsteps on gravel" --influence 0.5
# Batch SFX generation
python3 scripts/sfx.py --batch sounds.json --output-dir ./sfx
# Show prompt examples
python3 scripts/sfx.py --examples
Example prompts:
- "Thunder rumbling in the distance"
- "Cat purring contentedly"
- "Typing on a mechanical keyboard"
- "Spaceship engine humming"
- "Coffee shop background chatter"
🎨 Voice Design
Create custom voices from text descriptions:
# Basic voice design
python3 scripts/voice-design.py --gender female --age middle_aged --accent american \
--description "A warm, motherly voice"
# With custom preview text
python3 scripts/voice-design.py --gender male --age young --accent british \
--text "Welcome to the adventure!" --output preview.mp3
# Save to your ElevenLabs library
python3 scripts/voice-design.py --gender female --age young --accent american \
--description "Energetic podcast host" --save "MyHost"
# List all design options
python3 scripts/voice-design.py --options
Voice Design Options:
| Option | Values |
|---|---|
| Gender | male, female, neutral |
| Age | young, middle_aged, old |
| Accent | american, british, african, australian, indian, latin, middle_eastern, scandinavian, eastern_european |
| Accent Strength | 0.3-2.0 (subtle to strong) |
📖 Pronunciation Dictionary
Customize how words are pronounced:
Edit pronunciations.json:
{
"rules": [
{
"word": "OpenClaw",
"replacement": "Open Claw",
"comment": "Pronounce as two words"
},
{
"word": "API",
"replacement": "A P I",
"comment": "Spell out acronym"
}
]
}
Usage:
# Pronunciations are applied automatically
python3 scripts/tts.py --text "The OpenClaw API is great" --voice rachel
# Disable pronunciations
python3 scripts/tts.py --text "The API is great" --voice rachel --no-pronunciations
💰 Cost Tracking
The skill tracks your character usage and estimates costs:
python3 scripts/tts.py --stats
Output:
📊 ElevenLabs Usage Statistics
Total Characters: 15,230
Total Requests: 42
Since: 2024-01-15
💰 Estimated Costs:
Starter $4.57 ($0.30/1k chars)
Creator $3.66 ($0.24/1k chars)
Pro $2.74 ($0.18/1k chars)
Scale $1.68 ($0.11/1k chars)
🤖 OpenClaw TTS Integration
Using with OpenClaw's Built-in TTS
OpenClaw has built-in TTS that can use ElevenLabs. This is separate from the scripts in this skill - configuring one does not affect the other.
Provider settings live under tts.providers.<name>, not in a tts.elevenlabs block.
Configure in ~/.openclaw/openclaw.json:
{
"tts": {
"enabled": true,
"auto": "off",
"provider": "elevenlabs",
"providers": {
"elevenlabs": {
"apiKey": { "source": "env", "provider": "elevenlabs", "id": "ELEVENLABS_API_KEY" }
}
}
}
}
apiKey also accepts a plain string. OpenClaw's own TTS reads ELEVENLABS_API_KEY or
XI_API_KEY - not ELEVEN_API_KEY, which is the variable this skill's scripts use. Set
both if you want both paths working.
Voice and model selection belong to the TTS persona configuration under tts.personas.
Run openclaw config schema on your install for the fields it accepts, and
openclaw doctor --fix to convert an older tts.elevenlabs block.
Triggering TTS in Chat
In OpenClaw conversations:
- Use
/tts onto enable automatic TTS - Use the
ttstool directly for one-off speech - Request "read this aloud" or "speak this"
Using Skill Scripts from OpenClaw
# OpenClaw can run these scripts directly
exec python3 /path/to/skills/elevenlabs-voices/scripts/tts.py --text "Hello" --voice rachel
⚙ Configuration
# OpenClaw can run these scripts directly
exec python3 /path/to/skills/elevenlabs-voices/scripts/tts.py --text "Hello" --voice rachel
The scripts look for API key in this order:
ELEVEN_API_KEYorELEVENLABS_API_KEYenvironment variable- Skill-local
.envfile (in the skill directory)
Create .env file:
echo 'ELEVEN_API_KEY=your-key-here' > .env
Note: The skill no longer reads from
~/.openclaw/openclaw.json. Use environment variables or the skill-local.envfile.
🎛 Voice Settings
Each voice has tuned settings for optimal output:
| Setting | Range | Description |
|---|---|---|
| stability | 0.0-1.0 | Higher = consistent, lower = expressive |
| similarity_boost | 0.0-1.0 | How closely to match original voice |
| style | 0.0-1.0 | Exaggeration of speaking style |
📝 Triggers
- "use {voice_name} voice"
- "speak as {persona}"
- "list voices"
- "voice settings"
- "generate sound effect"
- "design a voice"
📁 Files
elevenlabs-voices/
├── SKILL.md # This documentation
├── README.md # Quick start guide
├── config.json # Your local config (created by setup, in .gitignore)
├── voices.json # Voice definitions & settings
├── pronunciations.json # Custom pronunciation rules
├── examples.md # Detailed usage examples
├── scripts/
│ ├── setup.py # Interactive setup wizard
│ ├── tts.py # Main TTS script
│ ├── sfx.py # Sound effects generator
│ └── voice-design.py # Voice design tool
└── references/
└── voice-guide.md # Voice selection guide
🔗 Links
📋 Changelog
v2.1.0
- Added interactive setup wizard (
scripts/setup.py)
- Onboarding guides through API key, voice, language, quality, and budget settings
- Config stored locally in
config.json (added to .gitignore)
- Professional, privacy-focused setup experience
v2.0.0
- Added 32 language support with
--lang parameter
- Added streaming mode with
--stream flag
- Added sound effects generation (
sfx.py)
- Added batch processing with
--batch flag
- Added cost tracking with
--stats flag
- Added voice design tool (
voice-design.py)
- Added pronunciation dictionary support
- Added OpenClaw TTS integration documentation
- Improved error handling and progress output
elevenlabs-voices/
├── SKILL.md # This documentation
├── README.md # Quick start guide
├── config.json # Your local config (created by setup, in .gitignore)
├── voices.json # Voice definitions & settings
├── pronunciations.json # Custom pronunciation rules
├── examples.md # Detailed usage examples
├── scripts/
│ ├── setup.py # Interactive setup wizard
│ ├── tts.py # Main TTS script
│ ├── sfx.py # Sound effects generator
│ └── voice-design.py # Voice design tool
└── references/
└── voice-guide.md # Voice selection guide
🔗 Links
📋 Changelog
v2.1.0
- Added interactive setup wizard (
scripts/setup.py)
- Onboarding guides through API key, voice, language, quality, and budget settings
- Config stored locally in
config.json (added to .gitignore)
- Professional, privacy-focused setup experience
v2.0.0
v2.1.0
scripts/setup.py)config.json (added to .gitignore)- Added 32 language support with
--langparameter - Added streaming mode with
--streamflag - Added sound effects generation (
sfx.py) - Added batch processing with
--batchflag - Added cost tracking with
--statsflag - Added voice design tool (
voice-design.py) - Added pronunciation dictionary support
- Added OpenClaw TTS integration documentation
- Improved error handling and progress output