-
Notifications
You must be signed in to change notification settings - Fork 378
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test about whisper large-v3 for .Net (#1187)
- Loading branch information
1 parent
86b4c9f
commit 06fd50f
Showing
4 changed files
with
148 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,49 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
|
||
- name: Free space | ||
if: matrix.os == 'ubuntu-latest' | ||
shell: bash | ||
run: | | ||
df -h | ||
rm -rf /opt/hostedtoolcache | ||
df -h | ||
- name: Free more space | ||
if: matrix.os == 'ubuntu-latest' | ||
shell: bash | ||
run: | | ||
# https://github.com/orgs/community/discussions/25678 | ||
cd /opt | ||
find . -maxdepth 1 -mindepth 1 '!' -path ./containerd '!' -path ./actionarchivecache '!' -path ./runner '!' -path ./runner-cache -exec rm -rf '{}' ';' | ||
sudo rm -rf /usr/share/dotnet | ||
sudo rm -rf "/usr/local/share/boost" | ||
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | ||
- name: Free Disk Space (Ubuntu) | ||
if: matrix.os == 'ubuntu-latest' | ||
uses: jlumbroso/free-disk-space@main | ||
with: | ||
# this might remove tools that are actually needed, | ||
# if set to "true" but frees about 6 GB | ||
tool-cache: false | ||
|
||
# all of these default to true, but feel free to set to | ||
# "false" if necessary for your workflow | ||
android: true | ||
dotnet: false | ||
haskell: true | ||
large-packages: true | ||
docker-images: false | ||
swap-storage: true | ||
|
||
- name: Check space | ||
if: matrix.os == 'ubuntu-latest' | ||
shell: bash | ||
run: | | ||
df -h | ||
- name: ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
|
32 changes: 32 additions & 0 deletions
32
dotnet-examples/offline-decode-files/run-whisper-large-v3.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ex | ||
|
||
if [ ! -f ./large-v3-encoder.int8.onnx ]; then | ||
git lfs install | ||
|
||
git clone https://huggingface.co/csukuangfj/sherpa-onnx-whisper-large-v3 | ||
|
||
ls -lh sherpa-onnx-whisper-large-v3 | ||
cp -v sherpa-onnx-whisper-large-v3/*.onnx . | ||
cp -v sherpa-onnx-whisper-large-v3/*.weights . | ||
ls -lh | ||
fi | ||
|
||
dotnet run \ | ||
--num-threads=2 \ | ||
--whisper-encoder=./large-v3-encoder.int8.onnx \ | ||
--whisper-decoder=./large-v3-decoder.int8.onnx \ | ||
--tokens=./sherpa-onnx-whisper-large-v3/large-v3-tokens.txt \ | ||
--files ./sherpa-onnx-whisper-large-v3/test_wavs/0.wav \ | ||
./sherpa-onnx-whisper-large-v3/test_wavs/1.wav \ | ||
./sherpa-onnx-whisper-large-v3/test_wavs/8k.wav | ||
|
||
dotnet run \ | ||
--num-threads=2 \ | ||
--whisper-encoder=./large-v3-encoder.onnx \ | ||
--whisper-decoder=./large-v3-decoder.onnx \ | ||
--tokens=./sherpa-onnx-whisper-large-v3/large-v3-tokens.txt \ | ||
--files ./sherpa-onnx-whisper-large-v3/test_wavs/0.wav \ | ||
./sherpa-onnx-whisper-large-v3/test_wavs/1.wav \ | ||
./sherpa-onnx-whisper-large-v3/test_wavs/8k.wav |