abdeladim-s / subsai

🎞️ Subtitles generation tool (Web-UI + CLI + Python package) powered by OpenAI's Whisper and its variants 🎞️
https://abdeladim-s.github.io/subsai/
GNU General Public License v3.0
1.15k stars 96 forks source link

How to add space between subtitles? #91

Open erturkdotgg opened 6 months ago

erturkdotgg commented 6 months ago

Hello. There is no space between two sentences when using whisper.ccp model. In other words, when the speaker finishes the sentence, the subtitle is still shown. I just want it to be displayed only when speaker is speaking. But subtitles always appear. What setting should I change?

abdeladim-s commented 6 months ago

Yes I noticed the same with whisper.cpp and openai/whisper as well. I don't think this is related to a specific config, but let me know if you find any solution for this issue. The only thing you can do is to choose another implementation like faster-whisper or WhisperX to get exact timestamps.

erturkdotgg commented 6 months ago

Yes I noticed the same with whisper.cpp and openai/whisper as well. I don't think this is related to a specific config, but let me know if you find any solution for this issue. The only thing you can do is to choose another implementation like faster-whisper or WhisperX to get exact timestamps.

Hello, thanks a lot. Want to ask one more thing. Subtitles sometimes go out of sync when using Faster-Whisper. Is there any way to fix this? It's seriously going very out of sync. However, the conversation is not intense.

abdeladim-s commented 6 months ago

Yes I noticed the same with whisper.cpp and openai/whisper as well. I don't think this is related to a specific config, but let me know if you find any solution for this issue. The only thing you can do is to choose another implementation like faster-whisper or WhisperX to get exact timestamps.

Hello, thanks a lot. Want to ask one more thing. Subtitles sometimes go out of sync when using Faster-Whisper. Is there any way to fix this? It's seriously going very out of sync. However, the conversation is not intense.

Hello, if the subtitles are out of sync you can try ffsubsync (you can find it in the post processing tools in the webui) to re-sync them again. Otherwise, depending on the target language, you can try different implementations and stick with the one that gives you good results.

erturkdotgg commented 6 months ago

Yes I noticed the same with whisper.cpp and openai/whisper as well. I don't think this is related to a specific config, but let me know if you find any solution for this issue. The only thing you can do is to choose another implementation like faster-whisper or WhisperX to get exact timestamps.

Hello, thanks a lot. Want to ask one more thing. Subtitles sometimes go out of sync when using Faster-Whisper. Is there any way to fix this? It's seriously going very out of sync. However, the conversation is not intense.

Hello, if the subtitles are out of sync you can try ffsubsync (you can find it in the post processing tools in the webui) to re-sync them again. Otherwise, depending on the target language, you can try different implementations and stick with the one that gives you good results.

TypeError: TranscriptionOptions.new() missing 3 required positional arguments: 'repetition_penalty', 'no_repeat_ngram_size', and 'prompt_reset_on_temperature'

WhisperX is broken. It gives this error but there is no place to put these parameters on webui

abdeladim-s commented 6 months ago

@erturkdotgg, this is an issue with WhisperX, see #486

People reported that cloning the project and install it in editable mode seems to fix the issue. You can give it a try:

git clone https://github.com/m-bain/whisperX.git
cd whisperX
pip install -e .
erturkdotgg commented 6 months ago

@erturkdotgg, this is an issue with WhisperX, see #486

People reported that cloning the project and install it in editable mode seems to fix the issue. You can give it a try:

git clone https://github.com/m-bain/whisperX.git
cd whisperX
pip install -e .

Yeah it fixed but sadly faster-whisper and whisperX do not have rocM AMD support. So i need to use whispercpp for AMD GPU support but sadly whispercpp also has subtitle space issue. I'm so confused

abdeladim-s commented 6 months ago

@erturkdotgg, in that case you either have to use faster-whisper with your CPU (it's quite good as well) or use the original openai/whisper with your AMD GPU, I believe Pytorch supports AMD now.