游雁 commited on
Commit
0817bac
1 Parent(s): 3c93493
Files changed (6) hide show
  1. campplus_cn_common.bin +3 -0
  2. config.yaml +23 -0
  3. configuration.json +23 -0
  4. dingding.jpg +0 -0
  5. quickstart.md +36 -0
  6. structure.png +0 -0
campplus_cn_common.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3388cf5fd3493c9ac9c69851d8e7a8badcfb4f3dc631020c4961371646d5ada8
3
+ size 28036335
config.yaml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This is an example that demonstrates how to configure a model file.
2
+ # You can modify the configuration according to your own requirements.
3
+
4
+ # to print the register_table:
5
+ # from funasr.register import tables
6
+ # tables.print()
7
+
8
+ # network architecture
9
+ model: CAMPPlus
10
+ model_conf:
11
+ feat_dim: 80
12
+ embedding_size: 192
13
+ growth_rate: 32
14
+ bn_size: 4
15
+ init_channels: 128
16
+ config_str: 'batchnorm-relu'
17
+ memory_efficient: True
18
+ output_level: 'segment'
19
+
20
+ # frontend related
21
+ frontend: WavFrontend
22
+ frontend_conf:
23
+ fs: 16000
configuration.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "framework": "pytorch",
3
+ "task": "speaker-verification",
4
+ "model_config": "config.yaml",
5
+ "model_file": "campplus_cn_common.bin",
6
+ "model": {
7
+ "type": "cam++-sv",
8
+ "model_config": {
9
+ "sample_rate": 16000,
10
+ "fbank_dim": 80,
11
+ "emb_size": 192
12
+ },
13
+ "pretrained_model": "campplus_cn_common.bin",
14
+ "yesOrno_thr": 0.31
15
+ },
16
+ "pipeline": {
17
+ "type": "speaker-verification"
18
+ },
19
+ "file_path_metas": {
20
+ "init_param":"campplus_cn_common.bin",
21
+ "config":"config.yaml"
22
+ }
23
+ }
dingding.jpg ADDED
quickstart.md ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ ---
3
+ ## 模型加载和推理
4
+ 更多关于模型加载和推理的问题参考[模型的推理Pipeline](https://modelscope.cn/docs/%E6%A8%A1%E5%9E%8B%E7%9A%84%E6%8E%A8%E7%90%86Pipeline)。
5
+
6
+ ```python
7
+ from modelscope.pipelines import pipeline
8
+ from modelscope.utils.constant import Tasks
9
+
10
+ p = pipeline('speaker-verification', 'damo/speech_campplus_sv_zh-cn_16k-common')
11
+ ```
12
+
13
+ 提供input输入
14
+ ```python
15
+ wav1 = 'https://modelscope.cn/api/v1/models/damo/speech_campplus_sv_zh-cn_16k-common/repo?Revision=master&FilePath=examples/speaker1_a_cn_16k.wav'
16
+ wav2 = 'https://modelscope.cn/api/v1/models/damo/speech_campplus_sv_zh-cn_16k-common/repo?Revision=master&FilePath=examples/speaker1_b_cn_16k.wav'
17
+ p([wav1, wav2])
18
+ ```
19
+
20
+ 可以自定义阈值,阈值越高,判断为同一个说话人的条件越严格
21
+ ```python
22
+ wav1 = 'https://modelscope.cn/api/v1/models/damo/speech_campplus_sv_zh-cn_16k-common/repo?Revision=master&FilePath=examples/speaker1_a_cn_16k.wav'
23
+ wav2 = 'https://modelscope.cn/api/v1/models/damo/speech_campplus_sv_zh-cn_16k-common/repo?Revision=master&FilePath=examples/speaker1_b_cn_16k.wav'
24
+ p([wav1, wav2], thr=0.31)
25
+ ```
26
+
27
+ 更多使用说明请参阅[ModelScope文档中心](http://www.modelscope.cn/#/docs)。
28
+ ---
29
+
30
+ ---
31
+ ## 下载并安装ModelScope library
32
+ 更多关于下载安装ModelScope library的问题参考[环境安装](https://modelscope.cn/docs/%E7%8E%AF%E5%A2%83%E5%AE%89%E8%A3%85)。
33
+
34
+ ```python
35
+ pip install "modelscope[audio]" -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html
36
+ ```
structure.png ADDED