This repo contains a tool to translate .str subtitles file from English to Spanish:
- A suitable conda environment named translate_subs can be created and activated with:
conda env create -f environment_subs.yml
conda activate translate_subs
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).
Subtitle files considered for this tool are .srt files. The structure of these files is the following:
The model used for translation has been trained and host at HugginFace hub:
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