Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🇰🇭 Gemini Khmer Video Translator

An open-source, AI-powered pipeline that automatically translates English video content into high-quality Khmer. Built with a "Vibe Coding" philosophy for rapid, natural-language-driven prototyping, this tool leverages Google's cutting-edge Gemini Multimodal APIs to generate both studio-quality voice dubs and perfectly synced WebVTT subtitles.

✨ Features

  • Native Khmer TTS: Uses Gemini 3.1 Flash TTS (with custom directorial prompts) to generate expressive, natural-sounding Cambodian voices (e.g., Aoede, Erinome, Enceladus).
  • Smart Subtitling: Generates strict, timeline-accurate .vtt WebVTT subtitle files natively supported by HTML5 web browsers.
  • Context-Aware Translation: Uses Gemini 2.5 Flash's multimodal capabilities to listen to the video's audio directly, rather than relying on error-prone intermediary transcripts.
  • Built-in Web Player: Automatically generates an index.html file to instantly preview your translated video and subtitles on any mobile or desktop browser.

🚀 Prerequisites

  • Python 3.10+
  • A Google Gemini API Key (Accessible via Google AI Studio)
  • FFmpeg (required by MoviePy for video processing)

📦 Installation

  1. Clone the repository:
    git clone [https://github.com/yourusername/gemini-khmer-translator.git](https://github.com/yourusername/gemini-khmer-translator.git)
    cd gemini-khmer-translator
  2. Install the required Python dependencies:
    pip install google-genai moviepy
  3. Insert your API Key: Open the scripts and replace "YOUR_API_KEY_HERE" with your actual Gemini API key.

About

An AI-powered pipeline using Gemini 2.5 and 3.1 TTS to automatically translate English videos into natural Khmer voice-overs and perfectly timed WebVTT subtitles.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages