m-bain / whisperX

WhisperX: Automatic Speech Recognition with Word-level Timestamps (& Diarization)
BSD 2-Clause "Simplified" License
12.69k stars 1.35k forks source link

Alignment model For language "CS" not loading, throwing an error #448

Closed Oheed911 closed 1 year ago

Oheed911 commented 1 year ago

I am loading the alignment model for CS like this:

 alignment_model_cs,metadata_cs=whisperx.load_align_model(
        language_code="cs", device="cuda:0")

it is giving me the following error:

traceback (most recent call last) : File "/home/ralve/pipeline/optimized/optimized_code.py", line 643, in model = load_models_all() File "/home/ralve/pipeline/optimized/optimized_code.py", line 74, in load_models all alignment_model_cs,metadata cs=whisperx. load align_model( File "/usr/10ca1/1ib/python3.1ø/dist-packages/whisperx/a1igrment.py", line 58, in load_align_model raise ValueError(f"No default align-model for language: {language_code}") alueError: No default align-model for language: cs

I think it is not in default model, it should download the model automatically as it did for other language like "nl", "zh" etc but for "cs" it is giving me the above error.

Oheed911 commented 1 year ago

ok, Model was successfuly loaded if I give the model name in it like this

    alignment_model_cs,metadata_cs=whisperx.load_align_model(
        language_code="cs", device="cuda:0", model_name="comodoro/wav2vec2-xls-r-300m-cs-250")