kelciour / playphrase

Search and play phrases from movies and audiobooks
169 stars 26 forks source link

Extract only one word! #17

Closed raj6996 closed 4 years ago

raj6996 commented 4 years ago

I checked additional option. I can't figured out. How do cut only one word instead of phrase?

kelciour commented 4 years ago

There's no such option. The script just uses timings from subtitles.

Another program is required to generate word-by-word subtitles. Something like https://github.com/lowerquality/gentle or https://github.com/saurabhshri/CCAligner or maybe https://github.com/readbeyond/aeneas

I haven't used aeneas for word-by-word alignment, CCAligner seems to be quite difficult to install and I only tried gentle a few years ago and don't know if there's another way to do something similar.

Gentle might skip some words but overall seems to work wery well. But it's quite slow and it might take a few minutes to sync one-minute audio file. I've attached a zip archive with a few sample files and gentle.py to convert json to srt - gentle-sample.zip

There's also DeepSpeech by Mozilla and DSAlign that might do word alignment but I don't know if it's easy to use or not.

Or maybe CMU Pocketsphinx and https://github.com/antiboredom/audiogrep

raj6996 commented 4 years ago

Thanks I will try your guide.