yingzhi commited on
Commit
3e60708
1 Parent(s): 3664b23

use internal interface

Browse files
Files changed (1) hide show
  1. README.md +3 -5
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 foreign_class
65
- classifier = foreign_class(
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)