VocaIndex Voice API

AI Voice Translation API

High-quality offline dubbing with contextual reasoning, cloned voices, and the original soundtrack intact.

Translation that keeps the production

More than replacement speech

Translate the performance while retaining the timing, speakers, and non-speech audio that make the original recording work.

Offline quality, with context

Built for asynchronous, extra-high-quality translation. Surrounding dialogue and speaker context guide each translated segment before synthesis.

Keep music and effects

Preserve foreground and background music, ambience, and sound effects instead of flattening the recording into a speech-only result.

Sequential multi-speaker voices

Retain distinct cloned voices across non-overlapping speakers, with speaker-aware transcription, translation, and synthesis.

Choose how timing behaves

Use synchronized mode to fit the source timeline, or free-speed mode for natural target-language speaking speed.

Protect names with a keyword list

Supply show titles, people, organizations, and other proper names through keywords. The pipeline biases speech recognition toward those terms and carries intended matches verbatim through translation instead of translating a misheard name literally. Include native-script and romanized spellings when applicable.

Two output modes

Match the delivery format

Synchronized Source and output duration remain equal for unchanged video timelines.
Free-speed Translated speech follows the natural pace of the target language.

Hear it

One panel, every language

The same conference Q&A, dubbed by this API. Switch language while it plays — the position is kept, so you can hear one sentence move between languages in the speakers’ own voices. Captions are the API’s own WebVTT output.

Playing the English original. Clip: “Why Open Source AI Matters” — The Linux Foundation, licensed CC BY. Excerpt, dubbed by VocaIndex.

Multilingual voice engine

31 supported languages

The public API supports one canonical tag per language. Regional forms are normalized at the API boundary, and live availability is returned by GET /v1/languages.

Pricing

Voice Translation API pricing per speech minute

Billing is measured in audio-minutes of actual speech. Music-only stretches — intros, stings between segments, ad-break beds, outros — are detected and skipped, so a 60-minute episode with a musical intro and outro typically bills around 55 minutes. Failed and cancelled jobs cost nothing, and checking a job's status is free.

For the browser editor, Romio Dub Studio uses credits for source analysis, text translation and dubbed audio. See the Studio cost for a 10-minute interview.

PlanMonthlyIncludedAfter thatConcurrent jobs
Basic Free 10 audio-minutes per day $0.12 / audio-minute 1
Pro $99.90 1,200 audio-minutes per month $0.10 / audio-minute 5

Both plans accept recordings up to 90 minutes (32 MB per upload) with no daily cap. Seconds accumulate across your jobs and settle at whole minutes, with the remainder carried to your next job, so many short clips are not penalised against one long one.

Subscribe on RapidAPI to get a key — the free tier needs no commitment.

Quick start

A complete example

The API is asynchronous: submit a recording, poll the job, download the result. The example below dubs a podcast episode into Chinese in free-speed mode, with captions and a keyword list protecting the show and host names. Credentials come from your subscription on RapidAPI — subscribe there, then use that key as X-RapidAPI-Key below.

1 — Submit the audio

One multipart request. Only file, sourceLanguage, and targetLanguage are required; everything else refines the render.

curl -X POST "https://voca-dubbing.p.rapidapi.com/v1/dubs" \
  -H "X-RapidAPI-Key: $YOUR_KEY" \
  -H "X-RapidAPI-Host: voca-dubbing.p.rapidapi.com" \
  -F "file=@episode.m4a" \
  -F "sourceLanguage=auto" \
  -F "targetLanguage=zh" \
  -F "mode=free_speed" \
  -F "caption=true" \
  -F 'keywords=["Gooaye","股癌","Mung-Kong"]'

Field notes: sourceLanguage accepts a language tag or auto; mode is synchronized (default — output keeps the source timeline, for video) or free_speed (natural target-language pace); caption=true adds a WebVTT track in both modes; keywords is a JSON-array string of up to 32 proper nouns — include native-script and romanized spellings of the same name. Uploads are capped at 32 MB and 90 minutes.

The response is immediate:

HTTP 202
{"jobId": "cmsd07da10003wi5g08ilghaf", "status": "queued"}

2 — Poll the job

Poll once every 60 seconds — one GET per minute is all it takes, since even short episodes render for a few minutes. Status moves through queued, preprocessing, translating, synthesizing, finalizing to a terminal done, failed, or cancelled. A five-minute episode typically finishes in two to three minutes.

