Update README.md
Browse files
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 |
-
|
| 60 |
-
|
| 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 |
|