Wav2Vec2ForSpeechClassification not found

#5
by krugjo - opened

Hey, I'm trying to run this model with the provided sample Code. But I haven't found any information about the Wav2Vec2ForSpeechClassification Class. I think the Huggingface Hub hasn't provided such a Class. Even ehcalabres, who made another emotion speech recognition Model, made a Request to add such a Class to the Transformers Library. I worked around this problem using the Wav2Vec2ForSequenceClassification Class, but the results in Emotions are always pretty similar (Anger: 17.3% | Disgust: 15.1% | Fear: 23.3% | Happiness: 23.7% | Sadness: 20.7%). It doesnt matter what audio file I use, its always similar to that, so maybe I'm using the wrong class. Can anyone provide me with Information of where this Class is located, how to use it or has the Code of Wav2Vec2ForSpeechClassification?

Thanks in advance:)

I am facing the same issue.

The Problem was actually solved in another Discussion a few monts back, but I didnt pay Attention. The Link to the Wav2Vec2ForSpeechClassification Class is: https://github.com/m3hrdadfi/soxan/blob/main/src/models.py
You can implement it by cloning the whole Directory:

!git clone https://github.com/m3hrdadfi/soxan.git

And then you have to make an own Directory where you can place the Clone. I am Using Google Colab and place it in the new Directory in 'Content'

os.chdir('/content/soxan')

Now you use the Wav2Vec2ForSpeechClassification Class as in the Example Code:)

CAN YOU SHOW ME HOW YOU DO IT IN GOOGLE COLAB

Sign up or log in to comment