david-andrew / auto-subtitle

automatically translate subtitles to a different language using LLMs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Auto Subtitle

Automatically translate subtitles to a specified language using GPT4.

Setup

sudo apt install mkvtoolnix
conda create -n subtitle python=3.12
conda activate subtitle
pip install -r requirements.txt

Usage

  1. Start the program
    python auto_subtitle.py
  2. follow the dialogs/prompts for:
    1. selecting a language
    2. selecting a video file
    3. selecting one or more subtitle files

Then the program should start the translation. When done translating, the subtitles will be merged into a copy of the video file saved at output/<video_name>.mkv.

Notes

  • llm_log.txt contains the current in progress translation
  • if llm_log.txt has partial content that matches the current translation (checked by comparing timestamps), then the program will pick up from where it left off
  • completed translations are cached in the sqlite database file translations.db

About

automatically translate subtitles to a different language using LLMs


Languages

Language:Python 100.0%