ElevenLabs Voices
2026-03-27
新闻来源:网淘吧
围观:23
电脑广告
手机广告
ElevenLabs语音角色库 v2.1
基于ElevenLabs API的综合性语音合成工具包
🚀 首次运行 - 设置向导
首次使用此功能时(若不存在config.json配置文件),请运行交互式设置向导:
python3 scripts/setup.py
向导将引导您完成:
- API密钥- 输入您的ElevenLabs API密钥(必需)
- 默认语音- 从热门语音中选择(Rachel、Adam、Bella等)
- 语言设置- 设置首选语言(支持32种语言)
- 音频质量- 标准或高质量输出
- 成本追踪- 启用用量与费用监控
- 预算限制- 可选的月度支出上限
🔒 隐私说明:您的API密钥将本地存储于config.json配置文件仅此而已。它永远不会离开您的机器,并通过.gitignore自动从git中排除。。如需随时重新配置,只需再次运行设置向导。
✨ 功能特性
18种语音角色
- - 为不同使用场景精心筛选的语音32种语言
- - 采用多语言v2模型实现多语言合成流式传输模式
- - 生成时实时输出音频音效(SFX)
- - 通过文本提示生成AI音效批量处理
- - 一次性处理多个文本成本追踪
- - 监控字符使用量和预估成本语音设计
- - 根据描述创建自定义语音发音词典
- - 自定义词汇发音规则- Custom word pronunciation rules
- OpenClaw 集成- 与 OpenClaw 的内置 TTS 协同工作
🎙 可用语音
| 语音 | 口音 | 性别 | 人物设定 | 最佳适用场景 |
|---|---|---|---|---|
| rachel | 🇺🇸 美国 | 女性 | 温暖 | 对话、教程 |
| adam | 🇺🇸 美国 | 男性 | 旁白 | 纪录片、有声读物 |
| bella | 🇺🇸 美国 | 女性 | 专业 | 商务、演示 |
| brian | 🇺🇸 美国 | 男性 | 安慰 | 冥想,平静满足 |
| 乔治 | 🇬🇧 英国 | 男性 | 故事讲述者 | 有声书,讲故事 |
| 爱丽丝 | 🇬🇧 英国 | 女性 | 教育者 | 教程,讲解 |
| 卡勒姆 | 🇺🇸 美国 | 男性 | 捣蛋鬼 | 玩乐,游戏 |
| 查理 | 🇦🇺 澳大利亚 | 男性 | 精力充沛 | 体育,激励 |
| 杰西卡 | 🇺🇸 美国 | 女性 | 活泼有趣 | 社交媒体,休闲 |
| 莉莉 | 英国 | 女性 | 女演员 | 戏剧,优雅内容 |
| 玛蒂尔达 | 美国 | 女性 | 专业人士 | 企业,新闻 |
| 里弗 | 美国 | 中性 | 中性 | 包容性,信息丰富 |
| 罗杰 | 美国 | 男性 | 休闲 | 播客,轻松 |
| 丹尼尔 | 英国 | 男性 | 播音员 | 新闻,公告 |
| 埃里克 | 美国 | 男性 | 值得信赖的 | 商业、企业 |
| 克里斯 | 🇺🇸 美国 | 男性 | 友好的 | 教程、平易近人 |
| 威尔 | 🇺🇸 美国 | 男性 | 乐观主义者 | 激励、鼓舞人心 |
| 利亚姆 | 🇺🇸 美国 | 男性 | 社交型 | YouTube、社交媒体 |
🎯 快速预设
默认→ 瑞秋(温暖,友好)旁白→ 亚当(纪录片)专业→ 玛蒂尔达(企业)讲故事者→ 乔治(有声书)教育者→ 爱丽丝(教程)冷静→ 布莱恩(冥想)精力充沛→ 利亚姆(社交媒体)值得信赖→ 埃里克(商业)中性→ 里弗(包容性)英式→ 乔治澳大利亚式→ 查理广播员→ 丹尼尔(新闻)
🌍 支持的语言(32种)
多语言v2模型支持以下语言:
| 代码 | 语言 | 代码 | 语言 |
|---|---|---|---|
| en | 英语 | pl | 波兰语 |
| 德语 | 德语 | 荷兰语 | 荷兰语 |
| 西班牙语 | 西班牙语 | 瑞典语 | 瑞典语 |
| 法语 | 法语 | 丹麦语 | 丹麦语 |
| 意大利语 | 意大利语 | 芬兰语 | 芬兰语 |
| 葡萄牙语 | 葡萄牙语 | 挪威语 | 挪威语 |
| 俄语 | 俄语 | 土耳其语 | 土耳其语 |
| 乌克兰语 | 乌克兰语 | 捷克语 | 捷克语 |
| 日语 | 日语 | sk | 斯洛伐克语 |
| ko | 韩语 | hu | 匈牙利语 |
| zh | 中文 | ro | 罗马尼亚语 |
| ar | 阿拉伯语 | bg | 保加利亚语 |
| hi | 印地语 | hr | 克罗地亚语 |
| ta | 泰米尔语 | el | 希腊语 |
| id | 印度尼西亚语 | ms | 马来语 |
| vi | 越南语 | th | 泰语 |
# 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
💻 命令行界面用法
基础文本转语音
# 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
流媒体模式
实时流式生成音频(适用于长文本):
# 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
批量处理
从文件处理多个文本:
# 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批量格式:
[
{"text": "First line", "voice": "rachel", "output": "line1.mp3"},
{"text": "Second line", "voice": "adam", "output": "line2.mp3"},
{"text": "Third line"}
]
简单文本格式(每行一个):
Hello, this is the first sentence.
This is the second sentence.
And this is the third.
使用统计
# Show usage stats and cost estimates
python3 scripts/tts.py --stats
# Reset statistics
python3 scripts/tts.py --reset-stats
🎵 音效
根据文本描述生成AI驱动的音效:
# 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
示例提示:
- “远处雷声隆隆”
- “猫满足地发出呼噜声”
- “在机械键盘上打字”
- “宇宙飞船引擎嗡嗡作响”
- “咖啡店背景聊天声”
🎨 语音设计
根据文本描述创建自定义语音:
# 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
语音设计选项:
| 选项 | 数值 |
|---|---|
| 性别 | 男性、女性、中性 |
| 年龄 | 年轻、中年、老年 |
| 口音 | 美式、英式、非洲、澳大利亚、印度、拉丁、中东、斯堪的纳维亚、东欧 |
| 口音强度 | 0.3-2.0(轻微到强烈) |
📖 发音词典
自定义单词发音:
编辑pronunciations.json:
{
"rules": [
{
"word": "OpenClaw",
"replacement": "Open Claw",
"comment": "Pronounce as two words"
},
{
"word": "API",
"replacement": "A P I",
"comment": "Spell out acronym"
}
]
}
用法:
# 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
💰 成本追踪
该技能追踪您的字符使用量并估算成本:
python3 scripts/tts.py --stats
输出:
📊 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 集成
与 OpenClaw 内置 TTS 配合使用
OpenClaw 内置了支持使用 ElevenLabs 的 TTS 功能。请在以下文件中配置:~/.openclaw/openclaw.json在聊天中触发TTS
{
"tts": {
"enabled": true,
"provider": "elevenlabs",
"elevenlabs": {
"apiKey": "your-api-key-here",
"voice": "rachel",
"model": "eleven_multilingual_v2"
}
}
}
在OpenClaw对话中:
使用
- /tts on
以启用自动文本转语音直接使用 - tts
工具进行一次性语音合成请求“朗读这个”或“说出这个” - 使用OpenClaw中的技能脚本
⚙ 配置
# OpenClaw can run these scripts directly
exec python3 /path/to/skills/elevenlabs-voices/scripts/tts.py --text "Hello" --voice rachel
脚本按以下顺序查找API密钥:
ELEVEN_API_KEY
或ELEVENLABS_API_KEY环境变量技能本地- .env
文件(位于技能目录中)创建.env文件:
注意:
echo 'ELEVEN_API_KEY=your-key-here' > .env
该技能不再从~/.openclaw/openclaw.json读取
~/.openclaw/openclaw.json. 使用环境变量或技能本地.env文件。
🎛 语音设置
每个语音都已针对最佳输出进行了调校设置:
| 设置 | 范围 | 描述 |
|---|---|---|
| 稳定性 | 0.0-1.0 | 值越高越稳定一致,值越低越富有表现力 |
| 相似度增强 | 0.0-1.0 | 与原始语音的匹配接近程度 |
| 风格 | 0.0-1.0 | 说话风格的夸张程度 |
📝 触发词
- "使用 {voice_name} 语音"
- "以 {persona} 的身份说话"
- "列出语音"
- "语音设置"
- "生成音效"
- "设计一个语音"
📁 文件
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
🔗 链接
📋 更新日志
v2.1.0
- 新增交互式设置向导 (
scripts/setup.py) - 引导用户完成 API 密钥、语音、语言、质量和预算设置
- 配置本地存储在
config.json(已添加到.gitignore) - 专业、注重隐私的设置体验
v2.0.0
- 通过
--lang参数新增 32 种语言支持 - 新增流式模式,
--stream标志 - 新增音效生成 (
sfx.py) - 新增使用
--batch标志的批处理功能 - 新增使用
--stats标志的成本跟踪功能 - 新增语音设计工具 (
voice-design.py) - 新增发音词典支持
- 新增 OpenClaw TTS 集成文档
- 改进了错误处理和进度输出
文章底部电脑广告
手机广告位-内容正文底部


微信扫一扫,打赏作者吧~