用途:该技能专注于 ElevenLabs 文本转语音(TTS)生成,可从脚本文件或内联文本产出音频,并借助本地声音配置(voice profile)管理声音选择与合成参数。技能本身保持非个性化:不保存 API 密钥、声音名称或 ID、邮箱、账号、客户名等个人默认值。
主要能力:读取环境变量或最近的 .env 中的 ELEVENLABS_API_KEY;从技能外部的本地 JSON 配置读取账号专属声音档案;按请求级设置生成音频。除非用户明确要求,不会改动已保存的 ElevenLabs 账号或声音设置。
使用方式:配置来源优先级为 --config /path/to/profiles.json、环境变量 ELEVENLABS_TTS_CONFIG=/path/to/profiles.json、local/elevenlabs/profiles.json;项目内配置文件也可用(需被 gitignore)。配置文件包含 default_profile 与 profiles,每个档案可含 voice_name、voice_id、voice_id_env、model_id、output_format、voice_settings、output_dir 等字段。选择档案的顺序为 --profile、ELEVENLABS_TTS_PROFILE、default_profile。推荐命令:python3 <skill-root>/scripts/generate_voice.py --text-file script.txt --profile default --output output.mp3。脚本支持 --text、--text-file、stdin、--profile、--config、--voice-id、--voice-name、--model-id、--output-format、--settings-json、--output、--dry-run、--list-voices。若档案有 voice_id 则直接用;有 voice_id_env 则读该环境变量;否则按 voice_name 搜索。使用档案的 model_id、output_format、voice_settings,除非本次生成被覆盖。输出位置为指定目标,否则用档案 output_dir,再否则 outputs/voiceovers/。
接口说明:声音搜索使用 GET https://api.elevenlabs.io/v2/voices;语音生成使用 POST https://api.elevenlabs.io/v1/text-to-speech/:voice_id?output_format=...;API 密钥以 xi-api-key 发送。
限制:需自行提供 API 密钥与本地声音档案;报告输出路径与重要警告,但不应打印密钥。价格、计费、平台支持范围、配额与效果等未在资料中说明,暂未提供。