recasepunc icon indicating copy to clipboard operation
recasepunc copied to clipboard

While running pretrained German model: AttributeError: Can't get attribute 'Trie' on <module 'transformers.tokenization_utils'

Open alihashaam opened this issue 3 years ago • 2 comments

I am trying to use pretrained German model:

https://alphacephei.com/vosk/models/vosk-recasepunc-de-0.21.zip

and as mentioned in readme file, I run:

python example.py de-test.txt

but I keep getting following error:

AttributeError: Can't get attribute 'Trie' on <module 'transformers.tokenization_utils' from '/home/ali/ali_initos_work/internal/data_science/speech_to_text/vosk/vosk_env/lib/python3.7/site-packages/transformers/tokenization_utils.py'>

Any idea if the model itself is wrong?

alihashaam avatar Aug 30 '22 07:08 alihashaam

This typically happens when you have a different version of transformers installed compared to the one the model was trained with. I don't know about vosk, but the models provided on this github are trained with the version specified in requirements.txt

benob avatar Aug 30 '22 08:08 benob

I had to use transformers==4.22.1 to use the German model from Vosk and transformers==4.10.0 to use the French model from this github repo. Is there a list somewhere of all the trained models using the same transformers version?

szeidner avatar Sep 20 '22 20:09 szeidner