Update README.md
Browse files
README.md
CHANGED
@@ -60,7 +60,7 @@ Please notice that we encourage you to read our tutorials and learn more about
|
|
60 |
import torchaudio
|
61 |
from speechbrain.pretrained import EncoderClassifier
|
62 |
classifier = EncoderClassifier.from_hparams(source="speechbrain/spkrec-ecapa-voxceleb")
|
63 |
-
signal, fs =torchaudio.load('
|
64 |
embeddings = classifier.encode_batch(signal)
|
65 |
```
|
66 |
The system is trained with recordings sampled at 16kHz (single channel).
|
@@ -71,7 +71,8 @@ The code will automatically normalize your audio (i.e., resampling + mono channe
|
|
71 |
```python
|
72 |
from speechbrain.pretrained import SpeakerRecognition
|
73 |
verification = SpeakerRecognition.from_hparams(source="speechbrain/spkrec-ecapa-voxceleb", savedir="pretrained_models/spkrec-ecapa-voxceleb")
|
74 |
-
score, prediction = verification.verify_files("
|
|
|
75 |
```
|
76 |
The prediction is 1 if the two signals in input are from the same speaker and 0 otherwise.
|
77 |
|
|
|
60 |
import torchaudio
|
61 |
from speechbrain.pretrained import EncoderClassifier
|
62 |
classifier = EncoderClassifier.from_hparams(source="speechbrain/spkrec-ecapa-voxceleb")
|
63 |
+
signal, fs =torchaudio.load('tests/samples/ASR/spk1_snt1.wav')
|
64 |
embeddings = classifier.encode_batch(signal)
|
65 |
```
|
66 |
The system is trained with recordings sampled at 16kHz (single channel).
|
|
|
71 |
```python
|
72 |
from speechbrain.pretrained import SpeakerRecognition
|
73 |
verification = SpeakerRecognition.from_hparams(source="speechbrain/spkrec-ecapa-voxceleb", savedir="pretrained_models/spkrec-ecapa-voxceleb")
|
74 |
+
score, prediction = verification.verify_files("tests/samples/ASR/spk1_snt1.wav", "tests/samples/ASR/spk2_snt1.wav") # Different Speakers
|
75 |
+
score, prediction = verification.verify_files("tests/samples/ASR/spk1_snt1.wav", "tests/samples/ASR/spk1_snt2.wav") # Same Speaker
|
76 |
```
|
77 |
The prediction is 1 if the two signals in input are from the same speaker and 0 otherwise.
|
78 |
|