本项目将 openai/whisper-tiny 语音识别 (Automatic Speech Recognition)模型适配到华为昇腾 NPU(Ascend910B4-1)上运行。
安装依赖:
pip install -r requirements.txtpython inference.py推理输出:
Input: assets/test_audio.wav (7.36s)
Output: the quick roundfucks jumps over the lazy dog. this is a test of automatic speech recognition.
Status: SUCCESSpython eval_accuracy.pyCPU 与 NPU 输出一致性验证:
| 指标 | 数值 |
|---|---|
| relative_error | 0.00% |
| cosine_similarity | 1.000000 |
CPU 与 NPU 输出一致性验证通过。