Skip to content

The idea was to finetune a translation model and later apply it on subtitle files. Just for fun. πŸ™ƒ

Notifications You must be signed in to change notification settings

Razwand/subtitle_translation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

22 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎬 Subtitle Translation 🎬

This repo contains a tool to translate .str subtitles file from English to Spanish:

Sample

Requirements

  • A suitable conda environment named translate_subs can be created and activated with:
conda env create -f environment_subs.yml
conda activate translate_subs

Context

The idea is to convert a file containing English subtitles with the structure of a str file into the Spanish version of it. A translation model is used to get the predictions (text in Spanish).

About the structure of a .str file

Subtitle files considered for this tool are .srt files. The structure of these files is the following:

STRFILE

About the model

The model used for translation has been trained and host at HugginFace hub:

πŸ€—Translation Model

How to

⚠️Note: original .srt must be saved as a .txt file.

The following scenario shows how to translate an original file with English subtitles into Spanish.

subtitle_translation>python translate_my_subs.py HTWJW_1.txt

About

The idea was to finetune a translation model and later apply it on subtitle files. Just for fun. πŸ™ƒ

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages