Skip to main content

Mazinger Dubber

Mazinger Dubber

End-to-end video dubbing pipeline. Download a video, transcribe it, translate the subtitles, clone a voice, and produce a fully dubbed audio or video — in one command.

Watch demo video
▶️ Watch Demo Video (with audio)


🚀 Get Started in 2 Steps

Prerequisites: Python 3.10+ and ffmpeg on your PATH (apt install ffmpeg / brew install ffmpeg).

1. Install

⚠️ Use uv — plain pip will fail. mazinger[all] bundles packages with conflicting dependency pins that only uv can resolve. Install uv once: pip install uv

uv pip install "mazinger[all]"

2. Launch the Web UI

mazinger web --with-ollama --with-coherex

A local URL opens in your browser. Paste a video link, pick a voice, and click Start. The flags install a free local LLM (Ollama) and pre-download CohereX, the transcription backend Studio defaults to — no API keys required.

No Hugging Face account? CohereX's weights are gated, so swap in --with-faster-whisper and pick Faster Whisper in the UI — it needs no sign-in and covers any language.

The flags only move the wait to launch time: if you run plain mazinger web, Studio installs Ollama and pulls the model by itself the first time you start a mission with the Ollama (Local — Free) provider. Set OLLAMA_HOST to use an Ollama server running elsewhere.

💡 No GPU? Run it on a free Colab T4 in two clicks: Open In Colab

Prefer the command line or Python? Skip ahead to Common Tasks or the Python API.


✨ What You Get

mazinger[all] is a single, GPU-friendly install that includes everything needed for the full pipeline and the Studio web UI:

Capability Engine
Local transcription — 14 languages + a dedicated Arabic model CohereX — Cohere Transcribe + wav2vec2 (Studio default)
Local transcription — any language, no sign-in Faster Whisper (CLI default)
Cloud transcription (no GPU) Deepgram Nova 3 — $200 free credit
Voice-cloned TTS Qwen3-TTS, OmniVoice (24 languages)
Background-audio separation Demucs
Web UI Gradio (Mazinger Studio)
Local LLM (optional) Ollama (auto-installed by mazinger web)

CohereX needs a one-time Hugging Face sign-in — the Cohere models are gated. In the Studio, open 🤗 Hugging Face → Sign in with Hugging Face; from the CLI, set HF_TOKEN. Not signed in, or working in a language CohereX does not cover? Switch the transcription method to Faster Whisper, which needs neither.

Need Chatterbox, MLX (Apple Silicon), or a lighter install? See the Installation Guidemazinger[all] now bundles CohereX, which brings the pyannote stack with it (~50 extra packages).


🛠️ Common Tasks

Dub a video — auto-clone the original speaker

No voice files needed. Mazinger picks the best 20–60 s of the source as the cloning reference.

mazinger dub "https://youtube.com/watch?v=VIDEO_ID" \
    --target-language Spanish

Dub with a ready-made voice theme

16 built-in themes — no files, no profile downloads.

mazinger dub "https://youtube.com/watch?v=VIDEO_ID" \
    --voice-theme narrator-m \
    --target-language Spanish

Themes: narrator-m/f · young-m/f · deep-m/f · warm-m/f · news-m/f · storyteller-m/f · kid-m/f · teen-m/f

Dub with a HuggingFace voice profile

mazinger dub "https://youtube.com/watch?v=VIDEO_ID" \
    --clone-profile abubakr \
    --target-language Arabic

Available out-of-the-box: abubakr · daheeh-v1 · 3b1b · italian-v1 · morgan-freeman · trump-v1 — full list in Voice Profiles.

Dub with your own voice sample

mazinger dub "https://youtube.com/watch?v=VIDEO_ID" \
    --voice-sample speaker.m4a \
    --voice-script speaker_transcript.txt \
    --target-language Spanish

Output a video with burned-in subtitles

mazinger dub "https://youtube.com/watch?v=VIDEO_ID" \
    --voice-theme narrator-m \
    --target-language Arabic \
    --output-type video \
    --embed-subtitles \
    --subtitle-google-font "Noto Sans Arabic"

See Subtitle Styling for fonts, colors, positioning, and RTL options.

Transcribe with CohereX (Cohere Transcribe)

14 languages with word-level alignment, plus a dedicated Arabic model that is selected automatically for Arabic sources. Included in mazinger[all], and the default in Mazinger Studio — nothing to install separately.

The Cohere models are gated on HuggingFace, so it needs a one-time sign-in. In the Studio, open 🤗 Hugging Face → Sign in with Hugging Face and follow the link it shows — no token to copy. From the CLI, set HF_TOKEN instead.

