设置、测试、基准并使用 ElevenLabs TTS 作为独立技能,支持 HTTP 流式传输、WebSocket 流式传输指引和语音列表。
Use this skill for ELE / ElevenLabs voice generation, low-latency streaming TTS, voice IDs, voice listing, output formats, or TTS benchmark work.
ELEVENLABS_API_KEY as a secret. Never echo it, write it into skill files, commit it, or expose it in logs/screenshots.ELEVENLABS_API_KEY=... python3 ....scripts/list_voices.py; choose a requested voice by ID/name or use the first available voice for smoke tests.scripts/tts_stream_http.py.ttfb_seconds, elapsed time, model, output format.ffprobe, afinfo, or file), inspect the generated file before claiming success.eleven_flash_v2_5 for lowest latency; eleven_turbo_v2_5 for higher quality with low latency; eleven_multilingual_v2 for broad multilingual quality.POST /v1/text-to-speech/{voice_id}/stream when the full text is available.mp3_44100_128 for shareable files; pcm_16000/ pcm_24000 for realtime playback pipelines.optimize_streaming_latency=2 or 3; avoid 4 unless the user accepts possible number/date mispronunciation.use_speaker_boost=false for low latency.List voices:
bash
ELEVENLABS_API_KEY="$ELEVENLABS_API_KEY" python3 skills/elevenlabs-tts/scripts/list_voices.py
HTTP streaming TTS benchmark:
bash
ELEVENLABS_API_KEY="$ELEVENLABS_API_KEY" python3 skills/elevenlabs-tts/scripts/tts_stream_http.py \
--text '野哥,ElevenLabs 流式语音测试成功。' \
--voice-name Rachel \
--model eleven_flash_v2_5 \
--output-format mp3_44100_128 \
--optimize-streaming-latency 2 \
--out /tmp/elevenlabs-skill-test.mp3
If --voice-name is omitted, the script uses the first voice returned by /v1/voices.
references/elevenlabs-api.md.scripts/list_voices.pyscripts/tts_stream_http.py