音訊
轉換 Runway 語音
使用 Runway API 將錄製的對話轉換為選定的語音。
POST
/
runwayml
/
v1
/
speech_to_speech
curl https://api.cometapi.com/runwayml/v1/speech_to_speech \
--request POST \
--header "Authorization: Bearer $COMETAPI_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "eleven_multilingual_sts_v2",
"media": {
"type": "audio",
"uri": "https://your-audio-host/source-speech.mp3"
},
"voice": {
"type": "runway-preset",
"presetId": "Maya"
}
}'
{
"id": "123e4567-e89b-42d3-a456-426614174000"
}{
"code": "<string>",
"message": "<string>",
"data": "<unknown>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}使用
將範例媒體 URL 替換為您的來源檔案。如果您使用影片,
請將
POST /runwayml/v1/speech_to_speech 將錄製的對話轉換為
預設語音。請使用模型 ID eleven_multilingual_sts_v2。
使用 Bearer 驗證傳送您的 CometAPI API 金鑰及 JSON 請求主體。
提供對話和語音
| 欄位 | 必填值 |
|---|---|
model | eleven_multilingual_sts_v2 |
media.type | audio 用於音訊檔案,或 video 用於包含對話的影片 |
media.uri | 來源檔案的可存取 HTTPS URL |
voice.type | runway-preset |
voice.presetId | 請求結構描述中的預設語音,例如 Maya |
media.type 變更為 video,並在 media.uri 中提供其影片 URL。
將 removeBackgroundNoise: true 設為從產生的
語音中移除背景雜訊。省略此欄位即可使用模型預設值。
擷取結果
儲存傳回的id,然後使用 取得 Runway 任務
以擷取任務狀態。當 status 為 SUCCEEDED 時,請下載產生的
媒體,來源為 output 中的 URL。若任務失敗,請檢查 failure 並
failureCode.主體
application/json
Request settings for eleven_multilingual_sts_v2.
回應
Task created. Save the returned id to retrieve task status.
最後修改於 2026年9月21日
⌘I
curl https://api.cometapi.com/runwayml/v1/speech_to_speech \
--request POST \
--header "Authorization: Bearer $COMETAPI_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "eleven_multilingual_sts_v2",
"media": {
"type": "audio",
"uri": "https://your-audio-host/source-speech.mp3"
},
"voice": {
"type": "runway-preset",
"presetId": "Maya"
}
}'
{
"id": "123e4567-e89b-42d3-a456-426614174000"
}{
"code": "<string>",
"message": "<string>",
"data": "<unknown>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}