The CLI still defaults to Faster Whisper; pass --transcribe-method coherex to use CohereX there:

export HF_TOKEN=hf_your_token

mazinger dub "https://youtube.com/watch?v=VIDEO_ID" \
    --transcribe-method coherex \
    --source-language Arabic \
    --voice-theme narrator-m \
    --target-language English

⚠️ Cohere Transcribe cannot detect the source language on its own. Given one, it transcribes confidently in whatever language you name; given none, it probes each supported language first, which is slower and less reliable. Always pass --source-language (or pick one in the Studio).

Use Deepgram instead of a local GPU

export DEEPGRAM_API_KEY=your_key_here
mazinger dub "https://youtube.com/watch?v=VIDEO_ID" \
    --transcribe-method deepgram \
    --voice-theme narrator-m \
    --target-language English

Run a single stage

mazinger download   "https://youtube.com/watch?v=VIDEO_ID"
mazinger transcribe ./output/projects/my-video/source/audio.mp3 -o subs.srt
mazinger translate  --srt subs.srt --target-language French -o translated.srt
mazinger subtitle   video.mp4 --srt translated.srt -o output.mp4

Every stage caches its output. Re-running resumes where it stopped. Full command list in the CLI Reference.


🐍 Python API

from mazinger import MazingerDubber

dubber = MazingerDubber(openai_api_key="sk-...", base_dir="./output")

proj = dubber.dub(
    source="https://youtube.com/watch?v=VIDEO_ID",
    voice_theme="narrator-m",
    target_language="Spanish",
    output_type="video",
)

print(proj.final_video)   # ./output/projects/<slug>/tts/dubbed.mp4

Full reference: Python API.


🔧 How It Works

Mazinger chains ten resumable stages: Download → Transcribe → Thumbnails → Describe → Review → Translate → Re-segment → Speak → Assemble → Subtitle. Every stage runs standalone or as part of the full pipeline; completed stages and individual TTS segments are cached and skipped on re-runs.

See the Pipeline Overview for a diagram and the data flow between stages.


📚 Documentation

Topic What's inside
Installation All install options, advanced extras, Apple Silicon, Colab, uv overrides
Quick Start More copy-paste workflows
Pipeline Overview The ten stages, data flow, resume behavior
CLI Reference Every command, flag, and default
Python API Classes, functions, parameters
Voice Profiles Using, creating, uploading profiles
Subtitle Styling Fonts, colors, positioning, RTL, Google Fonts
Configuration Env vars, caching, tempo, LLM usage tracking
Project Structure Output directory layout
YouTube Cookies Cookies for age-restricted / region-locked videos

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mazinger-2.1.2.tar.gz (286.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mazinger-2.1.2-py3-none-any.whl (292.3 kB view details)

Uploaded Python 3

File details

Details for the file mazinger-2.1.2.tar.gz.

File metadata

  • Download URL: mazinger-2.1.2.tar.gz
  • Upload date:
  • Size: 286.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mazinger-2.1.2.tar.gz
Algorithm Hash digest
SHA256 f187c630be728534678df2fc355c235a29d582aa993762bbb62b32f5e7ed1b8f
MD5 6efbab7826481f2e16b334f2550fda3a
BLAKE2b-256 93b437c16b0d522557663bc1896beb9f49a9ec30d903901c4444cb86d12d2c9b

See more details on using hashes here.

Provenance

The following attestation bundles were made for mazinger-2.1.2.tar.gz:

Publisher: publish.yml on bakrianoo/mazinger

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mazinger-2.1.2-py3-none-any.whl.

File metadata

  • Download URL: mazinger-2.1.2-py3-none-any.whl
  • Upload date:
  • Size: 292.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mazinger-2.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ee79f7feb7f1442005fd60d10180f082110a33d5a9650fcd5028aadb13e61adc
MD5 9f5d0f948b01b9017c59d1a7b77c7f70
BLAKE2b-256 8ce8adfce90fbac22d1416e7dd9e14789a847a0961e6fde4c1ae737bafcff308

See more details on using hashes here.

Provenance

The following attestation bundles were made for mazinger-2.1.2-py3-none-any.whl:

Publisher: publish.yml on bakrianoo/mazinger

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

2.1.2 This release

2 files

2.1.1

2 files

2.0.1

2 files

1.9.5

2 files

1.9.4

2 files

1.9.2

2 files

1.9.1

2 files

1.9.0

2 files

1.8.9

2 files

1.8.8

2 files

1.8.7

2 files

1.8.6

2 files

1.8.4

2 files

1.8.2

2 files

1.8.0

2 files

1.7.5

2 files

1.7.4

2 files

1.7.3

2 files

1.7.2

2 files

1.7.1

2 files

1.7.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page