---
title: speech_resnet34_sv_zh-cn_3dspeaker_16k
canonical_url: "https://www.modelscope.cn/models/iic/speech_resnet34_sv_zh-cn_3dspeaker_16k"
md_url: "https://www.modelscope.cn/models/iic/speech_resnet34_sv_zh-cn_3dspeaker_16k.md"
repository: iic/speech_resnet34_sv_zh-cn_3dspeaker_16k
chinese_name: "ResNet34说话人确认-中文-3D-Speaker-16k"
last_updated: 2024-12-18
license: "Apache License 2.0"
pipeline_tag: speaker-verification
tasks:
  - speaker-verification
model_type:
  - ResNet34
library_name:
  - pytorch
frameworks:
  - pytorch
language:
  - cn
domain:
  - audio
downloads: 3307
stars: 2
tags:
  - ResNet
  - 3D-Speaker
---

# speech_resnet34_sv_zh-cn_3dspeaker_16k

> speech_resnet34_sv_zh-cn_3dspeaker_16k - iic 在 ModelScope 开源的模型。ResNet34模型是基于卷积神经网络构建的说话人模型，由于识别性能优异，已经被广泛使用在说话人识别领域中，还可用于说话人日志和语种识别等任务。

iic/speech_resnet34_sv_zh-cn_3dspeaker_16k 是 ModelScope 魔搭社区上的speaker-verification模型，采用 Apache License 2.0 许可。

- **Repository**: iic/speech_resnet34_sv_zh-cn_3dspeaker_16k
- **License**: Apache License 2.0
- **Tasks**: speaker-verification
- **Tags**: ResNet, 3D-Speaker
- **Downloads**: 3307
- **Stars**: 2
- **Last updated**: 2024-12-18

Source: https://www.modelscope.cn/models/iic/speech_resnet34_sv_zh-cn_3dspeaker_16k

---

## 3D-Speaker ResNet 说话人识别模型
ResNet模型是基于卷积神经网络构建的说话人模型，由于识别性能优异，已经被广泛使用在说话人识别领域中，还可用于说话人日志和语种识别等任务。


更详细的信息见
- ResNet论文：[Deep Residual Learning for Image Recognition](https://openaccess.thecvf.com/content_cvpr_2016/papers/He_Deep_Residual_Learning_CVPR_2016_paper.pdf)
- 3D-Speaker论文：[3D-Speaker: A Large-Scale Multi-Device, Multi-Distance, and Multi-Dialect Corpus for Speech Representation Disentanglement](https://arxiv.org/pdf/2306.15354.pdf)
- github项目地址：[3D-Speaker](https://github.com/alibaba-damo-academy/3D-Speaker/tree/main/egs/3dspeaker/sv-resnet)

### 训练数据
本模型使用达摩院开源数据集[3D-Speaker](https://3dspeaker.github.io/)数据集进行训练，包含约10k个说话人，可以对16k采样率的中文音频进行识别。
### 模型效果评估
在3D-Speaker中文测试集 Cross-Device, Cross-Distance, Cross-Dialect中EER评测结果如下：
| Model | Params | Cross-Device | Cross-Distance | Cross-Dialect |
|:-----:|:------:| :------:|:------:|:------:|
| ECAPA-TDNN | 20.8 M | 8.87% | 12.26% | 14.53% |
| ResNet34 | 6.34 M | 7.29% | 8.98% | 12.81% |

### 在线体验
在页面右侧，可以在“在线体验”栏内看到我们预先准备好的示例音频，点击播放按钮可以试听，点击“执行测试”按钮，会在下方“测试结果”栏中显示相似度得分(范围为[-1,1])和是否判断为同一个人。如果您想要测试自己的音频，可点“更换音频”按钮，选择上传或录制一段音频，完成后点击执行测试，识别内容将会在测试结果栏中显示。
### 在Notebook中体验
```python
from modelscope.pipelines import pipeline
sv_pipeline = pipeline(
    task='speaker-verification',
    model='iic/speech_resnet34_sv_zh-cn_3dspeaker_16k',
    model_revision='v1.0.0'
)
speaker1_a_wav = 'https://modelscope.cn/api/v1/models/damo/speech_campplus_sv_zh-cn_16k-common/repo?Revision=master&FilePath=examples/speaker1_a_cn_16k.wav'
speaker1_b_wav = 'https://modelscope.cn/api/v1/models/damo/speech_campplus_sv_zh-cn_16k-common/repo?Revision=master&FilePath=examples/speaker1_b_cn_16k.wav'
speaker2_a_wav = 'https://modelscope.cn/api/v1/models/damo/speech_campplus_sv_zh-cn_16k-common/repo?Revision=master&FilePath=examples/speaker2_a_cn_16k.wav'
# 相同说话人语音
result = sv_pipeline([speaker1_a_wav, speaker1_b_wav])
print(result)
# 不同说话人语音
result = sv_pipeline([speaker1_a_wav, speaker2_a_wav])
print(result)
# 可以自定义得分阈值来进行识别
result = sv_pipeline([speaker1_a_wav, speaker2_a_wav], thr=0.249)
print(result)
```
### 训练和测试自己的ResNet34模型
本项目已在[3D-Speaker](https://github.com/alibaba-damo-academy/3D-Speaker)开源了训练、测试和推理代码，使用者可按下面方式下载安装使用：
``` sh
git clone https://github.com/alibaba-damo-academy/3D-Speaker.git && cd 3D-Speaker
conda create -n 3D-Speaker python=3.8
conda activate 3D-Speaker
pip install -r requirements.txt
```

运行ResNet34在VoxCeleb集上的训练脚本
``` sh
cd egs/3dspeaker/sv-resnet
# 需要在run.sh中提前配置训练使用的GPU信息，默认是4卡
bash run.sh
```
### 使用本预训练模型快速提取embedding
``` sh
pip install modelscope
cd 3D-Speaker
# 配置模型名称并指定wav路径，wav路径可以是单个wav，也可以包含多条wav路径的list文件
model_id=iic/speech_resnet34_sv_zh-cn_3dspeaker_16k
# 提取embedding
python speakerlab/bin/infer_sv.py --model_id $model_id --wavs $wav_path
```

### 相关论文以及引用信息
如果你觉得这个该模型有所帮助，请引用下面的相关的论文
```BibTeX
@article{zheng20233d,
  title={3D-Speaker: A Large-Scale Multi-Device, Multi-Distance, and Multi-Dialect Corpus for Speech Representation Disentanglement},
  author={Zheng, Siqi and Cheng, Luyao and Chen, Yafeng and Wang, Hui and Chen, Qian},
  journal={arXiv preprint arXiv:2306.15354},
  year={2023}
}
```

### 3D-Speaker 开发者社区钉钉群
<div align=left>
<img src="images/ding.jpg" width="280" />
</div>
