fix load instruction
Browse files
README.md
CHANGED
@@ -39,12 +39,12 @@ The `wsi` library provides a simple interface to use the WSI model for embedding
|
|
39 |
### Generate Speaker Embeddings
|
40 |
|
41 |
```python
|
42 |
-
from
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
#
|
48 |
embedding = process_single_audio(model, feature_extractor, "path/to/audio.wav")
|
49 |
print("Speaker Embedding:", embedding)
|
50 |
```
|
@@ -52,10 +52,12 @@ print("Speaker Embedding:", embedding)
|
|
52 |
### Calculate Similarity Between Two Audio Files
|
53 |
|
54 |
```python
|
55 |
-
from
|
56 |
|
57 |
-
|
58 |
-
|
|
|
|
|
59 |
|
60 |
# Compute similarity between two audio files
|
61 |
similarity = process_audio_pair(
|
|
|
39 |
### Generate Speaker Embeddings
|
40 |
|
41 |
```python
|
42 |
+
from whisper-speaker-id import load_model, process_single_audio
|
43 |
+
model, feature_extractor = load_model(
|
44 |
+
model_path_or_repo_id="emon-j/WSI",
|
45 |
+
filename="wsi.pth"
|
46 |
+
)
|
47 |
+
# Process an audio file
|
48 |
embedding = process_single_audio(model, feature_extractor, "path/to/audio.wav")
|
49 |
print("Speaker Embedding:", embedding)
|
50 |
```
|
|
|
52 |
### Calculate Similarity Between Two Audio Files
|
53 |
|
54 |
```python
|
55 |
+
from whisper-speaker-id import load_model, process_audio_pair
|
56 |
|
57 |
+
model, feature_extractor = load_model(
|
58 |
+
model_path_or_repo_id="emon-j/WSI",
|
59 |
+
filename="wsi.pth"
|
60 |
+
)
|
61 |
|
62 |
# Compute similarity between two audio files
|
63 |
similarity = process_audio_pair(
|