Refine and regenerate a dub
How-to guide · Assumes you have created a dubbing project and generated at least one language, as shown in the Dubbing quickstart.
The transcript editing and regeneration endpoints used in this guide are only available to enterprise workspaces. Contact sales for access.
A dub is only as accurate as the transcript it is built from. This guide covers the two places you can make corrections — the source transcript and a language’s translation — and how to regenerate the audio once you are satisfied.
How revisions work
Every project and every language track their own revision counter, both starting at 0.
- Editing the source transcript increases the project’s
revision. Transcription itself does not. - Editing a translation increases that language’s
revision. It does not affect the source or any other language. - A language also reports
output_revision: the revision its current audio was generated from. Whenoutput_revisionis behindrevision, the downloaded audio is out of date and the language’s status becomesstale.
Correct the source transcript before adding languages where possible. Translations are produced from the source, so fixing the source first means every language starts from the right text. Editing the source after a language exists marks that language stale and requires a regeneration.
Edit the source transcript
Read the source transcript to get each segment’s stable id, then edit, add, or delete segments.
When editing timing, end_s must be greater than start_s. New segments require all four fields (text, speaker_id, start_s, end_s); the server assigns the segment id.
Refine a translation
A language transcript pairs each source segment with its translation. Segment id values match the source transcript, so you can line translations up against the original text. Edit a single segment’s translation to override the machine translation. Pass null to clear a translation and mark that segment for re-translation.
Editing a translation bumps the language’s revision. If the language had already completed, it becomes stale and keeps its previous audio until you regenerate.
Regenerate the audio
After editing the source transcript or a translation, regenerate the language to produce a fresh dub from the current transcript. Regeneration is charged like a generation.
Regenerate returns a 409 Conflict if the project is not ready or the language is not in a settled state, for example when it is already generating. Once the language reaches completed again, output_revision equals revision and the downloaded audio reflects your edits.
You can control how strongly the dubbed speakers clone the source voices with the
cloning_strength voice setting (0 to 10, default 7) when adding a language. See the create
language target API
reference.