Delete TenSense/README_zh.md
Browse files- TenSense/README_zh.md +0 -525
TenSense/README_zh.md
DELETED
|
@@ -1,525 +0,0 @@
|
|
| 1 |
-
<div align="center">
|
| 2 |
-
|
| 3 |
-
<img src="./image/Baiji_Team.png" alt="Baiji Team Logo" width="400" height="200"/>
|
| 4 |
-
|
| 5 |
-
[](#-问题与交流)
|
| 6 |
-
[](https://github.com/Baiji-Team)
|
| 7 |
-
[](https://github.com/Baiji-Team)
|
| 8 |
-

|
| 9 |
-
[](https://github.com/Baiji-Team)
|
| 10 |
-
[]()
|
| 11 |
-
[](./LICENSE)
|
| 12 |
-
|
| 13 |
-
</div>
|
| 14 |
-
|
| 15 |
-
<br>
|
| 16 |
-
|
| 17 |
-
**语言**: [English](./README_en.md) | [中文](./README_zh.md)
|
| 18 |
-
|
| 19 |
-
<br>
|
| 20 |
-
|
| 21 |
-
## 目录
|
| 22 |
-
|
| 23 |
-
- [欢迎](#欢迎)
|
| 24 |
-
- [介绍](#介绍)
|
| 25 |
-
- [核心特性](#核心特性)
|
| 26 |
-
- [模型获取](#模型获取)
|
| 27 |
-
- [📐 模型参数量对比表](#-模型参数量对比表)
|
| 28 |
-
- [基准结果](#基准结果)
|
| 29 |
-
- [easyturn_real_test_ZH](#easyturn_real_test_zh)
|
| 30 |
-
- [semantic_test_ZH](#semantic_test_zh)
|
| 31 |
-
- [NonverbalVocalization_invalid](#nonverbalvocalization_invalid)
|
| 32 |
-
- [🚀快速开始](#快速开始)
|
| 33 |
-
- [Installation](#installation)
|
| 34 |
-
- [Model Weights](#model-weights)
|
| 35 |
-
- [Inference](#inference)
|
| 36 |
-
- [🧪 评测说明](#-评测说明)
|
| 37 |
-
- [1)如何评测](#1如何评测)
|
| 38 |
-
- [2)数据格式要求(JSONL)](#2数据格式要求jsonl)
|
| 39 |
-
- [📚 引用](#-引用)
|
| 40 |
-
- [❓ 问题与交流](#-问题与交流)
|
| 41 |
-
- [📄 许可证](#-许可证)
|
| 42 |
-
|
| 43 |
-
<br>
|
| 44 |
-
|
| 45 |
-
## 欢迎
|
| 46 |
-
|
| 47 |
-
**TurnSense** 是一个面向轮次相关语音任务的**开源模型仓库**。
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
<br>
|
| 51 |
-
|
| 52 |
-
| 社区入口 | 用途 |
|
| 53 |
-
| -------- | ---- |
|
| 54 |
-
| [Baiji-Team/TurnSense (GitHub)](https://github.com/Baiji-Team/TurnSense) | 模型推理代码仓库(推理与评测流程) |
|
| 55 |
-
| [GitHub Issues / PR](https://github.com/Baiji-Team) | 提交问题、改进推理与评测流程 |
|
| 56 |
-
| [Baiji-Team/TurnSense](https://huggingface.co/Baiji-Team/TurnSense) | 模型入口 |
|
| 57 |
-
|
| 58 |
-
<br>
|
| 59 |
-
|
| 60 |
-
> [!IMPORTANT]
|
| 61 |
-
>
|
| 62 |
-
> **欢迎 Star 仓库** ⭐️
|
| 63 |
-
>
|
| 64 |
-
> 如果你正在关注 Turn Sense / 轮次判断,欢迎关注和反馈,这会帮助我们继续改进模型与文档。
|
| 65 |
-
|
| 66 |
-
<br>
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
## 介绍
|
| 70 |
-
|
| 71 |
-
**TurnSense** 是一个面向人机语音交互场景的 **三分类语义判别模型**,专注解决对话系统里一个关键问题:
|
| 72 |
-
在用户说话过程中,系统应不应该现在响应,还是继续等待。
|
| 73 |
-
|
| 74 |
-
相比只做“是否结束”的简单判断,TurnSense 更强调对语义完整度和无效输入的识别能力,帮助系统在复杂真实场景下实现更自然的轮次衔接,减少误打断、抢话和无效触发。
|
| 75 |
-
|
| 76 |
-
<div align="center">
|
| 77 |
-
<img src="./image/TurnSense.png" alt="TurnSense 三分类示意图" width="820"/>
|
| 78 |
-
</div>
|
| 79 |
-
|
| 80 |
-
**TurnSense** 将输入划分为三种状态:
|
| 81 |
-
|
| 82 |
-
- **✅ 完整语义(complete)**
|
| 83 |
-
用户表达已形成完整意图,系统可以进入响应阶段。
|
| 84 |
-
示例:`“帮我查一下明天上海天气。”`
|
| 85 |
-
|
| 86 |
-
- **⏳ 不完整语义(incomplete)**
|
| 87 |
-
用户表达尚未完成,当前语义存在截断、停顿后续说或未闭合现象。
|
| 88 |
-
示例:`“我想问一下那个订单就是昨天……”`
|
| 89 |
-
|
| 90 |
-
- **🔇 无效语义(invalid)**
|
| 91 |
-
输入不应被当作有效语义触发响应,例如噪声片段或不构成语义单元的内容。
|
| 92 |
-
示例:`“…(持续噪声)”`
|
| 93 |
-
|
| 94 |
-
这三类标签让系统不仅能判断“是否该接话”,还能识别“是否值得接话”,从而在语音助手、实时通话、智能客服等场景中显著提升交互自然度与稳定性。
|
| 95 |
-
|
| 96 |
-
## 核心特性
|
| 97 |
-
|
| 98 |
-
- **🧠 语义级三分类能力**
|
| 99 |
-
同时建模 `complete / incomplete / invalid`,比传统二分类更贴近真实对话行为。
|
| 100 |
-
|
| 101 |
-
- **⚡ 小而快且准(CPU 延迟仅几十毫秒)**
|
| 102 |
-
在保持较高准确率的同时,模型参数规模更小(约 `47M`),并提供 `FP32 / INT8 ONNX` 版本;在当前基准中 CPU 侧延迟约为 **50~60ms**(例如 `p50≈54.65ms`、`p90≈58.00ms`),兼顾速度、成本与效果。
|
| 103 |
-
|
| 104 |
-
- **🤗 开源友好与易集成**
|
| 105 |
-
提供标准化模型发布与仓库结构,便于在研究与工程场景中快速接入。
|
| 106 |
-
|
| 107 |
-
- **⚖️ 更稳健的轮次决策**
|
| 108 |
-
在语义模糊或停顿场景下,兼顾 precision 与 recall,减少过早响应和漏响应。
|
| 109 |
-
|
| 110 |
-
- **🚫 无效输入过滤**
|
| 111 |
-
可识别非语义发声与噪声型输入,降低系统被误触发的概率。
|
| 112 |
-
|
| 113 |
-
- **📊 可复现评测体系**
|
| 114 |
-
评测流程配套,支持统一指标对比与性能回归分析。
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
## 模型获取
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
- GitHub Organization: [Baiji-Team](https://github.com/Baiji-Team)
|
| 122 |
-
- GitHub 仓库(模型推理评测代码): [Baiji-Team/TurnSense](https://github.com/Baiji-Team/TurnSense)
|
| 123 |
-
- Hugging Face Organization: [Baiji-Team](https://huggingface.co/Baiji-Team)
|
| 124 |
-
- Hugging Face 模型链接:[Baiji-Team/TurnSense](https://huggingface.co/Baiji-Team/TurnSense)
|
| 125 |
-
- 当前提供的模型:**FP32 / INT8 ONNX**。
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
## 📐 模型参数量对比表
|
| 131 |
-
|
| 132 |
-
| 模型 | 参数量 | 模型链接 |
|
| 133 |
-
| :--- | :--- | :--- |
|
| 134 |
-
| Easy-Turn | 850M | [ASLP-lab/Easy-Turn](https://huggingface.co/ASLP-lab/Easy-Turn) |
|
| 135 |
-
| Smart-Turn-v3 | 8M | [pipecat-ai/smart-turn-v3](https://huggingface.co/pipecat-ai/smart-turn-v3) |
|
| 136 |
-
| TEN-Turn | 7B(70 亿) | [TEN-framework/TEN_Turn_Detection](https://huggingface.co/TEN-framework/TEN_Turn_Detection) |
|
| 137 |
-
| FireRedChat-turn-detector | -- | [FireRedTeam/FireRedChat-turn-detector](https://huggingface.co/FireRedTeam/FireRedChat-turn-detector) |
|
| 138 |
-
| NAMO-Turn-Detector (ZH) | 66M | [videosdk-live/Namo-Turn-Detector-v1-Multilingual](https://huggingface.co/videosdk-live/Namo-Turn-Detector-v1-Multilingual) |
|
| 139 |
-
| TurnSense | 47M | [Baiji-Team/TurnSense](https://huggingface.co/Baiji-Team/TurnSense) |
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
## 基准结果
|
| 143 |
-
|
| 144 |
-
以下为在开源中文评测集上的基准结果。
|
| 145 |
-
|
| 146 |
-
延迟说明:若表格中的 `p50_latency_ms` / `p90_latency_ms` 单元格未标注 `(GPU)`,则表示在 CPU 环境下评测得到的延迟;标注 `(GPU)` 则表示在 GPU 环境下评测得到的延迟。
|
| 147 |
-
|
| 148 |
-
<style>
|
| 149 |
-
table.metrics {
|
| 150 |
-
border-collapse: collapse;
|
| 151 |
-
width: 100%;
|
| 152 |
-
margin: 16px 0 28px 0;
|
| 153 |
-
font-family: Arial, sans-serif;
|
| 154 |
-
font-size: 14px;
|
| 155 |
-
text-align: center;
|
| 156 |
-
}
|
| 157 |
-
table.metrics th, table.metrics td {
|
| 158 |
-
border: 1px solid #d9d9d9;
|
| 159 |
-
padding: 8px 10px;
|
| 160 |
-
vertical-align: middle;
|
| 161 |
-
text-align: center;
|
| 162 |
-
}
|
| 163 |
-
table.metrics th {
|
| 164 |
-
font-weight: 600;
|
| 165 |
-
background: #fff;
|
| 166 |
-
}
|
| 167 |
-
.b { font-weight: 700; }
|
| 168 |
-
.u {
|
| 169 |
-
text-decoration: underline;
|
| 170 |
-
text-underline-offset: 2px;
|
| 171 |
-
}
|
| 172 |
-
</style>
|
| 173 |
-
|
| 174 |
-
### easyturn_real_test_ZH
|
| 175 |
-
|
| 176 |
-
数据集规模:**300**
|
| 177 |
-
|
| 178 |
-
选取自 [Easy-Turn-Testset](https://huggingface.co/datasets/ASLP-lab/Easy-Turn-Testset) 中的真实数据样本。
|
| 179 |
-
|
| 180 |
-
<table class="metrics">
|
| 181 |
-
<tr>
|
| 182 |
-
<th rowspan="2">model</th>
|
| 183 |
-
<th rowspan="2">dataset</th>
|
| 184 |
-
<th colspan="3">complete</th>
|
| 185 |
-
<th colspan="3">incomplet</th>
|
| 186 |
-
<th colspan="2">latency</th>
|
| 187 |
-
</tr>
|
| 188 |
-
<tr>
|
| 189 |
-
<th>precision_complete</th>
|
| 190 |
-
<th>recall_complete</th>
|
| 191 |
-
<th>f1_complete</th>
|
| 192 |
-
<th>precision_incomplete</th>
|
| 193 |
-
<th>recall_incomplete</th>
|
| 194 |
-
<th>f1_incomplete</th>
|
| 195 |
-
<th>p50_latency_ms</th>
|
| 196 |
-
<th>p90_latency_ms</th>
|
| 197 |
-
</tr>
|
| 198 |
-
<tr>
|
| 199 |
-
<td>Easy-Turn</td>
|
| 200 |
-
<td rowspan="6">easyturn_real_test_ZH (300)</td>
|
| 201 |
-
<td><span class="u">97.26%</span></td>
|
| 202 |
-
<td><span class="u">94.67%</span></td>
|
| 203 |
-
<td><span class="u">95.95%</span></td>
|
| 204 |
-
<td><span class="u">94.81%</span></td>
|
| 205 |
-
<td><span class="u">97.33%</span></td>
|
| 206 |
-
<td><span class="u">96.05%</span></td>
|
| 207 |
-
<td>183.87(GPU)</td>
|
| 208 |
-
<td>300.37(GPU)</td>
|
| 209 |
-
</tr>
|
| 210 |
-
<tr>
|
| 211 |
-
<td>Smart-Turn-v3</td>
|
| 212 |
-
<td>64.97%</td>
|
| 213 |
-
<td>76.67%</td>
|
| 214 |
-
<td>70.34%</td>
|
| 215 |
-
<td>71.54%</td>
|
| 216 |
-
<td>58.67%</td>
|
| 217 |
-
<td>64.47%</td>
|
| 218 |
-
<td>36.84</td>
|
| 219 |
-
<td><span class="u">39.10</span></td>
|
| 220 |
-
</tr>
|
| 221 |
-
<tr>
|
| 222 |
-
<td>TEN-Turn</td>
|
| 223 |
-
<td><span class="b">99.25%</span></td>
|
| 224 |
-
<td>88.00%</td>
|
| 225 |
-
<td>93.29%</td>
|
| 226 |
-
<td>89.22%</td>
|
| 227 |
-
<td><span class="b">99.33%</span></td>
|
| 228 |
-
<td>94.01%</td>
|
| 229 |
-
<td><span class="u">17.66(GPU)</span></td>
|
| 230 |
-
<td><span class="b">19.41(GPU)</span></td>
|
| 231 |
-
</tr>
|
| 232 |
-
<tr>
|
| 233 |
-
<td>FireRedChat-turn-detector</td>
|
| 234 |
-
<td>70.65%</td>
|
| 235 |
-
<td><span class="u">94.67%</span></td>
|
| 236 |
-
<td>80.91%</td>
|
| 237 |
-
<td>91.92%</td>
|
| 238 |
-
<td>60.67%</td>
|
| 239 |
-
<td>73.09%</td>
|
| 240 |
-
<td>98.30</td>
|
| 241 |
-
<td>99.42</td>
|
| 242 |
-
</tr>
|
| 243 |
-
<tr>
|
| 244 |
-
<td>NAMO-Turn-Detector</td>
|
| 245 |
-
<td>81.53%</td>
|
| 246 |
-
<td>85.33%</td>
|
| 247 |
-
<td>83.39%</td>
|
| 248 |
-
<td>84.62%</td>
|
| 249 |
-
<td>80.67%</td>
|
| 250 |
-
<td>82.59%</td>
|
| 251 |
-
<td><span class="b">3.60</span></td>
|
| 252 |
-
<td>83.44</td>
|
| 253 |
-
</tr>
|
| 254 |
-
<tr>
|
| 255 |
-
<td>TurnSense</td>
|
| 256 |
-
<td>96.03%</td>
|
| 257 |
-
<td><span class="b">96.67%</span></td>
|
| 258 |
-
<td><span class="b">96.35%</span></td>
|
| 259 |
-
<td><span class="b">96.64%</span></td>
|
| 260 |
-
<td>96.00%</td>
|
| 261 |
-
<td><span class="b">96.32%</span></td>
|
| 262 |
-
<td>54.65</td>
|
| 263 |
-
<td>58.00</td>
|
| 264 |
-
</tr>
|
| 265 |
-
</table>
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
### semantic_test_ZH
|
| 270 |
-
|
| 271 |
-
数据集规模:**2000**
|
| 272 |
-
|
| 273 |
-
选取自 [KE-Team/SemanticVAD-Dataset](https://huggingface.co/datasets/KE-Team/SemanticVAD-Dataset) 中的中文部分测试集。
|
| 274 |
-
|
| 275 |
-
<table class="metrics">
|
| 276 |
-
<tr>
|
| 277 |
-
<th rowspan="2">model</th>
|
| 278 |
-
<th rowspan="2">dataset</th>
|
| 279 |
-
<th colspan="3">complete</th>
|
| 280 |
-
<th colspan="3">incomplet</th>
|
| 281 |
-
<th colspan="2">latency</th>
|
| 282 |
-
</tr>
|
| 283 |
-
<tr>
|
| 284 |
-
<th>precision_complete</th>
|
| 285 |
-
<th>recall_complete</th>
|
| 286 |
-
<th>f1_complete</th>
|
| 287 |
-
<th>precision_incomplete</th>
|
| 288 |
-
<th>recall_incomplete</th>
|
| 289 |
-
<th>f1_incomplete</th>
|
| 290 |
-
<th>p50_latency_ms</th>
|
| 291 |
-
<th>p90_latency_ms</th>
|
| 292 |
-
</tr>
|
| 293 |
-
<tr>
|
| 294 |
-
<td>Easy-Turn</td>
|
| 295 |
-
<td rowspan="6">semantic_test_ZH (2000)</td>
|
| 296 |
-
<td>78.14%</td>
|
| 297 |
-
<td>98.30%</td>
|
| 298 |
-
<td>87.07%</td>
|
| 299 |
-
<td>97.64%</td>
|
| 300 |
-
<td>70.30%</td>
|
| 301 |
-
<td>81.74%</td>
|
| 302 |
-
<td>183.87(GPU)</td>
|
| 303 |
-
<td>300.37(GPU)</td>
|
| 304 |
-
</tr>
|
| 305 |
-
<tr>
|
| 306 |
-
<td>Smart-Turn-v3</td>
|
| 307 |
-
<td>59.25%</td>
|
| 308 |
-
<td>88.10%</td>
|
| 309 |
-
<td>70.85%</td>
|
| 310 |
-
<td>76.80%</td>
|
| 311 |
-
<td>39.40%</td>
|
| 312 |
-
<td>52.08%</td>
|
| 313 |
-
<td>36.84</td>
|
| 314 |
-
<td><span class="u">39.10</span></td>
|
| 315 |
-
</tr>
|
| 316 |
-
<tr>
|
| 317 |
-
<td>TEN-Turn</td>
|
| 318 |
-
<td>85.25%</td>
|
| 319 |
-
<td><span class="b">99.60%</span></td>
|
| 320 |
-
<td><span class="u">91.87%</span></td>
|
| 321 |
-
<td><span class="b">99.52%</span></td>
|
| 322 |
-
<td><span class="u">82.70%</span></td>
|
| 323 |
-
<td><span class="u">90.33%</span></td>
|
| 324 |
-
<td><span class="u">17.66(GPU)</span></td>
|
| 325 |
-
<td><span class="b">19.41(GPU)</span></td>
|
| 326 |
-
</tr>
|
| 327 |
-
<tr>
|
| 328 |
-
<td>FireRedChat-turn-detector</td>
|
| 329 |
-
<td>66.76%</td>
|
| 330 |
-
<td><span class="u">99.40%</span></td>
|
| 331 |
-
<td>79.87%</td>
|
| 332 |
-
<td><span class="u">98.83%</span></td>
|
| 333 |
-
<td>50.50%</td>
|
| 334 |
-
<td>66.84%</td>
|
| 335 |
-
<td>98.30</td>
|
| 336 |
-
<td>99.42</td>
|
| 337 |
-
</tr>
|
| 338 |
-
<tr>
|
| 339 |
-
<td>NAMO-Turn-Detector</td>
|
| 340 |
-
<td>71.48%</td>
|
| 341 |
-
<td>86.70%</td>
|
| 342 |
-
<td><span class="u">78.36%</span></td>
|
| 343 |
-
<td>83.10%</td>
|
| 344 |
-
<td>65.40%</td>
|
| 345 |
-
<td>73.20%</td>
|
| 346 |
-
<td><span class="b">3.60</span></td>
|
| 347 |
-
<td>83.44</td>
|
| 348 |
-
</tr>
|
| 349 |
-
<tr>
|
| 350 |
-
<td>TurnSense</td>
|
| 351 |
-
<td><span class="b">88.96%</span></td>
|
| 352 |
-
<td>95.90%</td>
|
| 353 |
-
<td><span class="b">92.30%</span></td>
|
| 354 |
-
<td>95.55%</td>
|
| 355 |
-
<td><span class="b">88.00%</span></td>
|
| 356 |
-
<td><span class="b">91.62%</span></td>
|
| 357 |
-
<td>54.65</td>
|
| 358 |
-
<td>58.00</td>
|
| 359 |
-
</tr>
|
| 360 |
-
</table>
|
| 361 |
-
|
| 362 |
-
|
| 363 |
-
|
| 364 |
-
### NonverbalVocalization_invalid
|
| 365 |
-
|
| 366 |
-
数据集规模:**728**
|
| 367 |
-
|
| 368 |
-
测试集数据来自 OpenSLR 的 [Deeply Nonverbal Vocalization Dataset(SLR99)](https://openslr.elda.org/99/)。
|
| 369 |
-
|
| 370 |
-
<table class="metrics">
|
| 371 |
-
<tr>
|
| 372 |
-
<th rowspan="2">model</th>
|
| 373 |
-
<th rowspan="2">dataset</th>
|
| 374 |
-
<th colspan="3">invalid</th>
|
| 375 |
-
</tr>
|
| 376 |
-
<tr>
|
| 377 |
-
<th>precision_invalid</th>
|
| 378 |
-
<th>recall_invalid</th>
|
| 379 |
-
<th>f1_invalid</th>
|
| 380 |
-
</tr>
|
| 381 |
-
<tr>
|
| 382 |
-
<td>TurnSense</td>
|
| 383 |
-
<td>NonverbalVocalization_invalid (728)</td>
|
| 384 |
-
<td><span class="b">100.00%</span></td>
|
| 385 |
-
<td><span class="b">90.37%</span></td>
|
| 386 |
-
<td><span class="b">94.34%</span></td>
|
| 387 |
-
</tr>
|
| 388 |
-
</table>
|
| 389 |
-
|
| 390 |
-
**观察:**
|
| 391 |
-
- 目前上述模型仅**TurnSense**支持无效语义的判断
|
| 392 |
-
- 从资源角度上 **TurnSense** 的精度是比较高的而且在CPU上的延迟比较低
|
| 393 |
-
|
| 394 |
-
<br>
|
| 395 |
-
|
| 396 |
-
## 🚀快速开始
|
| 397 |
-
|
| 398 |
-
### Installation
|
| 399 |
-
|
| 400 |
-
```bash
|
| 401 |
-
git clone https://github.com/Baiji-Team/TurnSense.git
|
| 402 |
-
cd TurnSense
|
| 403 |
-
|
| 404 |
-
pip install -U numpy onnxruntime torch librosa soundfile pandas scikit-learn huggingface_hub
|
| 405 |
-
```
|
| 406 |
-
|
| 407 |
-
### Model Weights
|
| 408 |
-
|
| 409 |
-
TurnSense 模型权重已发布在 Hugging Face:
|
| 410 |
-
|
| 411 |
-
- Model Repository: [Baiji-Team/TurnSense](https://huggingface.co/Baiji-Team/TurnSense)
|
| 412 |
-
|
| 413 |
-
支持两种模型版本:
|
| 414 |
-
|
| 415 |
-
- `FP32`(约 191.04 MB)
|
| 416 |
-
- `INT8`(约 49.79 MB)
|
| 417 |
-
|
| 418 |
-
你可以通过以下方式下载:
|
| 419 |
-
|
| 420 |
-
1. **自动下载(推荐)**
|
| 421 |
-
如果你的推理脚本内置了 Hugging Face 下载逻辑,首次运行时会自动拉取并缓存模型。
|
| 422 |
-
|
| 423 |
-
2. **使用 Git LFS**
|
| 424 |
-
|
| 425 |
-
```bash
|
| 426 |
-
git lfs install
|
| 427 |
-
git clone https://huggingface.co/Baiji-Team/TurnSense
|
| 428 |
-
```
|
| 429 |
-
|
| 430 |
-
3. **使用 Hugging Face Hub**
|
| 431 |
-
|
| 432 |
-
```python
|
| 433 |
-
from huggingface_hub import snapshot_download
|
| 434 |
-
|
| 435 |
-
snapshot_download(repo_id="Baiji-Team/TurnSense")
|
| 436 |
-
```
|
| 437 |
-
|
| 438 |
-
### Inference
|
| 439 |
-
|
| 440 |
-
```bash
|
| 441 |
-
python infer.py
|
| 442 |
-
```
|
| 443 |
-
|
| 444 |
-
示例输出(示意):
|
| 445 |
-
|
| 446 |
-
```音频
|
| 447 |
-
Loading model from Baiji-Team/TurnSense...
|
| 448 |
-
Running inference on: "我想问一下那个订单就是昨天..."
|
| 449 |
-
|
| 450 |
-
Results:
|
| 451 |
-
Input: "我想问一下那个订单就是昨天..."
|
| 452 |
-
TurnSense Detection Result: "incomplete"
|
| 453 |
-
```
|
| 454 |
-
|
| 455 |
-
|
| 456 |
-
## 🧪 评测说明
|
| 457 |
-
|
| 458 |
-
### 1)如何评测
|
| 459 |
-
|
| 460 |
-
评测流程如下:
|
| 461 |
-
|
| 462 |
-
1. 读取 `.jsonl` 数据集(逐行 JSONL)。
|
| 463 |
-
2. 每个模型先进行预热(默认 `warmup_iters=20`)。
|
| 464 |
-
3. 逐样本推理,统计分类指标与性能指标。
|
| 465 |
-
4. 自动产出汇总与明细文件。
|
| 466 |
-
|
| 467 |
-
输出文件包括:
|
| 468 |
-
|
| 469 |
-
- `report.md`:汇总表
|
| 470 |
-
- `results.json`:结构化评测结果
|
| 471 |
-
- `config.json`:本次评测配置
|
| 472 |
-
- `per_sample__*.jsonl`:逐条样本预测结果
|
| 473 |
-
|
| 474 |
-
---
|
| 475 |
-
|
| 476 |
-
### 2)数据格式要求(JSONL)
|
| 477 |
-
|
| 478 |
-
每一行是一个 JSONL 对象,至少包含以下字段:
|
| 479 |
-
|
| 480 |
-
- `audio_path`:音频路径
|
| 481 |
-
- `text`:文本内容
|
| 482 |
-
- `label`:标签
|
| 483 |
-
|
| 484 |
-
示例(完整 / 不完整 / 无效语义):
|
| 485 |
-
|
| 486 |
-
```jsonl
|
| 487 |
-
{"audio_path":"/001.wav","text":"帮我查一下明天上海天气","label":"complete"}
|
| 488 |
-
{"audio_path":"/002.wav","text":"我想问一下那个订单就是昨天...","label":"incomplete"}
|
| 489 |
-
{"audio_path":"/003.wav","text":"啊…嗯…(持续噪声)","label":"invalid"}
|
| 490 |
-
```
|
| 491 |
-
|
| 492 |
-
### Inference
|
| 493 |
-
|
| 494 |
-
```bash
|
| 495 |
-
python TurnSense/Turn_benchmark/benchmark.py
|
| 496 |
-
```
|
| 497 |
-
|
| 498 |
-
## 📚 引用
|
| 499 |
-
|
| 500 |
-
如果你在研究或产品中使用 TurnSense,请引用:
|
| 501 |
-
|
| 502 |
-
```bibtex
|
| 503 |
-
@misc{turnsense2026,
|
| 504 |
-
author = {Baiji Team},
|
| 505 |
-
title = {TurnSense: A Three-Class Semantic Detection Model for Complete, Incomplete, and Invalid Utterances},
|
| 506 |
-
year = {2026},
|
| 507 |
-
publisher = {Hugging Face},
|
| 508 |
-
howpublished = {\url{https://huggingface.co/Baiji-Team/TurnSense}},
|
| 509 |
-
}
|
| 510 |
-
```
|
| 511 |
-
|
| 512 |
-
|
| 513 |
-
|
| 514 |
-
## ❓ 问题与交流
|
| 515 |
-
|
| 516 |
-
|
| 517 |
-
|
| 518 |
-
如果有具体问题或改进建议,欢迎联系我们
|
| 519 |
-
|
| 520 |
-
- 邮箱: huan.shen@brgroup.com、yingao.wang@brgroup.cpm、wei.zou@brgroup.com
|
| 521 |
-
|
| 522 |
-
|
| 523 |
-
## 📄 许可证
|
| 524 |
-
|
| 525 |
-
本项目基于 Apache License 2.0 发布,并附加特定限制条件。详情请参见 [LICENSE](./LICENSE)。
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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