use internal interface
Browse files
README.md
CHANGED
@@ -61,11 +61,9 @@ Please notice that we encourage you to read our tutorials and learn more about
|
|
61 |
An external `py_module_file=custom.py` is used as an external Predictor class into this HF repos. We use `foreign_class` function from `speechbrain.pretrained.interfaces` that allows you to load your custom model.
|
62 |
|
63 |
```python
|
64 |
-
from speechbrain.pretrained.interfaces import
|
65 |
-
classifier =
|
66 |
-
source="speechbrain/emotion-diarization-wavlm-large"
|
67 |
-
pymodule_file="custom_interface.py",
|
68 |
-
classname="Speech_Emotion_Diarization"
|
69 |
)
|
70 |
diary = classifier.diarize_file("speechbrain/emotion-diarization-wavlm-large/example.wav")
|
71 |
print(diary)
|
|
|
61 |
An external `py_module_file=custom.py` is used as an external Predictor class into this HF repos. We use `foreign_class` function from `speechbrain.pretrained.interfaces` that allows you to load your custom model.
|
62 |
|
63 |
```python
|
64 |
+
from speechbrain.pretrained.interfaces import Speech_Emotion_Diarization
|
65 |
+
classifier = Speech_Emotion_Diarization.from_hparams(
|
66 |
+
source="speechbrain/emotion-diarization-wavlm-large"
|
|
|
|
|
67 |
)
|
68 |
diary = classifier.diarize_file("speechbrain/emotion-diarization-wavlm-large/example.wav")
|
69 |
print(diary)
|