g
gyccc/iic-speech_paraformerbert_asr_nat-zh-cn-16k-aishell2-vocab5212-pytorch-NPU
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

speech_paraformerbert_asr_nat-zh-cn-16k-aishell2-vocab5212-pytorch NPU

#NPU

Model Description

ParaformerBert ASR model for Chinese speech recognition, trained on AISHELL-2 dataset with 5212 vocabulary. This is the NPU-adapted version running on Huawei Ascend 910B.

  • Framework: PyTorch (FunASR 1.3.1)
  • Language: Chinese (zh-cn)
  • Sample Rate: 16kHz
  • Architecture: ConformerEncoder + ParaformerDecoderSAN + CifPredictor

Environment

ComponentVersion
PyTorch2.9.0+cpu
torch_npu2.9.0.post1
CANN8.5.1
Python3.11.14
FunASR1.3.1
NPUAscend 910B

Inference Results

NPU Transcription: 欢迎大家来体验打磨院推出的语音识别模型

Inference Latency: 443.31 ms

Benchmark (10 runs)

MetricValue
Avg Latency86.98 ms
Min Latency85.90 ms
Max Latency88.34 ms
P50 Latency86.44 ms
P90 Latency88.32 ms
P95 Latency88.33 ms
Audio Duration5.55 s
Real-Time Factor0.0157

CPU-NPU Consistency

MetricValue
Max Abs Error0.00137
Mean Abs Error0.000117
Relative Error0.096%
Cosine Similarity1.0
Threshold1.0%
ResultPASS

Usage

pip install -r requirements.txt

# Inference
python inference.py

# CPU-NPU consistency check
python eval_consistency.py

# Benchmark
python benchmark.py

Files

  • inference.py - NPU inference script
  • eval_consistency.py - CPU-NPU numerical consistency evaluation
  • benchmark.py - NPU latency and RTF benchmark
  • model_utils.py - Audio loading and model loading utilities
  • models/ - Model weights and configuration
  • assets/test.wav - Test audio file
  • logs/ - Inference and benchmark logs