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.16k stars 96 forks source link

Help to understand parameters #62

Closed federicoemartinez closed 11 months ago

federicoemartinez commented 11 months ago

First, thank you for your work. I have a movie in Russian and I would like English or Spanish subtitles. How should I call subsai? Is there a model which works best for languages other than English?

abdeladim-s commented 11 months ago

You are welcome @federicoemartinez :)

If the size of the movie is not too big, you can try with the webui first. the process is straightforward and you can adjust the different parameters to whatever it works best for your machine.

Otherwise, I would suggest to cut a small fragment from the movie and transcribe it using the webui, once you are satisfied with the results, you can take the parameters and use the command line interface to transcribe the whole movie.

But I think something like the following would work:

subsai  /path/to/your/movie --model openai/whisper --model-configs '{"model_type": "large", "language": "ru", "task": "translate"}'  --format srt

This will generate English subtitles.

regarding your last question, I think the large model is the only multilingual one [check the available models here], so I think it is the only option to choose from. I haven't tried it on the Russian language tbh but give it a try, it might be good.

You can also try guillaumekln/faster-whisper instead of openai/whisper which is a more efficient implementation of whisper, but I am not sure if it supports the translation task, you can try it as well.

Hope this helps ?

federicoemartinez commented 11 months ago

Very complete answer. Thanks a lot! I proceed to close this issue as you have answered my question.