跳转到主要内容
POST
/
suno
/
v2
/
getVoxStem
获取人声音轨
curl --request POST \
  --url https://api.mountsea.ai/suno/v2/getVoxStem \
  --header 'Content-Type: application/json' \
  --data '
{
  "clip_id": "<string>"
}
'
{
  "id": "<string>",
  "status": "<string>",
  "source_clip_id": "<string>",
  "vocal_start_s": 123,
  "vocal_end_s": 123,
  "vocal_audio_url": "<string>"
}
从音频片段中提取人声音轨。返回的 id 可作为使用创建角色端点时的 vox_audio_id
此端点直接返回结果(不是任务 ID)。提取过程是同步处理的。

请求体

clip_id
string
必填
要从中提取人声的音频片段 ID。

响应

id
string
人声音频 ID。创建角色时作为 vox_audio_id 使用。
status
string
提取状态(例如 "complete")。
source_clip_id
string
被处理的原始片段 ID。
vocal_start_s
number
检测到的人声开始时间(秒)。
vocal_end_s
number
检测到的人声结束时间(秒)。
vocal_audio_url
string
提取的人声音频文件 URL。

示例

curl -X POST https://api.mountsea.ai/suno/v2/getVoxStem \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your-api-key" \
  -d '{
    "clip_id": "78d99ca1-f751-4188-8b8e-0784754f0d8e"
  }'

响应示例

{
  "id": "373efa9c-a366-42bb-806c-afdfc9b306a7",
  "status": "complete",
  "source_clip_id": "78d99ca1-f751-4188-8b8e-0784754f0d8e",
  "vocal_start_s": 45.0,
  "vocal_end_s": 74.0,
  "vocal_audio_url": "https://cdn1.suno.ai/processed_373efa9c-a366-42bb-806c-afdfc9b306a7_vocals.m4a"
}

工作流程:创建声音角色

  1. 获取人声音轨 - 调用此端点提取人声并获取 vox_audio_id
  2. 创建角色 - 使用返回的 ID 创建角色
// Step 1: Get vox stem
const voxResponse = await fetch('https://api.mountsea.ai/suno/v2/getVoxStem', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer your-api-key'
  },
  body: JSON.stringify({ clip_id: 'your-clip-id' })
});
const voxData = await voxResponse.json();

// Step 2: Create persona using the vox_audio_id
const personaResponse = await fetch('https://api.mountsea.ai/suno/v2/persona', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer your-api-key'
  },
  body: JSON.stringify({
    clip_id: 'your-clip-id',
    name: 'My Vocal Persona',
    is_public: true,
    persona_type: 'vox',
    vox_audio_id: voxData.id,  // Use the ID from getVoxStem
    vocal_start_s: voxData.vocal_start_s,
    vocal_end_s: voxData.vocal_end_s
  })
});
此端点返回的 vocal_start_svocal_end_s 可在创建角色时直接使用,以确保最佳的人声提取效果。