Is there a way to limit the length of the file being created? #29
-
Currently the generation is working out fine but its too long. Its generating subtitles for 0-9 seconds and thats 9 seconds of text, which at the speed that my video is speaking is about two paragraphs worth of text to be showing as subtitles. Is there a way to limit the text's generation, either by character length, or timeframe? ie generate captions for 2 second intervals, or generate captions for 100 characters only and have it autosync. I've read through the docs but I'm not exactly sure if what I found does what I want it to. Specifically Also is using a mp3 or a mp4 file more efficient? I need to create the mp3 file for another part of the project and in theory its a smaller file which should take less time. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
@abdeladim-s Sorry, not sure if you actively read discussions but the documentation isn't really explaining. |
Beta Was this translation helpful? Give feedback.
-
Hi @davidliaos, I don't quite understand your question.
About your other question, using mp3 or mp4 does not make any difference with regards to the transcription time. |
Beta Was this translation helpful? Give feedback.
-
@abdeladim-s Currently I'm getting these time stamps, 00:00:00,000 --> 00:00:30,000 These are fine but they are sending entire paragraphs of text to throw on screen which covers up the actual video itself. Initially I was looking to see if i could do a character limit, such as each line is limited to 200 characters, and if it reaches 200 characters it'll create a new caption and a new timestamp. |
Beta Was this translation helpful? Give feedback.
Ahh ok I think I understand, I did this in my pywhispercpp repo.
To do this in
subsai
you will need to choose thewhisper.cpp
from the models, then from the configs you'll need to settoken_timestamps
toTrue
andmax_len
to the maximum number of characters you want (in your case 200).You can try it from the
webui
quickly to see the results.