Utilising a new fine tuned model

#9
by Snaffal - opened

Hey! After a lot of searching and altering the code i managed to train a model for a regression task (valance and arousal) instead of emotional labels.
I am happy with the training results but wish to evaluate it on some .wav files. How would I alter the script to evaluate the emotions based on these lines of code. There seem to be little documentation for this usecase hence this new discussion. If there are documentations, feel free to provide them and i will have another go at it.:

best_model_path = "results/train_with_wav2vec2/1993/save/CKPT+2024-03-09+10-47-24+00"  #folder with my best model inside
classifier = foreign_class(source="speechbrain/emotion-recognition-wav2vec2-IEMOCAP", pymodule_file="custom_interface.py", classname="CustomEncoderWav2vec2Classifier")
out_prob, score, index, text_lab = classifier.classify_file("amused_1-15_0001.wav")
print(text_lab)

Sign up or log in to comment