This was made to help me learning foreign languages using videos. That way, this cli reads a .srt file extracting phrases, splitting the video's audio to match the phrases and exporting them to a gave directory.
- Clone this repository;
- Make sure you have poetry installed;
- Execute
poetry install
inside the directory that containspyproject.toml
file. - Execute
poetry build
inside the same directory said above. - In the dist directory, install the .whl file with pip.
This will expose a video2phrases
command with below options:
Usage: video2phrases [OPTIONS]
Reads a .srt file extracting phrases, spliting the video's video to match
the .srt phrases and export them to output_dir.
Options:
--video TEXT Video path
--srt TEXT .srt path
--output-dir TEXT Directory to write the audio and txt files
--help Show this message and exit.