Mirco commited on
Commit
59c6806
1 Parent(s): 656ec10

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -3
README.md CHANGED
@@ -53,11 +53,10 @@ Please notice that we encourage you to read our tutorials and learn more about
53
  ### Perform Emotion recognition
54
 
55
  ```python
56
- import torchaudio
57
  from speechbrain.pretrained.interfaces import EncoderWav2vecClassifier
58
  classifier = EncoderWav2vecClassifier.from_hparams(source="speechbrain/emotion-recognition-wav2vec2-IEMOCAP")
59
- signal, fs =torchaudio.load('/workspace/emotion-recognition-wav2vec2/anger.wav')
60
- prediction = classifier.classify_batch(sig)
61
  ```
62
  The prediction tensor will contain a tuple of (embedding, id_class, label_name).
63
 
 
53
  ### Perform Emotion recognition
54
 
55
  ```python
 
56
  from speechbrain.pretrained.interfaces import EncoderWav2vecClassifier
57
  classifier = EncoderWav2vecClassifier.from_hparams(source="speechbrain/emotion-recognition-wav2vec2-IEMOCAP")
58
+ out_prob, score, index, text_lab = classifier.classify_file("speechbrain/emotion-recognition-wav2vec2-IEMOCAP/anger.wav")
59
+ print(text_lab)
60
  ```
61
  The prediction tensor will contain a tuple of (embedding, id_class, label_name).
62