hezarai / hezar

The all-in-one AI library for Persian, supporting a wide variety of tasks and modalities!
https://hezarai.github.io/hezar/
Apache License 2.0
839 stars 45 forks source link

TypeError: transformers.generation.configuration_utils.GenerationConfig() argument after ** must be a mapping, not WhisperSpeechRecognitionGenerationConfig #161

Closed hamed-dehghan closed 3 months ago

hamed-dehghan commented 4 months ago

When trying to use code snippet of the speech recognition this error occures:

image

It hppens after running this code:

from hezar.models import Model

model = Model.load("hezarai/whisper-small-fa")
transcripts = model.predict("examples/assets/speech_example.mp3")
print(transcripts)
arxyzan commented 4 months ago

Hi @hamed-dehghan thanks for the issue. What version are you using? I can verify that the bug exists on the main branch right now but not sure about the latest stable release (v.0.37.0).

hamed-dehghan commented 4 months ago

Hi @hamed-dehghan thanks for the issue. What version are you using? I can verify that the bug exists on the main branch right now but not sure about the latest stable release (v.0.37.0).

Hi @arxyzan thank you for the response. Yes I am using the main branch and my version is 0.37.0! kinda wierd!!

arxyzan commented 4 months ago

@hamed-dehghan The main branch does not necessarily have a different version w.r.t the stable. We update dev versions only on releases so it's okay if your version is 0.37.0. Anyway, I just commited a patch on main to resolve this so you can pull main again to make it work. But the stable version works too. Just run pip install hezar.

hamed-dehghan commented 4 months ago

@hamed-dehghan The main branch does not necessarily have a different version w.r.t the stable. We update dev versions only on releases so it's okay if your version is 0.37.0. Anyway, I just commited a patch on main to resolve this so you can pull main again to make it work. But the stable version works too. Just run pip install hezar.

It worked...😍 Thank you @arxyzan

arxyzan commented 4 months ago

@hamed-dehghan Cool! 😉

arxyzan commented 3 months ago

Hi @hamed-dehghan, have you faced this issue again?