Commit d9a69658 authored by shantf's avatar shantf
Browse files

update README.md

parent 93457c3c
...@@ -10,10 +10,14 @@ ...@@ -10,10 +10,14 @@
## 环境配置 ## 环境配置
[光源](https://www.sourcefind.cn/#/service-details)可拉取推理的docker镜像,在[光合开发者社区](https://cancon.hpccube.com:65024/4/main/)可下载onnxruntime安装包。asr_onnx推荐的镜像如下: [光源](https://www.sourcefind.cn/#/service-details)可拉取推理的docker镜像,在[光合开发者社区](https://cancon.hpccube.com:65024/4/main/)可下载onnxruntime安装包。asr_onnx推荐的镜像如下:
``` ```
docker pull image.sourcefind.cn:5000/dcu/admin/base/pytorch:1.13.1-centos7.6-dtk-23.04-py37-latest docker pull image.sourcefind.cn:5000/dcu/admin/base/pytorch:2.1.0-ubuntu20.04-dtk24.04.1-py3.10
docker run -d -t --privileged --device=/dev/kfd --device=/dev/dri/ --network=host --group-add video --name asr-test image.sourcefind.cn:5000/dcu/admin/base/pytorch:1.13.1-centos7.6-dtk-23.04-py37-latest cd asr_onnxruntime #进入当前项目目录
docker exec -it asr-test bash docker run -d -t --privileged --device=/dev/kfd --device=/dev/dri/ --network=host --group-add video -v /opt/hyhal:/opt/hyhal:ro -v `pwd`:/mnt --name=asr-test image.sourcefind.cn:5000/dcu/admin/base/pytorch:2.1.0-ubuntu20.04-dtk24.04.1-py3.10
pip3 install onnxruntime.whl docker exec -it asr-test /bin/bash
cd /mnt
pip install onnx -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install pysoundfile -i https://pypi.tuna.tsinghua.edu.cn/simple
``` ```
下载模型 (https://models.silero.ai/models/en/en_v5.onnx) 到当前目录,建立wavs文件夹添加测试wav文件。 下载模型 (https://models.silero.ai/models/en/en_v5.onnx) 到当前目录,建立wavs文件夹添加测试wav文件。
...@@ -22,6 +26,7 @@ pip3 install onnxruntime.whl ...@@ -22,6 +26,7 @@ pip3 install onnxruntime.whl
## 推理 ## 推理
``` ```
python3 main.py --model_dir="./en_v5.onnx" --wav_dir="./wavs/" --warmup=1 python3 main.py --model_dir="./en_v5.onnx" --wav_dir="./wavs/" --warmup=1
# --wav_dir:需要推理的语音路劲,如"./speech_orig.wav";speech_orig.wav是文件夹中已经存在的语音
``` ```
## result ## result
![image](https://developer.hpccube.com/codes/modelzoo/asr_onnx/-/raw/main/resources/asr_result.png) ![image](https://developer.hpccube.com/codes/modelzoo/asr_onnx/-/raw/main/resources/asr_result.png)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment