SubtitleEdit / subtitleedit

the subtitle editor :)
http://www.nikse.dk/SubtitleEdit/Help
GNU General Public License v3.0
8.86k stars 916 forks source link

Cannot run large-v3 whisper models #8979

Closed sfingali closed 1 week ago

sfingali commented 2 weeks ago

I am able to run all the Whisper models when using Audio to Text. However when I download large-v3, it won't work.

I get a "no text found" error and this is the readout:


Date: 11/07/2024 20:03:45 SE: 4.0.8.0 - Microsoft Windows NT 10.0.19045.0 - 64-bit Message: C:\Users\X\AppData\Local\Programs\Python\Python310\Scripts\whisper.exe --language en --model "large-v3" --model "large-v3" "C:\Users\S\AppData\Local\Temp\752e1a10-b7e8-4c64-bbcf-d0277b9f9198.wav"


Date: 11/07/2024 20:03:50 SE: 4.0.8.0 - Microsoft Windows NT 10.0.19045.0 - 64-bit Message: Calling whisper (OpenAI) with : C:\Users\sfing\AppData\Local\Programs\Python\Python310\Scripts\whisper.exe --language en --model "large-v3" --model "large-v3" "C:\Users\sfing\AppData\Local\Temp\752e1a10-b7e8-4c64-bbcf-d0277b9f9198.wav" [--verbose VERBOSE] [--task {transcribe,translate}]

[--output_format {txt,vtt,srt,tsv,json,all}]

[--output_dir OUTPUT_DIR]

[--model_dir MODEL_DIR] [--device DEVICE]

[--model {tiny.en,tiny,base.en,base,small.en,small,medium.en,medium,large-v1,large-v2,large}]

usage: whisper [-h]

whisper: error: argument --model: invalid choice: 'large-v3' (choose from 'tiny.en', 'tiny', 'base.en', 'base', 'small.en', 'small', 'medium.en', 'medium', 'large-v1', 'large-v2', 'large')

audio [audio ...]

[--max_line_count MAX_LINE_COUNT] [--threads THREADS]

[--max_line_width MAX_LINE_WIDTH]

[--highlight_words HIGHLIGHT_WORDS]

[--append_punctuations APPEND_PUNCTUATIONS]

[--prepend_punctuations PREPEND_PUNCTUATIONS]

[--word_timestamps WORD_TIMESTAMPS]

[--no_speech_threshold NO_SPEECH_THRESHOLD]

[--logprob_threshold LOGPROB_THRESHOLD]

[--compression_ratio_threshold COMPRESSION_RATIO_THRESHOLD]

[--temperature_increment_on_fallback TEMPERATURE_INCREMENT_ON_FALLBACK]

[--fp16 FP16]

[--condition_on_previous_text CONDITION_ON_PREVIOUS_TEXT]

[--initial_prompt INITIAL_PROMPT]

[--suppress_tokens SUPPRESS_TOKENS]

[--length_penalty LENGTH_PENALTY]

[--beam_size BEAM_SIZE] [--patience PATIENCE]

[--temperature TEMPERATURE] [--best_of BEST_OF]

[--language {af,am,ar,as,az,ba,be,bg,bn,bo,br,bs,ca,cs,cy,da,de,el,en,es,et,eu,fa,fi,fo,fr,gl,gu,ha,haw,he,hi,hr,ht,hu,hy,id,is,it,ja,jw,ka,kk,km,kn,ko,la,lb,ln,lo,lt,lv,mg,mi,mk,ml,mn,mr,ms,mt,my,ne,nl,nn,no,oc,pa,pl,ps,pt,ro,ru,sa,sd,si,sk,sl,sn,so,sq,sr,su,sv,sw,ta,te,tg,th,tk,tl,tr,tt,uk,ur,uz,vi,yi,yo,zh,Afrikaans,Albanian,Amharic,Arabic,Armenian,Assamese,Azerbaijani,Bashkir,Basque,Belarusian,Bengali,Bosnian,Breton,Bulgarian,Burmese,Castilian,Catalan,Chinese,Croatian,Czech,Danish,Dutch,English,Estonian,Faroese,Finnish,Flemish,French,Galician,Georgian,German,Greek,Gujarati,Haitian,Haitian Creole,Hausa,Hawaiian,Hebrew,Hindi,Hungarian,Icelandic,Indonesian,Italian,Japanese,Javanese,Kannada,Kazakh,Khmer,Korean,Lao,Latin,Latvian,Letzeburgesch,Lingala,Lithuanian,Luxembourgish,Macedonian,Malagasy,Malay,Malayalam,Maltese,Maori,Marathi,Moldavian,Moldovan,Mongolian,Myanmar,Nepali,Norwegian,Nynorsk,Occitan,Panjabi,Pashto,Persian,Polish,Portuguese,Punjabi,Pushto,Romanian,Russian,Sanskrit,Serbian,Shona,Sindhi,Sinhala,Sinhalese,Slovak,Slovenian,Somali,Spanish,Sundanese,Swahili,Swedish,Tagalog,Tajik,Tamil,Tatar,Telugu,Thai,Tibetan,Turkish,Turkmen,Ukrainian,Urdu,Uzbek,Valencian,Vietnamese,Welsh,Yiddish,Yoruba}] Calling whisper OpenAI done in 00:00:02.9573048 Loading result from STDOUT

darnn commented 2 weeks ago

As suggested here in your output: whisper: error: argument --model: invalid choice: 'large-v3' (choose from 'tiny.en', 'tiny', 'base.en', 'base', 'small.en', 'small', 'medium.en', 'medium', 'large-v1', 'large-v2', 'large')

You should just call it "large" rather than "large-v3".

sfingali commented 2 weeks ago

Thanks - but I've just tried that by trying to set a manual model argument with "large" but I get the same error. I have to select "large-v3" and the manual argument doesn't override it.

darnn commented 1 week ago

What happens when you just try to run it from the command line yourself? Like: C:\Users\X\AppData\Local\Programs\Python\Python310\Scripts\whisper.exe --language en --model large "C:\whatever.wav" Because it sounds like you might be adding arguments, but they're not cancelling out the arguments that Subtitle Edit already passes to it, so the "large-v3" part might be coming from there regardless.