Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
xuning
/
sherpaonnx
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Fangjun Kuang
2024-03-22 21:40:42 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2024-03-22 21:40:42 +0800
Commit
2fc120192449cad57ced6673568d601ef9e62b0c
2fc12019
1 parent
24f437a6
Add hotwords support to .Net (#689)
隐藏空白字符变更
内嵌
并排对比
正在显示
16 个修改的文件
包含
83 行增加
和
6 行删除
.github/workflows/test-dot-net-nuget.yaml
.github/workflows/test-dot-net.yaml
dotnet-examples/offline-decode-files/run-hotwords.sh
dotnet-examples/offline-decode-files/run-nemo-ctc.sh
dotnet-examples/offline-decode-files/run-paraformer.sh
dotnet-examples/offline-decode-files/run-tdnn-yesno.sh
dotnet-examples/offline-decode-files/run-whisper.sh
dotnet-examples/offline-decode-files/run-zipformer.sh
dotnet-examples/offline-tts-play/run-piper.sh
dotnet-examples/offline-tts/run-aishell3.sh
dotnet-examples/offline-tts/run-piper.sh
dotnet-examples/online-decode-files/run-paraformer.sh
dotnet-examples/online-decode-files/run-transducer.sh
dotnet-examples/online-decode-files/run-zipformer2-ctc.sh
dotnet-examples/speech-recognition-from-microphone/run-paraformer.sh
dotnet-examples/speech-recognition-from-microphone/run-transducer.sh
.github/workflows/test-dot-net-nuget.yaml
查看文件 @
2fc1201
...
...
@@ -53,6 +53,7 @@ jobs:
./run-nemo-ctc.sh
./run-paraformer.sh
./run-zipformer.sh
./run-hotwords.sh
./run-whisper.sh
./run-tdnn-yesno.sh
...
...
.github/workflows/test-dot-net.yaml
查看文件 @
2fc1201
...
...
@@ -194,6 +194,7 @@ jobs:
./run-nemo-ctc.sh
./run-paraformer.sh
./run-zipformer.sh
./run-hotwords.sh
./run-whisper.sh
./run-tdnn-yesno.sh
...
...
dotnet-examples/offline-decode-files/run-hotwords.sh
0 → 100755
查看文件 @
2fc1201
#!/usr/bin/env bash
set
-ex
if
[
! -d ./sherpa-onnx-zipformer-en-2023-04-01
]
;
then
wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-zipformer-en-2023-04-01.tar.bz2
tar xvf sherpa-onnx-zipformer-en-2023-04-01.tar.bz2
rm sherpa-onnx-zipformer-en-2023-04-01.tar.bz2
fi
if
[
! -f ./sherpa-onnx-zipformer-en-2023-04-01/hotwords_en.txt
]
;
then
cat >./sherpa-onnx-zipformer-en-2023-04-01/hotwords_en.txt
<<EOF
▁ QUA R TER S
▁FOR E VER
EOF
fi
dotnet run
\
--tokens
=
./sherpa-onnx-zipformer-en-2023-04-01/tokens.txt
\
--encoder
=
./sherpa-onnx-zipformer-en-2023-04-01/encoder-epoch-99-avg-1.onnx
\
--decoder
=
./sherpa-onnx-zipformer-en-2023-04-01/decoder-epoch-99-avg-1.onnx
\
--joiner
=
./sherpa-onnx-zipformer-en-2023-04-01/joiner-epoch-99-avg-1.onnx
\
--num-threads
=
2
\
--decoding-method
=
modified_beam_search
\
--files ./sherpa-onnx-zipformer-en-2023-04-01/test_wavs/0.wav
\
./sherpa-onnx-zipformer-en-2023-04-01/test_wavs/1.wav
dotnet run
\
--hotwords-file
=
./sherpa-onnx-zipformer-en-2023-04-01/hotwords_en.txt
\
--hotwords-score
=
2.0
\
--tokens
=
./sherpa-onnx-zipformer-en-2023-04-01/tokens.txt
\
--encoder
=
./sherpa-onnx-zipformer-en-2023-04-01/encoder-epoch-99-avg-1.onnx
\
--decoder
=
./sherpa-onnx-zipformer-en-2023-04-01/decoder-epoch-99-avg-1.onnx
\
--joiner
=
./sherpa-onnx-zipformer-en-2023-04-01/joiner-epoch-99-avg-1.onnx
\
--num-threads
=
2
\
--decoding-method
=
modified_beam_search
\
--files ./sherpa-onnx-zipformer-en-2023-04-01/test_wavs/0.wav
\
./sherpa-onnx-zipformer-en-2023-04-01/test_wavs/1.wav
# 0.wav: QUARTER -> QUARTERS
# 1.wav: FOR EVER -> FOREVER
...
...
dotnet-examples/offline-decode-files/run-nemo-ctc.sh
查看文件 @
2fc1201
#!/usr/bin/env bash
set
-ex
if
[
! -d ./sherpa-onnx-nemo-ctc-en-conformer-medium
]
;
then
GIT_LFS_SKIP_SMUDGE
=
1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-nemo-ctc-en-conformer-medium
cd
sherpa-onnx-nemo-ctc-en-conformer-medium
...
...
dotnet-examples/offline-decode-files/run-paraformer.sh
查看文件 @
2fc1201
#!/usr/bin/env bash
set
-ex
if
[
! -d ./sherpa-onnx-paraformer-zh-2023-03-28
]
;
then
GIT_LFS_SKIP_SMUDGE
=
1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-paraformer-zh-2023-03-28
cd
sherpa-onnx-paraformer-zh-2023-03-28
...
...
dotnet-examples/offline-decode-files/run-tdnn-yesno.sh
查看文件 @
2fc1201
#!/usr/bin/env bash
set
-ex
if
[
! -d ./sherpa-onnx-tdnn-yesno
]
;
then
GIT_LFS_SKIP_SMUDGE
=
1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-tdnn-yesno
cd
sherpa-onnx-tdnn-yesno
...
...
dotnet-examples/offline-decode-files/run-whisper.sh
查看文件 @
2fc1201
#!/usr/bin/env bash
set
-ex
if
[
! -d ./sherpa-onnx-whisper-tiny.en
]
;
then
GIT_LFS_SKIP_SMUDGE
=
1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-whisper-tiny.en
cd
sherpa-onnx-whisper-tiny.en
...
...
dotnet-examples/offline-decode-files/run-zipformer.sh
查看文件 @
2fc1201
#!/usr/bin/env bash
#
set
-ex
if
[
! -d ./sherpa-onnx-zipformer-en-2023-04-01
]
;
then
GIT_LFS_SKIP_SMUDGE
=
1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-zipformer-en-2023-04-01
cd
sherpa-onnx-zipformer-en-2023-04-01
git lfs pull --include
"*.onnx"
cd
..
wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-zipformer-en-2023-04-01.tar.bz2
tar xvf sherpa-onnx-zipformer-en-2023-04-01.tar.bz2
rm sherpa-onnx-zipformer-en-2023-04-01.tar.bz2
fi
dotnet run
\
...
...
dotnet-examples/offline-tts-play/run-piper.sh
0 → 100755
查看文件 @
2fc1201
#!/usr/bin/env bash
set
-ex
if
[
! -f ./vits-piper-en_US-amy-low/en_US-amy-low.onnx
]
;
then
# wget -qq https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-piper-en_US-amy-low.tar.bz2
curl -OL https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-piper-en_US-amy-low.tar.bz2
tar xf vits-piper-en_US-amy-low.tar.bz2
rm vits-piper-en_US-amy-low.tar.bz2
fi
dotnet run
\
--vits-model
=
./vits-piper-en_US-amy-low/en_US-amy-low.onnx
\
--vits-tokens
=
./vits-piper-en_US-amy-low/tokens.txt
\
--vits-data-dir
=
./vits-piper-en_US-amy-low/espeak-ng-data
\
--debug
=
1
\
--output-filename
=
./amy.wav
\
--text
=
"This is a text to speech application in dotnet with Next Generation Kaldi"
...
...
dotnet-examples/offline-tts/run-aishell3.sh
查看文件 @
2fc1201
#!/usr/bin/env bash
set
-ex
if
[
! -f ./vits-zh-aishell3/vits-aishell3.onnx
]
;
then
# wget -qq https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-zh-aishell3.tar.bz2
curl -OL https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-zh-aishell3.tar.bz2
...
...
dotnet-examples/offline-tts/run-piper.sh
查看文件 @
2fc1201
#!/usr/bin/env bash
set
-ex
if
[
! -f ./vits-piper-en_US-amy-low/en_US-amy-low.onnx
]
;
then
# wget -qq https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-piper-en_US-amy-low.tar.bz2
curl -OL https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-piper-en_US-amy-low.tar.bz2
...
...
dotnet-examples/online-decode-files/run-paraformer.sh
查看文件 @
2fc1201
...
...
@@ -4,6 +4,7 @@
# https://k2-fsa.github.io/sherpa/onnx/pretrained_models/online-paraformer/paraformer-models.html#csukuangfj-sherpa-onnx-streaming-paraformer-bilingual-zh-en-chinese-english
# to download the model files
set
-ex
if
[
! -d ./sherpa-onnx-streaming-paraformer-bilingual-zh-en
]
;
then
GIT_LFS_SKIP_SMUDGE
=
1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-streaming-paraformer-bilingual-zh-en
cd
sherpa-onnx-streaming-paraformer-bilingual-zh-en
...
...
dotnet-examples/online-decode-files/run-transducer.sh
查看文件 @
2fc1201
...
...
@@ -4,6 +4,7 @@
# https://k2-fsa.github.io/sherpa/onnx/pretrained_models/online-transducer/zipformer-transducer-models.html#csukuangfj-sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20-bilingual-chinese-english
# to download the model files
set
-ex
if
[
! -d ./sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20
]
;
then
GIT_LFS_SKIP_SMUDGE
=
1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20
cd
sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20
...
...
dotnet-examples/online-decode-files/run-zipformer2-ctc.sh
查看文件 @
2fc1201
...
...
@@ -4,6 +4,7 @@
# https://k2-fsa.github.io/sherpa/onnx/pretrained_models/online-ctc/zipformer-ctc-models.html#sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13-chinese
# to download the model files
set
-ex
if
[
! -d ./sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13
]
;
then
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13.tar.bz2
tar xvf sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13.tar.bz2
...
...
dotnet-examples/speech-recognition-from-microphone/run-paraformer.sh
查看文件 @
2fc1201
...
...
@@ -4,6 +4,7 @@
# https://k2-fsa.github.io/sherpa/onnx/pretrained_models/online-paraformer/paraformer-models.html#csukuangfj-sherpa-onnx-streaming-paraformer-bilingual-zh-en-chinese-english
# to download the model files
set
-ex
if
[
! -d ./sherpa-onnx-streaming-paraformer-bilingual-zh-en
]
;
then
GIT_LFS_SKIP_SMUDGE
=
1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-streaming-paraformer-bilingual-zh-en
cd
sherpa-onnx-streaming-paraformer-bilingual-zh-en
...
...
dotnet-examples/speech-recognition-from-microphone/run-transducer.sh
查看文件 @
2fc1201
...
...
@@ -4,6 +4,8 @@
# https://k2-fsa.github.io/sherpa/onnx/pretrained_models/online-transducer/zipformer-transducer-models.html#csukuangfj-sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20-bilingual-chinese-english
# to download the model files
#
set
-ex
export
LD_LIBRARY_PATH
=
$PWD
:
$LD_LIBRARY_PATH
export
DYLD_LIBRARY_PATH
=
$PWD
:
$DYLD_LIBRARY_PATH
...
...
请
注册
或
登录
后发表评论