Small scripts to clean up the content of a subtitle file .vtt
to plain text.
pip install vtt2text
vtt2text.clean(filepath)
: return a clean text containing content ofvtt
file input.vtt2text.to_file(filepath)
: save clean content to a text file. By default, the output file has extension.txt
and the same name with the input file.
Before:
After:
An example is at test.py.