SYSTRAN / faster-whisper

Faster Whisper transcription with CTranslate2
MIT License
11.6k stars 962 forks source link

Belle-whisper-large-v3-zh 不支持 ValueError: Invalid model size 'Belle-whisper-large-v3-zh', expected one of: tiny.en, tiny, base.en, base, small.en, small, medium.en, medium, large-v1, large-v2, large-v3, large, distil-large-v2, distil-medium.en, distil-small.en, distil-large-v3 #910

Closed mayu123mayu closed 2 months ago

mayu123mayu commented 2 months ago

ValueError: Invalid model size 'Belle-whisper-large-v3-zh', expected one of: tiny.en, tiny, base.en, base, small.en, small, medium.en, medium, large-v1, large-v2, large-v3, large, distil-large-v2, distil-medium.en, distil-small.en, distil-large-v3

trungkienbkhn commented 2 months ago

model_size_or_path: Size of the model to use (tiny, tiny.en, base, base.en, small, small.en, distil-small.en, medium, medium.en, distil-medium.en, large-v1, large-v2, large-v3, large, distil-large-v2 or distil-large-v3), a path to a converted model directory, or a CTranslate2-converted Whisper model ID from the HF Hub. When a size or a model ID is configured, the converted model is downloaded from the Hugging Face Hub.

You can replace 'Belle-whisper-large-v3-zh with the path to your model

haowaiwai commented 2 months ago

@trungkienbkhn I tried it but still got an error.

File "main.py", line 19, in <module>
    model = WhisperModel("/home/xxx/work/faster-whisper/models--BELLE-2--Belle-whisper-large-v3-zh/snapshots/5b48db40b2d67858c5ddc3c596a3c9388ea23fe4", device="cuda", compute_type="float16", local_files_only=True)
  File "/home/xxx/miniconda3/envs/faster-whisper/lib/python3.10/site-packages/faster_whisper/transcribe.py", line 146, in __init__
    self.model = ctranslate2.models.Whisper(
RuntimeError: Unable to open file 'model.bin' in model '/home/xxx/work/faster-whisper/models--BELLE-2--Belle-whisper-large-v3-zh/snapshots/5b48db40b2d67858c5ddc3c596a3c9388ea23fe4'
han508 commented 2 months ago

+1

haowaiwai commented 2 months ago
ct2-transformers-converter --model BELLE-2/Belle-whisper-large-v3-zh --output_dir models/faster-whisper-large-v3 --copy_files tokenizer.json preprocessor_config.json