curl "https://voca-dubbing.p.rapidapi.com/v1/dubs/cmsd07da10003wi5g08ilghaf" \
  -H "X-RapidAPI-Key: $YOUR_KEY" \
  -H "X-RapidAPI-Host: voca-dubbing.p.rapidapi.com"

When the job completes:

{
  "jobId": "cmsd07da10003wi5g08ilghaf",
  "status": "done",
  "resultUrl": "https://…signed URL, valid ~15 minutes…",
  "captionsUrl": "https://…signed URL…",
  "captionsFormat": "vtt",
  "billableSeconds": 281
}

3 — Download the result

Fetch resultUrl (the dubbed audio/mp4) and captionsUrl promptly — they are short-lived signed URLs. If one expires, poll the job again for fresh links. billableSeconds is the speech actually charged: music-only stretches are detected and never billed, and failed or cancelled jobs cost nothing.

curl -o dubbed_zh.m4a  "$resultUrl"
curl -o captions_zh.vtt "$captionsUrl"

Dubbing a video — ready-made script

Video needs one extra step at each end: pull the audio out, dub it in synchronized mode so the timeline is preserved, then mux the result back onto the untouched video stream. dub_video.py does all three. It needs only ffmpeg and requests, and reads your key from the RAPIDAPI_KEY environment variable.

export RAPIDAPI_KEY=your-key
python dub_video.py episode.mp4 --target-language zh \
  --keyword "Gooaye" --keyword "股癌" --music-th 0.4 --caption

The whole flow is five steps:

import json, subprocess, time, requests
from pathlib import Path

BASE = "https://voca-dubbing.p.rapidapi.com"
HEADERS = {"X-RapidAPI-Key": KEY,
           "X-RapidAPI-Host": "voca-dubbing.p.rapidapi.com"}

# 1. Extract the audio. Mono at 48 kbps keeps a full 90-minute video
#    inside the 32 MB upload cap — the byte limit binds before the
#    duration limit does.
subprocess.run(["ffmpeg", "-y", "-i", "episode.mp4", "-vn",
                "-ac", "1", "-c:a", "aac", "-b:a", "48k",
                "audio.m4a"], check=True)

# 2. Submit. `synchronized` keeps the output on the source timeline,
#    which is what lets you drop it back onto the picture later.
with open("audio.m4a", "rb") as fh:
    r = requests.post(f"{BASE}/v1/dubs", headers=HEADERS,
                      files={"file": fh}, data={
        "sourceLanguage": "auto",
        "targetLanguage": "zh",
        "mode": "synchronized",
        "keywords": json.dumps(["Gooaye", "股癌"], ensure_ascii=False),
        "musicDetectionTh": "0.4",
        "caption": "true",
    })
r.raise_for_status()
job_id = r.json()["jobId"]

# 3. Poll once a minute. Polling is free — only the response that
#    delivers the result consumes audio-minutes.
while True:
    job = requests.get(f"{BASE}/v1/dubs/{job_id}",
                       headers=HEADERS).json()
    if job["status"] in ("done", "failed", "cancelled"):
        break
    time.sleep(60)
if job["status"] != "done":
    raise SystemExit(job.get("error", {}).get("message"))

# 4. Download. The signed URL is short-lived, and needs no API headers —
#    the signature already authorises it.
Path("dubbed.m4a").write_bytes(requests.get(job["resultUrl"]).content)

# 5. Mux onto the original video. The video stream is COPIED, never
#    re-encoded — safe because synchronized output matches the source
#    length to within a few tens of milliseconds.
subprocess.run(["ffmpeg", "-y", "-i", "episode.mp4", "-i", "dubbed.m4a",
                "-map", "0:v:0", "-map", "1:a:0", "-c:v", "copy",
                "-c:a", "aac", "-shortest", "episode.zh.mp4"], check=True)

The downloadable script wraps this with argument parsing, duration and size pre-checks, typed error messages for the 429/503 cases, and caption retrieval.

Download dub_video.py

Handling limits and errors

Two refusals matter for a robust client, and they are different: 429 quota_exceeded means your plan limit (for example a second concurrent job on a one-job plan) — wait for your running job; 503 resource_exhausted means the fleet is briefly full — retry after the Retry-After header. Validation problems return 400 invalid_request with a message naming the field. A failed job carries a machine-readable errorCode and is never billed.