pszemraj / vid2cleantxt

Python API & command-line tool to easily transcribe speech-based video files into clean text
Apache License 2.0
186 stars 25 forks source link

Do not translate when using a different language model #17

Open robertoronderosjr opened 1 year ago

robertoronderosjr commented 1 year ago

Hey thanks a lot for this work, this is great. However, I wanted to use a different model (rjac/whisper-tiny-spanish) to transcribe a video in spanish and it did! but it translated the whole thing to english. Could this be skipped?

pszemraj commented 1 year ago

Thanks for reaching out! I can look into integrating this feature when I do another PR on it. The main reason English-output was assumed (just so you know) is that a lot of the "cleanup" features (spell checking, punctuation, etc.) either originally only worked for English out of the box or were much easier to implement if you assumed that. However, I think this can be implemented in two parts:

  1. option(s)/flags to skip all the correction/translation bits etc, add in functionality for Whisper integration to specify the language (so it does not assume English, iirc it does). I can do this in a few weeks, hopefully when I have time to work on it again :)
  2. Add "real" multi-language support with the downstream bits I mentioned. Maybe one day... but to be honest, not sure I will have time to implement this myself. We will see!

Hope this helps & let me know your thoughts!