heyncth/youtube-auto-dub

AI-powered YouTube video dubbing pipeline. Automatically transcribes (Whisper), translates (Google), and generates neural dubbing (Edge-TTS) with smart audio-video synchronization and background music preservation.

What it solves

This tool automates the process of translating, subtitling, and dubbing YouTube videos. It handles the entire pipeline locally, from downloading the video to generating a final file with translated audio and/or subtitles.

How it works

The project follows a seven-step automated pipeline: it downloads the video, transcribes the audio using Whisper, chunks the text into natural segments, translates the text via Google Translate, generates speech using TTS engines (Edge or Qwen), mixes the audio, and finally renders the output using FFmpeg.

Who it’s for

It is designed for users who want to localize YouTube content automatically and have access to a computer with Python 3.10+ and FFmpeg installed. It is particularly useful for those who want to experiment with different voices, language pairs, or voice cloning features.

Highlights

  • Supports both subtitle generation and full audio dubbing.
  • Includes voice cloning and persona options for natural-sounding speech.
  • Features smart caching to skip redundant steps (like downloading or transcribing) on reruns.
  • Allows for background music preservation in the final dub.
  • Handles age-restricted content via browser cookie integration.

Related

  • Project
  • Project
  • Project
  • Project