taejinp commited on
Commit
8bffa83
·
verified ·
1 Parent(s): 61db6dc

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +5 -2
README.md CHANGED
@@ -217,7 +217,10 @@ and two feedforward layers with 4 sigmoid outputs for each frame input at the to
217
  ## NVIDIA NeMo
218
 
219
  To train, fine-tune or perform diarization with Sortformer, you will need to install [NVIDIA NeMo](https://github.com/NVIDIA/NeMo)[6]. We recommend you install it after you've installed Cython and latest PyTorch version.
 
220
  ```
 
 
221
  pip install git+https://github.com/NVIDIA/NeMo.git@main#egg=nemo_toolkit[asr]
222
  ```
223
 
@@ -230,8 +233,8 @@ The model is available for use in the NeMo Framework[6], and can be used as a pr
230
  ```python
231
  from nemo.collections.asr.models import SortformerEncLabelModel
232
 
233
- # load model
234
- diar_model = SortformerEncLabelModel.restore_from(restore_path="/path/to/diar_streaming_sortformer_4spk-v2", map_location=torch.device('cuda'), strict=False)
235
 
236
  # If you have a downloaded model in "/path/to/diar_streaming_sortformer_4spk-v2.nemo", load model from a downloaded file
237
  diar_model = SortformerEncLabelModel.restore_from(restore_path="/path/to/diar_streaming_sortformer_4spk-v2.nemo", map_location='cuda', strict=False)
 
217
  ## NVIDIA NeMo
218
 
219
  To train, fine-tune or perform diarization with Sortformer, you will need to install [NVIDIA NeMo](https://github.com/NVIDIA/NeMo)[6]. We recommend you install it after you've installed Cython and latest PyTorch version.
220
+
221
  ```
222
+ apt-get update && apt-get install -y libsndfile1 ffmpeg
223
+ pip install Cython packaging
224
  pip install git+https://github.com/NVIDIA/NeMo.git@main#egg=nemo_toolkit[asr]
225
  ```
226
 
 
233
  ```python
234
  from nemo.collections.asr.models import SortformerEncLabelModel
235
 
236
+ # load model from Hugging Face model card directly (You need a Hugging Face token)
237
+ diar_model = SortformerEncLabelModel.from_pretrained("nvidia/diar_sortformer_4spk-v1")
238
 
239
  # If you have a downloaded model in "/path/to/diar_streaming_sortformer_4spk-v2.nemo", load model from a downloaded file
240
  diar_model = SortformerEncLabelModel.restore_from(restore_path="/path/to/diar_streaming_sortformer_4spk-v2.nemo", map_location='cuda', strict=False)