重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
elevenlabs by vm0-ai/vm0-skills
npx skills add https://github.com/vm0-ai/vm0-skills --skill elevenlabs通过直接的 curl 调用使用 ElevenLabs API,从文本生成逼真的 AI 语音。
官方文档:
https://elevenlabs.io/docs/api-reference
在以下场景中使用此技能:
ELEVENLABS_API_KEY 中export ELEVENLABS_API_KEY="your-api-key"
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
xi-api-key 请求头传递以下所有示例均假设您已设置 ELEVENLABS_API_KEY。
ElevenLabs API 的基础 URL 是:
https://api.elevenlabs.io/v1获取您的账户可用的所有语音:
curl -s -X GET "https://api.elevenlabs.io/v1/voices" --header "xi-api-key: $(printenv ELEVENLABS_API_KEY)" | jq '.voices[] | {voice_id, name, category}'
这将返回文本转语音所需的语音 ID。常见的语音类别:
premade:ElevenLabs 默认语音cloned:您克隆的语音generated:AI 设计的语音获取特定语音的详细信息。将 <your-voice-id> 替换为实际的语音 ID:
curl -s -X GET "https://api.elevenlabs.io/v1/voices/<your-voice-id>" --header "xi-api-key: $(printenv ELEVENLABS_API_KEY)"
获取所有可用的 TTS 模型:
curl -s -X GET "https://api.elevenlabs.io/v1/models" --header "xi-api-key: $(printenv ELEVENLABS_API_KEY)" | jq '.[] | {model_id, name, can_do_text_to_speech}'
常见模型:
eleven_multilingual_v2:最佳质量,支持 29 种语言eleven_flash_v2_5:低延迟,适合实时应用eleven_v3:最新模型(alpha 版)将文本转换为语音并保存为 MP3。将 <your-voice-id> 替换为从“列出语音”端点获取的实际语音 ID:
写入 /tmp/elevenlabs_request.json:
{
"text": "Hello! This is a test of the ElevenLabs text to speech API.",
"model_id": "eleven_multilingual_v2",
"voice_settings": {
"stability": 0.5,
"similarity_boost": 0.75
}
}
然后运行:
curl -s -X POST "https://api.elevenlabs.io/v1/text-to-speech/<your-voice-id>" --header "xi-api-key: $(printenv ELEVENLABS_API_KEY)" --header "Content-Type: application/json" --header "Accept: audio/mpeg" -d @/tmp/elevenlabs_request.json --output speech.mp3
语音设置:
stability (0.0-1.0):值越高越稳定一致,值越低表现力越强similarity_boost (0.0-1.0):值越高越接近原始语音流式传输音频以实现实时播放。将 <your-voice-id> 替换为实际的语音 ID:
写入 /tmp/elevenlabs_request.json:
{
"text": "This audio is being streamed in real-time.",
"model_id": "eleven_flash_v2_5"
}
然后运行:
curl -s -X POST "https://api.elevenlabs.io/v1/text-to-speech/<your-voice-id>/stream" --header "xi-api-key: $(printenv ELEVENLABS_API_KEY)" --header "Content-Type: application/json" --header "Accept: audio/mpeg" -d @/tmp/elevenlabs_request.json --output streamed.mp3
检查您的使用情况和字符限制:
curl -s -X GET "https://api.elevenlabs.io/v1/user/subscription" --header "xi-api-key: $(printenv ELEVENLABS_API_KEY)" | jq '{character_count, character_limit, tier}'
您可以通过 output_format 查询参数指定不同的输出格式。将 <your-voice-id> 替换为实际的语音 ID:
写入 /tmp/elevenlabs_request.json:
{
"text": "Hello world",
"model_id": "eleven_multilingual_v2"
}
然后运行:
curl -s -X POST "https://api.elevenlabs.io/v1/text-to-speech/<your-voice-id>?output_format=pcm_16000" --header "xi-api-key: $(printenv ELEVENLABS_API_KEY)" --header "Content-Type: application/json" -d @/tmp/elevenlabs_request.json --output speech.pcm
可用格式:
mp3_44100_192 (默认):44.1kHz,192kbps 的 MP3mp3_44100_128:44.1kHz,128kbps 的 MP3pcm_16000:16kHz 的 PCMpcm_22050:22.05kHz 的 PCMpcm_24000:24kHz 的 PCMeleven_flash_v2_5,追求最佳质量使用 eleven_multilingual_v2每周安装量
60
仓库
GitHub 星标数
52
首次出现
2026 年 1 月 24 日
安全审计
安装于
gemini-cli52
opencode51
codex50
cursor49
amp49
cline49
Use the ElevenLabs API via direct curl calls to generate realistic AI speech from text.
Official docs:
https://elevenlabs.io/docs/api-reference
Use this skill when you need to:
ELEVENLABS_API_KEYexport ELEVENLABS_API_KEY="your-api-key"
xi-api-key headerAll examples below assume you have ELEVENLABS_API_KEY set.
The base URL for the ElevenLabs API is:
https://api.elevenlabs.io/v1Get all voices available to your account:
curl -s -X GET "https://api.elevenlabs.io/v1/voices" --header "xi-api-key: $(printenv ELEVENLABS_API_KEY)" | jq '.voices[] | {voice_id, name, category}'
This returns voice IDs needed for text-to-speech. Common voice categories:
premade: ElevenLabs default voicescloned: Your cloned voicesgenerated: AI-designed voicesGet detailed information about a specific voice. Replace <your-voice-id> with an actual voice ID:
curl -s -X GET "https://api.elevenlabs.io/v1/voices/<your-voice-id>" --header "xi-api-key: $(printenv ELEVENLABS_API_KEY)"
Get all available TTS models:
curl -s -X GET "https://api.elevenlabs.io/v1/models" --header "xi-api-key: $(printenv ELEVENLABS_API_KEY)" | jq '.[] | {model_id, name, can_do_text_to_speech}'
Common models:
eleven_multilingual_v2: Best quality, supports 29 languageseleven_flash_v2_5: Low latency, good for real-timeeleven_v3: Latest model (alpha)Convert text to speech and save as MP3. Replace <your-voice-id> with an actual voice ID from the list voices endpoint:
Write to /tmp/elevenlabs_request.json:
{
"text": "Hello! This is a test of the ElevenLabs text to speech API.",
"model_id": "eleven_multilingual_v2",
"voice_settings": {
"stability": 0.5,
"similarity_boost": 0.75
}
}
Then run:
curl -s -X POST "https://api.elevenlabs.io/v1/text-to-speech/<your-voice-id>" --header "xi-api-key: $(printenv ELEVENLABS_API_KEY)" --header "Content-Type: application/json" --header "Accept: audio/mpeg" -d @/tmp/elevenlabs_request.json --output speech.mp3
Voice settings:
stability (0.0-1.0): Higher = more consistent, lower = more expressivesimilarity_boost (0.0-1.0): Higher = closer to original voiceStream audio for real-time playback. Replace <your-voice-id> with an actual voice ID:
Write to /tmp/elevenlabs_request.json:
{
"text": "This audio is being streamed in real-time.",
"model_id": "eleven_flash_v2_5"
}
Then run:
curl -s -X POST "https://api.elevenlabs.io/v1/text-to-speech/<your-voice-id>/stream" --header "xi-api-key: $(printenv ELEVENLABS_API_KEY)" --header "Content-Type: application/json" --header "Accept: audio/mpeg" -d @/tmp/elevenlabs_request.json --output streamed.mp3
Check your usage and character limits:
curl -s -X GET "https://api.elevenlabs.io/v1/user/subscription" --header "xi-api-key: $(printenv ELEVENLABS_API_KEY)" | jq '{character_count, character_limit, tier}'
You can specify different output formats via the output_format query parameter. Replace <your-voice-id> with an actual voice ID:
Write to /tmp/elevenlabs_request.json:
{
"text": "Hello world",
"model_id": "eleven_multilingual_v2"
}
Then run:
curl -s -X POST "https://api.elevenlabs.io/v1/text-to-speech/<your-voice-id>?output_format=pcm_16000" --header "xi-api-key: $(printenv ELEVENLABS_API_KEY)" --header "Content-Type: application/json" -d @/tmp/elevenlabs_request.json --output speech.pcm
Available formats:
mp3_44100_192 (default): MP3 at 44.1kHz, 192kbpsmp3_44100_128: MP3 at 44.1kHz, 128kbpspcm_16000: PCM at 16kHzpcm_22050: PCM at 22.05kHzpcm_24000: PCM at 24kHzeleven_flash_v2_5 for low latency, eleven_multilingual_v2 for best qualityWeekly Installs
60
Repository
GitHub Stars
52
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
gemini-cli52
opencode51
codex50
cursor49
amp49
cline49
SoulTrace 人格评估 API - 基于五色心理模型的贝叶斯自适应测试
56,700 周安装