Huanshere / VideoLingo

Netflix-level subtitle cutting, translation, alignment, and even dubbing - one-click fully automated AI video subtitle team | Netflix级字幕切割、翻译、对齐、甚至加上配音,一键全自动视频搬运AI字幕组
https://docs.videolingo.io
Apache License 2.0
7.19k stars 690 forks source link
ai-translation dubbing localization video-translation voice-cloning
VideoLingo Logo # Connect the World, Frame by Frame [Website](https://videolingo.io) | [Documentation](https://docs.videolingo.io/docs/start) [**English**](/README.md)|[**中文**](/i18n/README.zh.md)

🌟 Overview (Try VideoLingo Now!)

VideoLingo is an all-in-one video translation, localization, and dubbing tool aimed at generating Netflix-quality subtitles. It eliminates stiff machine translations and multi-line subtitles while adding high-quality dubbing, enabling global knowledge sharing across language barriers.

Key features:

Difference from similar projects: Single-line subtitles only, superior translation quality, seamless dubbing experience

🎥 Demo

### Russian Translation --- https://github.com/user-attachments/assets/25264b5b-6931-4d39-948c-5a1e4ce42fa7 ### GPT-SoVITS Dubbing --- https://github.com/user-attachments/assets/47d965b2-b4ab-4a0b-9d08-b49a7bf3508c

Language Support

Input Language Support(more to come):

🇺🇸 English 🤩 | 🇷🇺 Russian 😊 | 🇫🇷 French 🤩 | 🇩🇪 German 🤩 | 🇮🇹 Italian 🤩 | 🇪🇸 Spanish 🤩 | 🇯🇵 Japanese 😐 | 🇨🇳 Chinese* 😊

*Chinese uses a separate punctuation-enhanced whisper model

Translation supports all languages, while dubbing language depends on the chosen TTS method.

Installation

Windows users can double-click OneKeyInstall&Start.bat to install (requires Git). The script will download Miniconda and install the complete environment. For NVIDIA GPU users, you need to first install CUDA 12.6 and CUDNN 9.3.0, then add C:\Program Files\NVIDIA\CUDNN\v9.3\bin\12.6 to system environment variables and restart.

MacOS/Linux users should install from source, requiring python=3.10.0 environment.

  1. Clone the repository
git clone https://github.com/Huanshere/VideoLingo.git
cd VideoLingo
  1. Install dependencies
conda create -n videolingo python=3.10.0
conda activate videolingo
python install.py
  1. Start the application
streamlit run st.py

Alternatively, you can use Docker (requires CUDA 12.4 and NVIDIA Driver version >550), see Docker docs:

docker build -t videolingo .
docker run -d -p 8501:8501 --gpus all videolingo

API

The project supports OpenAI-Like API format and various dubbing interfaces:

For detailed installation, API configuration, and batch mode instructions, please refer to the documentation: English | 中文

Current Limitations

  1. WhisperX transcription performance may be affected by video background noise, as it uses wav2vac model for alignment. However, WhisperX can still solve 99% of Whisper's hallucination issues.

  2. Using weaker models can lead to errors during intermediate processes due to strict JSON format requirements for responses. If this error occurs, please delete the output folder and retry with a different LLM, otherwise repeated execution will read the previous erroneous response causing the same error.

  3. The dubbing feature may not be 100% perfect due to differences in speech rates and intonation between languages, as well as the impact of the translation step. However, this project has implemented extensive engineering processing for speech rates to ensure the best possible dubbing results.

  4. Multilingual video transcription recognition will only retain the main language. This is because whisperX uses a specialized model for a single language when forcibly aligning word-level subtitles, and will delete unrecognized languages.

  5. Cannot dub multiple characters separately, as whisperX's speaker distinction capability is not sufficiently reliable.

📄 License

This project is licensed under the Apache 2.0 License. Special thanks to the following open source projects for their contributions:

whisperX, yt-dlp, json_repair, BELLE

📬 Contact Us

⭐ Star History

Star History Chart


If you find VideoLingo helpful, please give us a ⭐️!