m1guelpf / auto-subtitle

Automatically generate and overlay subtitles for any video.
MIT License
1.3k stars 222 forks source link

Single word subtitles #80

Open Tc554 opened 1 month ago

Tc554 commented 1 month ago

Currently its generating subtitles sentence after sentence and I want to make it word by word is it possible with this package?

Nishan666 commented 1 month ago

It seems like you're looking to change the format of subtitle generation from sentence-by-sentence to word-by-word. This might be to enhance subtitle accuracy or for some other specific requirement. While the current package may not support word-by-word generation directly, there are alternative approaches you can explore.

Firstly, to improve accuracy, using larger models like medium or large could be beneficial. These models often have a better understanding of context and can generate more accurate subtitles.

However, if you specifically need word-by-word generation, you'll likely need to handle the generation process differently. Word-by-word generation wouldn't typically fit into .srt or .vtt file formats, as those formats are structured around sentences and timestamps. Instead, you'd likely output to a plain text (.txt) file.

To achieve word-by-word generation, you could generate the subtitles as sentences as you're currently doing, then post-process the output to split each sentence into individual words. This could be done using a Python script or an online converter. There are tools available online that can convert .srt files to plain text (.txt) format, and you could then modify the content to be word-by-word. https://www.happyscribe.com/subtitle-tools/convert-srt-to-word

Happy Scribe
Convert SRT to Word | Happy Scribe
Free online SubRip (.srt) to Microsoft Word (.docx) subtitle converter. No signup required.