| license: apache-2.0 | |
| # FireRedASR-AED | |
| 小红书ASR AED-L版本在AX650N上的部署,原项目地址为:[https://github.com/FireRedTeam/FireRedASR](https://github.com/FireRedTeam/FireRedASR) | |
| 转换后的模型放置在axmodel目录,目前支持中文、英文,最长输入10秒的音频,超过10秒的音频会用VAD切割后推理。 | |
| ## 模型转换 | |
| [参考Github](https://github.com/ml-inory/FireRedASR.axera/tree/main) | |
| ## 支持平台 | |
| - [x] AX650N | |
| ## 安装依赖 | |
| ### Audio backend | |
| ``` | |
| sudo apt install libsndfile1 | |
| ``` | |
| ### Python | |
| 测试环境为Python 3.12,建议使用[Miniconda](https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh | |
| ),安装方法[参考](https://www.anaconda.com/docs/getting-started/miniconda/install#aws-graviton2%2Farm64) | |
| ``` | |
| conda create -n fireredasr python=3.12 | |
| conda activate fireredasr | |
| pip install -r requirements.txt | |
| ``` | |
| `requirements.txt` 只包含 AX650N AED 推理路径需要的运行时依赖。其他脚本按需安装: | |
| - `fireredasr_onnx.py`: `pip install onnxruntime` | |
| - `fireredasr/speech2text.py` 的 LLM 路径: `pip install transformers peft` | |
| - `fireredasr/utils/wer.py --do_tn 1`: `pip install cn2an` | |
| ### 手动安装pyaxengine | |
| ``` | |
| wget https://github.com/AXERA-TECH/pyaxengine/releases/download/0.1.3.rc2/axengine-0.1.3-py3-none-any.whl | |
| pip install axengine-0.1.3-py3-none-any.whl | |
| ``` | |
| ## 使用 | |
| ``` | |
| conda activate fireredasr | |
| python test_ax_model.py | |
| ``` | |
| ```hypo_axmodel.txt```包含识别结果 | |
| ## 性能表现 | |
| RTF ~= 0.3 | |
| CER(on custom dataset): 3.45% | |