huggingface / distil-whisper

Distilled variant of Whisper for speech recognition. 6x faster, 50% smaller, within 1% word error rate.
MIT License
3.32k stars 238 forks source link

distil-small.en AttributeError #90

Closed andrewjones0198 closed 3 months ago

andrewjones0198 commented 4 months ago

Followed steps provided in the following URL:

https://huggingface.co/distil-whisper/distil-small.en

pip-24.0 used to install transformers-4.38.1-py3-none-any.whl.metadata using python 3.12.1 in venv

distil-large-v2 runs with no issues however distil-small.en displays the following error:

AttributeError: 'GenerationConfig' object has no attribute 'lang_to_id'

Any ideas on how to solve? Much appreciated for any assistance provided

dulalbert commented 4 months ago

Same for distil-medium.en, I just used the large version

andrewjones0198 commented 4 months ago

If size of the model is a concern then I have found the following worked for me:

https://huggingface.co/openai/whisper-tiny.en

There are a few models available with tiny.en being the smallest.

This ran with sub 3 second latency once the model built on my NUC style device.

sanchit-gandhi commented 3 months ago

Both distil-medium.en and distil-small.en have been fixed on the Hub! You should be able to use them without problem now. Note that these models are both faster and more accurate than whisper-tiny, so are natural replacements. See Table 5 of the Distil-Whisper paper for details.