kamilakesbi commited on
Commit
414dca9
1 Parent(s): 22d6b5c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +5 -10
README.md CHANGED
@@ -28,7 +28,7 @@ It achieves the following results on the evaluation set:
28
  ## Model description
29
 
30
  This segmentation model has been trained on English data (Callhome) using [diarizers](https://github.com/huggingface/diarizers/tree/main).
31
- It can be loaded with two lines of code using the following snipet:
32
 
33
  ```python
34
  from diarizers import SegmentationModel
@@ -36,13 +36,7 @@ from diarizers import SegmentationModel
36
  segmentation_model = SegmentationModel().from_pretrained('diarizers-community/speaker-segmentation-fine-tuned-callhome-eng')
37
  ```
38
 
39
- To use it within a pyannote speaker diarization pipeline, convert the model to a pyannote compatible format:
40
-
41
- ```python
42
- segmentation_model = segmentation_model.to_pyannote_model()
43
- ```
44
-
45
- ...load it in the [pyannote/speaker-diarization-3.1](https://huggingface.co/pyannote/speaker-diarization-3.1) pipeline:
46
 
47
  ```python
48
 
@@ -56,11 +50,12 @@ device = torch.device("cuda:0") if torch.cuda.is_available() else torch.device("
56
  pipeline = Pipeline.from_pretrained("pyannote/speaker-diarization-3.1")
57
  pipeline.to(device)
58
 
59
- # Replace the pre-trained segmentation model with the fine-tuned version:
 
60
  pipeline._segmentation.model = model.to(device)
61
  ```
62
 
63
- ...and use it on a audio example:
64
 
65
  ```python
66
  # load dataset example
 
28
  ## Model description
29
 
30
  This segmentation model has been trained on English data (Callhome) using [diarizers](https://github.com/huggingface/diarizers/tree/main).
31
+ It can be loaded with two lines of code:
32
 
33
  ```python
34
  from diarizers import SegmentationModel
 
36
  segmentation_model = SegmentationModel().from_pretrained('diarizers-community/speaker-segmentation-fine-tuned-callhome-eng')
37
  ```
38
 
39
+ To use it within a pyannote speaker diarization pipeline, load the [pyannote/speaker-diarization-3.1](https://huggingface.co/pyannote/speaker-diarization-3.1) pipeline, and convert the model to a pyannote compatible format:
 
 
 
 
 
 
40
 
41
  ```python
42
 
 
50
  pipeline = Pipeline.from_pretrained("pyannote/speaker-diarization-3.1")
51
  pipeline.to(device)
52
 
53
+ # replace the segmentation model with your fine-tuned one
54
+ segmentation_model = segmentation_model.to_pyannote_model()
55
  pipeline._segmentation.model = model.to(device)
56
  ```
57
 
58
+ You can now use the pipeline on audio examples:
59
 
60
  ```python
61
  # load dataset example