Files
enginex-mr_series-asr/README.md
2025-08-20 14:29:42 +08:00

39 lines
2.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 天数智芯 智铠100 FunASR
## 镜像构造
```shell
docker build -f ./Dockerfile.funasr-mr100 -t <your_image> .
```
## 使用说明
### 快速镜像测试
对funasr的测试需要在以上构造好的镜像容器内测试测试步骤
1. 将需要测试的音频wav文件和相应的ground truth文件含有音频的正确内容文字的文本文件放置于当前文件夹并且准备好相应的ASR模型路径
2. 快速测试命令
```shell
docker run -it \
-v /usr/src:/usr/src \
-v /lib/modules:/lib/modules --device=/dev/iluvatar0:/dev/iluvatar0 \
-v $PWD:/tmp/workspace \
-v <host_model_dir>:<model_dir> \
-e MODEL_DIR=<model_dir> \
-e TEST_FILE=<test_file> \
-e ANSWER_FILE=<ground_truth> \
--cpus=4 --memory=16g \
<your_image>
```
### 定制化手动运行
用户可使用类似上述的docker run指令以交互形式进入镜像中主要的测试代码为`test_funasr.py`,用户可自行修改代码中需要测试的模型路径、测试文件路径以及调用funASR逻辑
## 智铠100模型适配情况
我们在智铠100上针对funASR部分进行了所有大类的适配测试方式为在Nvidia A100环境下和智铠100加速卡上对同一段长音频进行语音识别任务获取运行时间1-cer指标。运行时都只使用一张显卡
| 模型大类 | 模型地址 |A100运行时间(秒)|智铠100运行时间(秒)|A100 1-cer|智铠100 1-cer| 备注 |
|------|---------------|-----|----|-------|-------|---------------------|
| sense_voice | https://www.modelscope.cn/models/iic/SenseVoiceSmall | 1.8327 | 1.2579 | 0.980033 | 0.980033 | |
| whisper | https://www.modelscope.cn/models/iic/Whisper-large-v3 | 23.8337 | 22.9085 | 0.910150 | 0.910150 | |
| paraformer | https://modelscope.cn/models/iic/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-pytorch | 4.7246 | 4.7719 | 0.955075 | 0.955075 | |
| conformer | https://www.modelscope.cn/models/iic/speech_conformer_asr_nat-zh-cn-16k-aishell2-vocab5212-pytorch | 95.9631 | 125.8649 | 0.349418 | 0.346090 | |
| uni_asr | https://www.modelscope.cn/models/iic/speech_UniASR-large_asr_2pass-zh-cn-16k-common-vocab8358-tensorflow1-offline | 70.5289 | 88.9481 | 0.717138 | 0.717138 | 该部分的适配修改了一些funASR源码 |