Adel-Moumen commited on
Commit
f3b4c42
1 Parent(s): 5c0be38

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -58,7 +58,7 @@ Please notice that we encourage you to read our tutorials and learn more about
58
 
59
  ```python
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)
@@ -69,7 +69,7 @@ The code will automatically normalize your audio (i.e., resampling + mono channe
69
  ### Perform Speaker Verification
70
 
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
 
58
 
59
  ```python
60
  import torchaudio
61
+ from speechbrain.inference.speaker 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)
 
69
  ### Perform Speaker Verification
70
 
71
  ```python
72
+ from speechbrain.inference.speaker 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