Skip to content

A program that uses deepl or google to translate multiple subtitle files.

Notifications You must be signed in to change notification settings

voun7/Subtitle_Translator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Subtitle Translator

python version

A program that uses deepl or google to translate multiple subtitle files. Both services offer free api access.

Instructions

Install Packages

pip install -r requirements.txt
  • Run the program once to create the credential files.
  • At least one api key must be provided for the program to run.

Deepl API

Deepl Supported Languages

  • Setup free access to the Deepl Translate api. Link
  • Get the api key from here and paste it in the deepl api key.txt file.

Google API

Google Supported Languages

  • Setup free access to the Google Translate api. Link
  • Get the api key from here and paste it in the google api key.txt file.

Usage

  • A folder containing the subtitles to be translated and the source and target language should be provided.
  • The subtitles should all have .srt extensions.
translation_dir = Path(r"C:\Users\user1\Downloads\Chinese Videos")
source_lang, target_lang = "ch", "en"

About

A program that uses deepl or google to translate multiple subtitle files.

Topics

Resources

Stars

Watchers

Forks

Languages