How-to guides Audio

SoniTranslate setup and dubbing workflow: environment, speaker mapping and error diagnosis

Video dubbing combines transcription, translation, speaker assignment and speech generation. Test those stages on a short clip before committing to a full recording.

Official SoniTranslate repository and video dubbing workflow
Official SoniTranslate project resources. Setup depends on the chosen runtime and voice backend.

Prepare a small diagnostic clip

Choose a 20 to 30 second clip with clean audio and a small number of speakers. Keep a copy of the original transcript so you can tell whether an error began in recognition or translation.

Prepare a target language and a few names or terms whose spelling and pronunciation matter. Avoid changing voices, translation settings and input media simultaneously during the first experiment.

Choose a runtime and a reproducible installation baseline

SoniTranslate is a multi-stage dubbing workflow, not merely a speech-to-text command. Recognition, speaker segmentation, translation, voice generation and timing can each fail independently. A GPU-enabled environment that launches successfully is only the beginning; you still need a short accepted output in the target language.

The official local-install section is explicitly tested on Linux and describes a Python 3.10 Conda environment, CUDA 11.8 and a pinned PyTorch stack. That is not a verified promise that the same commands work unchanged on Windows, macOS or a new CUDA release. A hosted notebook avoids some local setup but introduces session lifetime, quota and data-upload considerations.

Record the Git commit you install, then follow that revision's README and requirements files together. Do not combine one revision's PyTorch command with an old issue's dependency workaround. Optional speech backends and gated diarization models have their own prerequisites; Hugging Face access must be granted to the token's account, not merely entered as an arbitrary string.

Choose according to the constraint you actually have
RouteUseful whenAccount for
Official notebookYou want a first experiment without local GPU setupRuntime availability, disconnects and media upload
Linux / NVIDIA local setupYou need repeatable control over the environmentDrivers, compatible dependencies and model storage
Managed dubbing serviceYou prefer a hosted editing and delivery workflowService cost, content handling and supported languages
Transcription/alignment tool onlyYou only need timed textThis does not by itself produce a translated voice track

Use the official runtime instructions

Start from the SoniTranslate repository linked below. Its notebook and local installation paths can have different dependencies, authentication needs and compute limits. Follow the instructions associated with the specific revision you use.

For a local installation, review the environment, FFmpeg, accelerator and backend requirements before downloading models. Optional speaker diarization or voice components may need separately accepted model terms and credentials. Keep those credentials in the runtime's secret settings.

conda create -n sonitr python=3.10 -y
conda activate sonitr
python -m pip install pip==23.1.2 Setuptools==80.6.0
conda install pytorch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 pytorch-cuda=11.8 -c pytorch -c nvidia
git clone https://github.com/r3gm/SoniTranslate.git
cd SoniTranslate
pip install -r requirements_base.txt -v
pip install -r requirements_extra.txt -v
pip install onnxruntime-gpu
conda install -y ffmpeg
python app_rvc.py

Build a glossary and speaker map before synthesizing speech

For an instructional clip, list the product names, numbers, units and commands that must not change. Add a small speaker map: who speaks, their segment boundaries and the intended output voice. Diarization labels such as speaker 0 identify clusters; they do not establish a person's identity or authorize cloning their voice.

Review the source transcript before translation. A confidently spoken mistranscription is still wrong. Then review the translation as speech: a literal sentence may be correct on paper but too long for its slot. Correct important terms consistently across segments rather than fixing each rendered audio file with a different spelling.

Suppose an illustrative source sentence occupies three seconds but its translated narration takes five. Speeding it up by roughly 1.67 times is a warning sign, not automatically an acceptable fix. Rewrite the target sentence, revise the segment timing or change the edit. Evaluate with a competent target-language reviewer; matching duration alone does not establish naturalness.

Editorial diagram showing the workflow and its separate checks
AIDreamHub editorial diagram. A workflow illustration, not a product screenshot or measured benchmark.
Keep checkpoints that reveal where the error started
CheckpointSaveCheck
RecognitionSource transcript and segment timesNames, numbers, missing or repeated words
TranslationReviewed target text and glossaryMeaning, terminology and spoken length
Speaker mappingSegment-to-voice assignmentSwitches at the right speaker boundaries
Synthesis and timingAudio plus rendered videoPronunciation, overlaps and scene-cut alignment

Run and inspect each stage

