ElevenLabs 语音合成与识别
ElevenLabs 高质量语音服务,支持文字转语音(TTS)、语音转文字(STT)、音效生成,以及声音库和模型查询。共 5 个工具。
⚠️ 费用提示:此服务调用 ElevenLabs API 会产生费用,仅在用户明确要求时使用。
MCP Access: Use mcporter
你必须通过 mcporter skill 来操作 MCP,完成本 skill 的所有语音任务。 不得直接调用 MCP 工具;所有 MCP 操作都必须经由 mcporter 路由。
- 配置:全局 MCP 配置文件位于
~/.openclaw/workspace/config/mcporter.json。在使用 mcporter 之前,你必须读取该文件,并仅使用本 skill 声明的 MCP 服务器/工具对应的配置(即elevenlabs-mcp-cloud)。不得使用配置文件中其他 MCP;只能使用本 skill 明确声明的那些。 - 列出工具:
mcporter list elevenlabs-mcp-cloud --schema - 调用工具:
mcporter call elevenlabs-mcp-cloud.<tool> key=value - 本 skill 中的工具列表定义了可用的 MCP 服务器/工具;请仅通过 mcporter 调用它们,并使用全局配置文件中对应的配置项。
快速决策
将文字转换为语音
→ 通过 mcporter 调用 text_to_speech
→ 示例:mcporter call elevenlabs-mcp-cloud.text_to_speech text="你好,欢迎使用语音合成服务" language="zh"
将音频文件转为文字
→ 通过 mcporter 调用 speech_to_text
→ 示例:mcporter call elevenlabs-mcp-cloud.speech_to_text input_file_url="https://example.com/audio.mp3" language_code="zho"
生成音效(如雨声、爆炸声等)
→ 通过 mcporter 调用 text_to_sound_effects
→ 示例:mcporter call elevenlabs-mcp-cloud.text_to_sound_effects text="heavy rain falling on a roof" duration_seconds=3
查看可用声音列表
→ 通过 mcporter 调用 list_voices
→ 示例:mcporter call elevenlabs-mcp-cloud.list_voices
查看可用模型列表
→ 通过 mcporter 调用 list_models
→ 示例:mcporter call elevenlabs-mcp-cloud.list_models
工具列表
| 工具 | 功能 | 必填参数 |
|---|---|---|
text_to_speech |
文字转语音(TTS) | text(要转换的文字) |
speech_to_text |
语音转文字(STT/转录) | input_file_url(音频文件URL) |
text_to_sound_effects |
文字描述生成音效 | text(音效描述) |
list_voices |
列出所有可用声音 | 无 |
list_models |
列出所有可用模型 | 无 |
text_to_speech 参数详解
| 参数 | 类型 | 说明 | 默认值 | 范围 |
|---|---|---|---|---|
text |
string | 要转换的文字 | 必填 | - |
voice_id |
string | 声音ID(从 list_voices 获取) | 系统默认 | - |
stability |
float | 稳定性,越高越单调,越低情感越丰富 | 0.5 | 0~1 |
similarity_boost |
float | 相似度增强 | 0.75 | 0~1 |
style |
float | 风格夸张程度 | 0 | 0~1 |
speed |
float | 语速 | 1.0 | 0.7~1.2 |
language |
string | ISO 639-1 语言代码(中文用 zh) |
en |
- |
output_format |
string | 输出格式(默认 mp3_44100_128) | mp3_44100_128 |
见下 |
支持的输出格式:mp3_22050_32、mp3_44100_32、mp3_44100_64、mp3_44100_96、mp3_44100_128、mp3_44100_192、pcm_*、opus_*、ulaw_8000、alaw_8000
注意事项
- ⚠️ 所有工具调用均会产生 ElevenLabs API 费用,仅在用户明确要求时使用
- 需要特定声音时,先调用
list_voices获取voice_id,再传入text_to_speech - 音效时长限制:0.5~5 秒
- 语音转文字的
language_code使用 ISO 639-3(如中文为zho,英文为eng) - 调用工具前,请先读取
~/.openclaw/workspace/config/mcporter.json,仅使用elevenlabs-mcp-cloud的配置项,再通过 mcporter 执行操作

