Error with latest sentence-transformers library

In Lesson 6 - Automatic Speech Recognition,

When the notebook is downloaded and run on my machine, I gets an error,

Attribute Error: 'GenerationConfig' object has no attribute 'lang_to_id'

However, I was able to figure it out and fix it by installing sentence-transformers 2.3.1 and transformers 4.37.2 using

Solution

pip install sentence-transformers==2.3.1
pip install transformers==4.37.2
3 Likes

It worked for me too! Thanks!

1 Like

if you don’t want to mess around with versioning of those libraries then you can also try another model eg. for example this worked for me:

asr = pipeline(task="automatic-speech-recognition",
               model="openai/whisper-tiny")

me too