export sense-voice to onnx (#1144)

This commit is contained in:
Fangjun Kuang
2024-07-18 00:18:38 +08:00
committed by GitHub
parent 4198d9a166
commit 346f419f39
7 changed files with 391 additions and 3 deletions

37
scripts/sense-voice/run.sh Executable file
View File

@@ -0,0 +1,37 @@
#!/usr/bin/env bash
set -ex
function install() {
pip install torch==2.3.1+cpu torchaudio==2.3.1+cpu -f https://download.pytorch.org/whl/torch_stable.html
pushd /tmp
git clone https://github.com/alibaba/FunASR.git
cd FunASR
pip3 install -qq -e ./
cd ..
git clone https://github.com/FunAudioLLM/SenseVoice
cd SenseVoice
pip install -qq -r ./requirements.txt
cd ..
pip install soundfile onnx onnxruntime kaldi-native-fbank librosa soundfile
popd
}
install
export PYTHONPATH=/tmp/FunASR:$PYTHONPATH
export PYTHONPATH=/tmp/SenseVoice:$PYTHONPATH
echo "pwd: $PWD"
./export-onnx.py
./show-info.py
ls -lh