Use the application's current controls for source language, target language and speakers. Keep the original audio and intermediate transcript so you can identify the stage that failed.

  1. Load the short clip and confirm that its audio plays correctly.
  2. Select the source and target language and review the expected speakers.
  3. Run recognition and inspect names, punctuation and segment boundaries.
  4. Review translated text before generating the final speech where the workflow permits editing.
  5. Listen to the output while watching the video and note timing or speaker errors.

Diagnose installation and model failures without reinstalling blindly

Check the environment from the same activated terminal that launches the application. Confirm Python, FFmpeg and accelerator visibility before downloading another model. A working command in your system shell does not prove that the Conda process can find the same executable or libraries.

If a gated model download fails, distinguish missing authorization from a network failure: accept the required model conditions in the correct Hugging Face account and provide an appropriately scoped token through a private environment or notebook secret. Never paste tokens into screenshots or public issue reports. If the model downloads but processing fails, preserve the exact exception and the dependency versions.

For an out-of-memory error, reduce the test clip and the relevant workload or choose a smaller supported component before buying more compute. There is no universal memory number for the whole pipeline: transcription, separation and voice backends can have different peaks. Use the official issue tracker as troubleshooting evidence, not as proof that a random old package downgrade is suitable for your revision.

python --version
ffmpeg -version
python -c "import torch; print(torch.__version__); print(torch.cuda.is_available())"
git rev-parse HEAD

Diagnose problems by stage

Recognition errors become translation errors and then convincing spoken mistakes. Fixing a voice setting will not repair an incorrectly recognized product name.

Locate the failure before regenerating the whole video
SymptomCheck firstNext action
Incorrect namesSource transcriptCorrect spelling and rerun downstream stages
Wrong speaker voiceSpeaker assignmentReview diarization and voice mapping
Speech spills into the next shotTranslation length and timingShorten wording or adjust segment timing
Model or encoder errorRuntime and dependenciesCompare the exact error with repository issues

Know when SoniTranslate is more work than the job needs

WhisperX focuses on recognition, word-level alignment and diarization; it is a useful comparison when the deliverable is timed text rather than a finished dubbed video. A managed dubbing service such as ElevenLabs offers a hosted project-and-language workflow. These are different product boundaries, not interchangeable install commands or a quality ranking.

SoniTranslate is a stronger fit when you want to choose pipeline components and can maintain the environment. A hosted service can be more practical for a team that needs review and delivery with little infrastructure work. If you only need subtitles, adding voice synthesis, speaker conversion and audio mixing introduces work that does not improve the requested deliverable.

Before scaling, archive the accepted short clip, revision, environment notes, model/voice identifiers and the reviewed transcript. Review model and voice terms independently from the repository's software license. Do not describe a local interface as an offline privacy guarantee if the selected translation or speech backend sends content to an external service.

Scale after one accepted output

Save the working revision, environment and voice settings with the accepted clip. Process a longer section next and keep time for human language review. A successful installation only establishes that the pipeline runs; it does not establish translation accuracy.

Hosted notebooks have usage limits and local runs have hardware costs. Check each model and voice license for the intended use, and obtain permission for any voice likeness used in the workflow.

Common questions

Is SoniTranslate the same as transcription?

No. Transcription produces text from speech; dubbing also translates that text and generates target-language speech that must fit the media timing.

Should I start with a full video?

Start with a short sample containing the speakers and terminology that matter. It is cheaper and easier to debug recognition, voice assignment and timing before a long run.

Do I need exactly the GPU setup shown in the README?

The README's tested Linux stack is a reproducibility baseline, not a hardware guarantee for every backend. Requirements depend on the chosen recognition, separation and voice components. Start with the documented environment and a small clip; consult the current revision before substituting a different CUDA or PyTorch build.

Why does a translated sentence overlap the next shot?

The translated wording may take longer to speak than the source slot allows. Check segment boundaries and the target text before changing voice speed. Shorten or rephrase without changing meaning, or adjust the edit. A target-language listener should approve the result, not just a duration counter.

Does the repository license cover every voice and model?

No single software license establishes all downstream rights. Review the model, speech backend, external service terms and any voice-likeness permission for your chosen configuration. Keep those choices with the project so you can reproduce both the processing and the rights review later.

Official sources

We check official documentation, explain limits and link to our sources. These are editorial guides, not scored hands-on benchmarks. Plan availability can change; check the linked provider before paying.

Explore related tools