跳轉到主要內容
POST
cURL
使用 POST /runwayml/v1/voice_dubbing 將語音翻譯為另一種 語言。使用模型 ID eleven_voice_dubbing。 使用 Bearer 驗證傳送您的 CometAPI API 金鑰和 JSON 請求主體。

提供音訊和目標語言

將 audioUri 設為可存取的來源音訊 HTTPS URL。 將 targetLang 設為目標語言代碼,例如代表西班牙語的 es 或代表法語的 fr。請從請求結構描述中選擇支援的代碼。 此請求需要 model、audioUri 和 targetLang。 將範例音訊 URL 替換為您的來源檔案。

設定配音

省略布林控制項以使用模型預設值。傳送 false 也會使用 預設值。

擷取結果

儲存傳回的 id,然後使用 取得 Runway 工作 以擷取工作狀態。當 status 為 SUCCEEDED 時,從以下項目讀取音訊 URL: output。如果工作失敗,請檢查 failure 和 failureCode。

授權

Authorization
string
header
必填

Use your CometAPI API key.

主體

application/json

Request settings for eleven_voice_dubbing.

model
enum<string>
必填

Model ID for this request.

可用選項:
eleven_voice_dubbing
Allowed value: "eleven_voice_dubbing"
audioUri
必填

Audio input as an accessible HTTPS URL or base64 data URI.

Required string length: 13 - 2048
Pattern: ^https:\/\/.*
targetLang
enum<string>
必填

The target language code to dub the audio to (e.g., "es" for Spanish, "fr" for French).

可用選項:
en,
hi,
pt,
zh,
es,
fr,
de,
ja,
ar,
ru,
ko,
id,
it,
nl,
tr,
pl,
sv,
fil,
ms,
ro,
uk,
el,
cs,
da,
fi,
bg,
hr,
sk,
ta
disableVoiceCloning
boolean

Set true to use a generic voice instead of cloning the source voice. Omit or use false for the model default.

dropBackgroundAudio
boolean

Set true to remove background audio from the dubbed output. Omit or use false for the model default.

numSpeakers
integer

Number of speakers in the source audio. Supply a positive integer or omit it for automatic detection.

必填範圍: x <= 9007199254740991

回應

Task created. Save the returned id to retrieve task status.

id
string
必填

Task ID for GET /runwayml/v1/tasks/{id}.

status
string

Task state, when returned.

createdAt
string<date-time>

Task submission timestamp, when returned.

output
string<uri>[]

Result URLs, when returned.

failure
string

Failure explanation, when returned.

failureCode
string

Machine-readable failure code, when returned.

estimatedCost
object

Task estimate metadata, when returned.

cost
object

Task cost metadata, when returned.

最後修改於 2026年9月21日