hbredin commited on
Commit
3f1c24c
·
1 Parent(s): 1f6b5e7

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +14 -2
README.md CHANGED
@@ -5,7 +5,6 @@ license: apache-2.0
5
 
6
  This is a copy of `voxceleb_resnet34_LM.onnx` speaker embedding model taken from [ChengDong Liang's repository](https://huggingface.co/chengdongliang/wespeaker).
7
 
8
-
9
  ```
10
  Copyright 2022 ChengDong Liang
11
 
@@ -20,4 +19,17 @@ distributed under the License is distributed on an "AS IS" BASIS,
20
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
  See the License for the specific language governing permissions and
22
  limitations under the License.
23
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
 
6
  This is a copy of `voxceleb_resnet34_LM.onnx` speaker embedding model taken from [ChengDong Liang's repository](https://huggingface.co/chengdongliang/wespeaker).
7
 
 
8
  ```
9
  Copyright 2022 ChengDong Liang
10
 
 
19
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
  See the License for the specific language governing permissions and
21
  limitations under the License.
22
+ ```
23
+
24
+ ```python
25
+ from pyannote.audio.pipelines.speaker_verification import PretrainedSpeakerEmbedding
26
+ get_embedding = PretrainedSpeakerEmbedding("hbredin/wespeaker-voxceleb-resnet34-LM")
27
+
28
+ assert waveforms.ndim == 3
29
+ batch_size, num_channels, num_samples = waveforms.shape
30
+ assert num_channels == 1
31
+
32
+ embeddings = get_embedding(waveforms)
33
+ assert embeddings.ndim == 2
34
+ assert embeddings.shape[0] == batch_size
35
+ ```