---
title: speech_bert_dialogue-detetction_speaker-diarization_chinese
canonical_url: "https://www.modelscope.cn/models/iic/speech_bert_dialogue-detetction_speaker-diarization_chinese"
md_url: "https://www.modelscope.cn/models/iic/speech_bert_dialogue-detetction_speaker-diarization_chinese.md"
repository: iic/speech_bert_dialogue-detetction_speaker-diarization_chinese
chinese_name: "BERT-语义对话预测-中文-说话人日志"
last_updated: 2023-10-24
license: "Apache License 2.0"
pipeline_tag: speaker-diarization
tasks:
  - speaker-diarization
model_type:
  - SentenceClassification
architectures:
  - BertForSequenceClassification
library_name:
  - pytorch
frameworks:
  - pytorch
language:
  - cn
domain:
  - audio
inference_backends:
  - "deploy_task emb"
  - "sglang 0.5.2"
  - "vllm 0.9.2"
downloads: 3360
stars: 3
tags:
  - "中文模型"
  - "Speaker Diarization"
  - "Dialogue Detection"
  - ACL2023
---

# speech_bert_dialogue-detetction_speaker-diarization_chinese

> speech_bert_dialogue-detetction_speaker-diarization_chinese - iic 在 ModelScope 开源的模型。BERT-语义对话预测-中文-说话人日志模型是基于BERT训练的对话预测模型，可以挖掘语义中的说话人对话信息以辅助说话人日志任务。

iic/speech_bert_dialogue-detetction_speaker-diarization_chinese 是 ModelScope 魔搭社区上的speaker-diarization模型，采用 Apache License 2.0 许可，可用 deploy_task emb、sglang 0.5.2、vllm 0.9.2 部署。

- **Repository**: iic/speech_bert_dialogue-detetction_speaker-diarization_chinese
- **License**: Apache License 2.0
- **Tasks**: speaker-diarization
- **Inference backends**: deploy_task emb, sglang 0.5.2, vllm 0.9.2
- **Tags**: 中文模型, Speaker Diarization, Dialogue Detection, ACL2023
- **Downloads**: 3360
- **Stars**: 3
- **Last updated**: 2023-10-24

Source: https://www.modelscope.cn/models/iic/speech_bert_dialogue-detetction_speaker-diarization_chinese

---

# Dialogue Detection 模型
Dialogue Detection任务用于判读一段文本是否为一段对话。此信息将帮助到speaker diarization模型。

## 模型说明
我们的模型基于BERT训练得到，核心为一个二分类的Sentence Classification任务。

关于此模型的细节以及如何后续应用，请参考我们的论文：
* [Exploring Speaker-Related Information in Spoken Language Understanding for Better Speaker Diarization](https://arxiv.org/pdf/2305.12927.pdf)


### 数据集
我们的模型基于如下的数据集训练：
- [AISHELL-4](https://arxiv.org/pdf/2104.03603.pdf)
- [ALIMEETING](https://arxiv.org/pdf/2110.07393.pdf)

我们使用一个滑动窗策略来构造训练和测试数据。

### 模型效果评估
|测试集|Precision|Recall|F1|Acc|
|:---:|:-------:|:----:|:-:|:-:|
|AISHELL-4 Test|0.975|0.9444|0.9595|0.9304|
|ALIMEETING Test|0.9652|0.7686|0.8558|0.8463|


### 使用Modelscope本地推理
```python
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks

dialogue_detection = pipeline(
    task=Tasks.speaker_diarization_dialogue_detection,
    model='damo/speech_bert_dialogue-detetction_speaker-diarization_chinese',
    model_revision="v0.5.3"
)
sentence = "你们那儿小区不能用健康宝吗？不能。北一区都可以了。外面进去的就像是那个快递员儿呀，或者是外卖小哥呀，要健康宝。然后本小区的要出入证，都问有出入证吗？"
print(dialogue_detection(sentence))
# {'scores': [0.9994595646858215, 0.0005404021358117461], 'labels': ['dialogue', 'non_dialogue']}
```


## 相关论文以及引用信息
如果您觉得这个该模型有所帮助，请引用下面的相关的论文

```BibTex
@article{Cheng2023ExploringSI,
  title={Exploring Speaker-Related Information in Spoken Language Understanding for Better Speaker Diarization},
  author={Luyao Cheng and Siqi Zheng and Zhang Qinglin and Haibo Wang and Yafeng Chen and Qian Chen},
  journal={ArXiv},
  year={2023},
  volume={abs/2305.12927}
}
```
