iic/speech_paraformer-tiny-commandword_asr_nat-zh-cn-16k-vocab544-pytorch 是基于 Paraformer (ConformerEncoder) 架构的语音识别模型。
本项目将该模型适配到单卡昇腾 NPU(Ascend910)上运行,使用 ModelScope snapshot_download 下载权重,通过 FunASR AutoModel 框架加载,包含推理验证、CPU-NPU 精度一致性检查和性能基准测试。
| 项目 | 配置 |
|---|---|
| 硬件 | 单卡 Ascend910 |
| CANN | 8.5.1 |
| Python | 3.11.14 |
| PyTorch | 2.9.0+cpu |
| torch_npu | 2.9.0.post1 |
| FunASR | 1.3.1 |
| 模型架构 | Paraformer (ConformerEncoder) |
pip install -r requirements.txt
python inference.py推理结果(NPU):
NPU transcription: 温度调高
NPU inference time: 0.3585s对单张测试音频进行 CPU 与 NPU 一致性验证(encoder 输出层):
| 指标 | 数值 |
|---|---|
| relative_error | 0.0611% |
| cosine_similarity | 1.000000 |
| threshold | 1.0% |
| 结果 | PASS |
| 指标 | 数值 |
|---|---|
| avg_latency | 18.11 ms |
| min_latency | 17.36 ms |
| max_latency | 19.25 ms |
| p50_latency | 17.57 ms |
| p90_latency | 19.06 ms |
| p95_latency | 19.10 ms |
| RTF | 0.0044 |
详见 screenshots/self_verification.png。
#NPU #Ascend #ASR #Paraformer #FunASR