elevenlabs-tts
它能做什么
这个技能让智能体通过 ElevenLabs 文字转语音服务生成旁白和配音音频。适合需要从文字生成语音、而又不希望声音设置保存在技能内部的人。
适用场景
- ✓你需要根据脚本制作旁白或配音的时候。
- ✓你想把一小段文字生成为语音音频的时候。
- ✓你想把保存的声音配置复用于新音频的时候。
技能链接
https://github.com/MengTo/Skills/blob/main/agent-skills/codex/elevenlabs-tts/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请使用我保存的旁白人声,把这段脚本做成配音。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会从环境变量中读取你的 API 密钥,并从本地配置文件中读取你的声音配置。它只为这一次请求使用对应设置来生成音频,不会更改你保存的声音设置。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
ElevenLabs TTS
Use this skill for ElevenLabs text-to-speech generation. Keep the skill reusable and non-personal:
- Do not store API keys, voice names, voice ids, emails, account names, customer names, or personal defaults in the skill.
- Read
ELEVENLABS_API_KEYfrom the process environment or the nearest.env. - Read account-specific voice profiles from local JSON config outside this skill.
- Generate audio with request-level settings. Do not mutate saved ElevenLabs account or voice settings unless the user explicitly asks.
Local Profiles
Prefer one of these config sources, in order:
--config /path/to/profiles.jsonELEVENLABS_TTS_CONFIG=/path/to/profiles.jsonlocal/elevenlabs/profiles.json
Project-local profile files are also fine when they are gitignored, for example config/local/elevenlabs-tts.json.
The helper script expects this shape:
{
"default_profile": "default",
"profiles": {
"default": {
"voice_name": "Voice name from the local account",
"voice_id": "optional-direct-voice-id",
"voice_id_env": "OPTIONAL_ENV_VAR_WITH_VOICE_ID",
"model_id": "eleven_multilingual_v2",
"output_format": "mp3_44100_128",
"voice_settings": {
"stability": 0.5,
"similarity_boost": 1.0,
"style": 0.0,
"speed": 1.0,
"use_speaker_boost": true
},
"output_dir": "outputs/voiceovers",
"emails": []
}
}
}
Fields like emails, owners, aliases, and notes are for local routing/context only. The script ignores unknown metadata fields.
Workflow
- Choose the profile from
--profile,ELEVENLABS_TTS_PROFILE, ordefault_profile. - Prefer the helper script:
python3 <skill-root>/scripts/generate_voice.py --text-file script.txt --profile default --output output.mp3 - If the profile has
voice_id, use it. If it hasvoice_id_env, read that env var. Otherwise search ElevenLabs byvoice_name. - Use profile
model_id,output_format, andvoice_settingsunless the user overrides them for this generation. - Put generated audio in the requested destination. If no destination is given, use the profile
output_dir, thenoutputs/voiceovers/. - Report the output path and any important warnings. Do not print secrets.
Helper Script
The bundled script supports:
--text "..."for inline text--text-file path.txtfor script files- stdin when neither
--textnor--text-fileis provided --profile nameto select a local profile--config path.jsonto select a local profile file--voice-id,--voice-name,--model-id,--output-format, and--settings-jsonfor one-off overrides--output path.mp3to choose the output file--dry-runto print the resolved request payload without calling the text-to-speech endpoint--list-voicesto list matching ElevenLabs voices without generating audio
API Notes
Use the current ElevenLabs endpoints:
- Voice search:
GET https://api.elevenlabs.io/v2/voices - Speech generation:
POST https://api.elevenlabs.io/v1/text-to-speech/:voice_id?output_format=...
Send the API key as xi-api-key.
常见问题
我的声音设置保存在哪里?
保存在技能之外的本地配置文件中,因此声音名称和 ID 不会存储在技能本身中。
它会更改我的 ElevenLabs 账户设置吗?
不会。除非你明确要求更改,技能只使用针对单次请求的设置。
API 密钥从哪里来?
从环境变量或附近的 env 文件中读取,不会存储在技能中。
详情
作者的原始描述
Generate ElevenLabs text-to-speech audio from scripts or inline text using local voice profiles. Use when the user asks for ElevenLabs, text-to-speech, TTS, narration, voiceover, speech audio, or voice generation; load voice names, voice ids, emails, owners, and account-specific defaults only from local config outside the skill.
repo: MengTo/Skills
热度
- GitHub 星标
- 7.2k
- 排名
- #13334
- 许可证
- MIT
- 更新时间
- 2026/11/1
评论
- …
同一仓库的更多技能
3d-cloth-material
7.2k帮你的智能体在 Three.js 中制作逼真的编织织物,包括纱线编织纹理、柔和光泽、自然褶皱、下摆和缝线。
3d-falling-leaves
7.2k帮你的智能体在 3D 场景中添加逼真的飘落树叶,树叶会翻滚、随风飘动,并在镜头移动时循环利用。
3d-four-seasons
7.2k帮你的智能体为 3D 场景添加春夏秋冬四季效果,无需重建场景即可改变植被、光线、天空和积雪。
3d-high-poly-models
7.2k帮你的智能体构建形状平滑、边缘可信的精细 3D 模型,然后制作在网页上运行流畅的轻量版本。