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

speech_paraformerbert_asr_nat-zh-cn-16k-aishell1-vocab4234-pytorch NPU

#NPU

Model Description

ParaformerBert ASR model for Chinese speech recognition, trained on AISHELL-1 dataset with 4234 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 + CifPredictorV2

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: 405.96 ms

Benchmark (10 runs)

MetricValue
Avg Latency43.40 ms
Min Latency43.04 ms
Max Latency44.34 ms
P50 Latency43.30 ms
P90 Latency43.75 ms
P95 Latency44.04 ms
Audio Duration5.55 s
Real-Time Factor0.0078

CPU-NPU Consistency

MetricValue
Max Abs Error0.00163
Mean Abs Error0.000119
Relative Error0.105%
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