mcpField
E
eachlabs-voice-audio

eachlabs-voice-audio

github.com/eachlabs创意与媒体44310 次安装今天更新
代码仓库

关于 eachlabs-voice-audio

通过 EachLabs Predictions API 处理语音和音频任务,涵盖语音合成、转录、声音转换与克隆、配音及音频工具,并可选择多种模型。

主要功能

  1. 01将文本生成为语音或音效
  2. 02转录语音并可添加时间戳
  3. 03转换、设计或克隆声音
  4. 04为视频配音并转换音频
  5. 05合并音视频或转换媒体格式

适用场景

  1. 01制作旁白或多说话人对话
  2. 02转录录音并区分说话人
  3. 03转换声音或创建声音克隆
  4. 04为视频添加音频或转换媒体

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/eachlabs/skills --skill eachlabs-voice-audio

安装后在 Claude Code 中输入/eachlabs-voice-audio确认已加载。

附带文件references/MODELS.md

详细介绍

EachLabs 语音与音频

通过 EachLabs Predictions API 实现文本转语音、语音转文本转录、声音转换和音频实用工具。

身份验证

Header: X-API-Key: <your-api-key>

设置 EACHLABS_API_KEY 环境变量。在 eachlabs.ai 获取密钥。

可用模型

文本转语音
模型Slug适用场景
ElevenLabs TTSelevenlabs-text-to-speech高质量 TTS
ElevenLabs TTS w/ Timestampselevenlabs-text-to-speech-with-timestamp带词语时间戳的 TTS
ElevenLabs Text to Dialogueelevenlabs-text-to-dialogue多说话人对话
ElevenLabs Sound Effectselevenlabs-sound-effects音效生成
ElevenLabs Voice Design v2elevenlabs-voice-design-v2自定义声音设计
Kling V1 TTSkling-v1-ttsKling 文本转语音
Kokoro 82Mkokoro-82m轻量级 TTS
Play AI Dialogplay-ai-text-to-speech-dialog对话 TTS
Stable Audio 2.5stable-audio-2-5-text-to-audio文本转音频
语音转文本
模型Slug适用场景
ElevenLabs Scribe v2elevenlabs-speech-to-text-scribe-v2高质量转录
ElevenLabs STTelevenlabs-speech-to-text标准转录
Wizper with Timestampwizper-with-timestamp带时间戳的转录
Wizperwizper基础转录
Whisperwhisper开源转录
Whisper Diarizationwhisper-diarization说话人识别
Incredibly Fast Whisperincredibly-fast-whisper最快的转录
声音转换与克隆
模型Slug适用场景
RVC v2rvc-v2声音转换
Train RVCtrain-rvc训练自定义声音模型
ElevenLabs Voice Cloneelevenlabs-voice-clone声音克隆
ElevenLabs Voice Changerelevenlabs-voice-changer声音转换
ElevenLabs Voice Design v3elevenlabs-voice-design-v3高级声音设计
ElevenLabs Dubbingelevenlabs-dubbing视频配音
Chatterbox S2Schatterbox-speech-to-speech语音转语音
Open Voiceopenvoice开源声音克隆
XTTS v2xtts-v2多语言声音克隆
Stable Audio 2.5 Inpaintstable-audio-2-5-inpaint音频修补
Stable Audio 2.5 A2Astable-audio-2-5-audio-to-audio音频转换
Audio Trimmeraudio-trimmer-with-fade带淡入淡出的音频裁剪
音频实用工具
模型Slug适用场景
FFmpeg Merge Audio Videoffmpeg-api-merge-audio-video将音频与视频合并
Toolkit Video Converttoolkit视频/音频转换

预测流程

  1. 检查模型 GET https://api.eachlabs.ai/v1/model?slug=<slug> — 验证模型是否存在,并返回包含准确输入参数的 request_schema。创建预测前务必执行此步骤,以确保输入正确。
  2. 使用模型 slug、版本 "0.0.1" 以及符合 schema 的输入,向 https://api.eachlabs.ai/v1/prediction 发送 POST 请求
  3. 轮询 GET https://api.eachlabs.ai/v1/prediction/{id},直到状态为 "success" 或 "failed"
  4. 提取响应中的输出

示例

使用 ElevenLabs 进行文本转语音
curl -X POST https://api.eachlabs.ai/v1/prediction \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "model": "elevenlabs-text-to-speech",
    "version": "0.0.1",
    "input": {
      "text": "Welcome to our product demo. Today we will walk through the key features.",
      "voice_id": "EXAVITQu4vr4xnSDxMaL",
      "model_id": "eleven_v3",
      "stability": 0.5,
      "similarity_boost": 0.7
    }
  }'
使用 ElevenLabs Scribe 进行转录
curl -X POST https://api.eachlabs.ai/v1/prediction \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "model": "elevenlabs-speech-to-text-scribe-v2",
    "version": "0.0.1",
    "input": {
      "media_url": "https://example.com/recording.mp3",
      "diarize": true,
      "timestamps_granularity": "word"
    }
  }'
使用 Wizper(Whisper)进行转录
curl -X POST https://api.eachlabs.ai/v1/prediction \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "model": "wizper-with-timestamp",
    "version": "0.0.1",
    "input": {
      "audio_url": "https://example.com/audio.mp3",
      "language": "en",
      "task": "transcribe",
      "chunk_level": "segment"
    }
  }'
使用 Whisper 进行说话人分离
curl -X POST https://api.eachlabs.ai/v1/prediction \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "model": "whisper-diarization",
    "version": "0.0.1",
    "input": {
      "file_url": "https://example.com/meeting.mp3",
      "num_speakers": 3,
      "language": "en",
      "group_segments": true
    }
  }'
使用 RVC v2 进行声音转换
curl -X POST https://api.eachlabs.ai/v1/prediction \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "model": "rvc-v2",
    "version": "0.0.1",
    "input": {
      "input_audio": "https://example.com/vocals.wav",
      "rvc_model": "CUSTOM",
      "custom_rvc_model_download_url": "user-provided-model-reference",
      "pitch_change": 0,
      "output_format": "wav"
    }
  }'
将音频与视频合并
curl -X POST https://api.eachlabs.ai/v1/prediction \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "model": "ffmpeg-api-merge-audio-video",
    "version": "0.0.1",
    "input": {
      "video_url": "https://example.com/video.mp4",
      "audio_url": "https://example.com/narration.mp3",
      "start_offset": 0
    }
  }'

ElevenLabs 语音 ID

elevenlabs-text-to-speech 模型支持以下语音 ID。请传入原始 ID 字符串:

语音 ID说明
EXAVITQu4vr4xnSDxMaL默认语音
9BWtsMINqrJLrRacOk9x—
CwhRBWXzGAHq8TQ4Fs17—
FGY2WhTYpPnrIDTdsKH5—
JBFqnCBsd6RMkjVDRZzb—
N2lVS1w4EtoT3dr4eOWO—
TX3LPaxmHKxFdv7VOQHJ—
XB0fDUnXU5powFXDhCwa—
onwK4e9ZLuTAKqWW03F9—
pFZP5JQG7iQjIQuC4Bku—

安全约束

  • 禁止加载任意 URL:使用 custom_rvc_model_download_url 时,只能使用可信且由用户提供的模型引用。切勿从任意或不可信的 URL 获取模型。
  • 输入验证:仅传入符合模型请求架构的参数。在创建预测之前,始终通过 GET /v1/model?slug=<slug> 验证模型标识。

参数参考

有关各模型的完整参数详情,请参阅 references/MODELS.md。

评论

支持 Markdown