Skip to main content

🎙️ youtube-dubber

PyPI version Python License: GPL v3 GitHub

Dub any YouTube video into Hindi (and 19 other languages) with a casual, engaging neural voice — like a desi YouTuber, not a robotic narrator.

Give it a URL → it pulls the captions, translates them to natural casual speech, generates a neural voice, and saves synced dubbed audio clips + a manifest. Fully headless — use it in scripts, servers, or pipelines.

How it works


⚡ Quick start

pip install youtube-dubber
export GROQ_API_KEY=gsk_xxxxxxxx        # free key → https://console.groq.com/keys
from youtube_dubber import dub

manifest = dub(
    "https://www.youtube.com/watch?v=VIDEO_ID",
    lang="hindi",       # any of 20 languages
    gender="female",    # "male" or "female"
    out="./out",
)
print(len(manifest["segments"]), "segments dubbed")

Or from the command line:

youtube-dubber --url https://youtu.be/VIDEO_ID --lang hindi --gender female --out ./out

Output: out/audio/<videoId>_<lang>_<gender>/seg_NNNNN.mp3 clips + out/manifest.json.


⚠️ System Requirements

pip install brings the Python code, but you must also have these on your system (they are not pip-installable Python packages):

Requirement Why Install
🐍 Python 3.10+ runtime
🎬 ffmpeg audio conversion / time-stretch sudo apt install ffmpeg · brew install ffmpeg · windows
⬇️ yt-dlp fetches captions & stream info pip install -U yt-dlp
🔑 Groq API key translation + Whisper STT (free tier) console.groq.com/keys
🌐 Internet edge-tts calls Microsoft's neural voices

💡 Install yt-dlp alongside the package: pip install "youtube-dubber[ytdlp]" ffmpeg must be on your PATH — it is a system binary, not a pip package.


🌍 Supported languages (20)

Indian (casual Hinglish / code-switch style — tech terms stay English): Hindi · Tamil · Telugu · Bengali · Marathi · Gujarati · Kannada · Malayalam · Punjabi · Urdu

International (full translation): Spanish · French · German · Japanese · Chinese · Korean · Arabic · Portuguese · Russian · Italian

Each has a male & female neural voice. Source language is auto-detected — dub an Arabic, Chinese, or English video into Hindi, all the same way.


🧠 Live progress (callback API)

from youtube_dubber import Dubber

def on_event(ev):
    if ev["type"] == "progress":
        print(f"[{ev['step']}] {ev['pct']}%  {ev['msg']}")
    elif ev["type"] == "segment":
        print("dubbed:", ev["dubbed"])

Dubber(lang="hindi", gender="male", out_dir="./out", on_event=on_event).run(url)

Event types: stream_url · progress · segment · done · error


✨ Why it's different

  • Casual, not robotic — prompt-tuned to sound like a real creator ("तो भाई, scene ये है…"), not a textbook
  • Auto language detection — works on any source language out of the box
  • Disk cache — re-running the same video is instant (no re-translation/TTS)
  • Rate-limit resilient — automatic retries so segments never silently vanish
  • Fit-to-window timing — clips are speed-matched (≤1.4×) so dubbing stays in sync without sounding sped-up

🖥️ Want the desktop app instead?

This package is the headless engine. There's also a full Electron desktop app (paste a URL, watch the dubbed video live with subtitles) and a real-time Live Dub mode — see the GitHub repo:

👉 github.com/Ashut90/youtube-dubber


📄 License

GPL-3.0 — © 2026 Ashutosh (@Ashut90). Forks must stay open source and credit the original. See LICENSE.

Built with Groq · edge-tts · yt-dlp · ffmpeg.

Release files for youtube-dubber 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for youtube-dubber 0.2.0
File Size Uploaded
youtube_dubber-0.2.0.tar.gz 29.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for youtube-dubber 0.2.0
File Interpreter ABI Platform
youtube_dubber-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 52.5 kB

Release files / youtube_dubber-0.2.0.tar.gz

Download URL youtube_dubber-0.2.0.tar.gz
Size 29.4 kB
Tags Source
SHA-256 checksum
How to use checksums
819481ec29d249aca941758def96ef9d95b88770b15a4d2b6ebe2fc81f01434d
BLAKE2b-256 checksum
How to use checksums
8ea8bcf6f7d45f89ade6883509f9774540fbb5933d7844ba400918094f74ec0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / youtube_dubber-0.2.0-py3-none-any.whl

Download URL youtube_dubber-0.2.0-py3-none-any.whl
Size 23.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6ebb1ff48121ebdf35cf6a5fc432d54bb5e2d4a36039515c02433a20f91c55fd
BLAKE2b-256 checksum
How to use checksums
4c393dbc88b3d4e0460071aeb355e624438b25b6805d43da971d8043968c15a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release 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