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-08-02 10:21:24 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2024-08-02 10:21:24 +0800
Commit
35c1b4a7a9376c6bb80ac461e1b2169be563f908
35c1b4a7
1 parent
53484fcd
Add ReazonSpeech Japanese pre-trained model (#1203)
显示空白字符变更
内嵌
并排对比
正在显示
5 个修改的文件
包含
92 行增加
和
14 行删除
.github/scripts/test-offline-transducer.sh
.github/workflows/linux.yaml
.github/workflows/macos.yaml
scripts/apk/generate-vad-asr-apk-script.py
sherpa-onnx/kotlin-api/OfflineRecognizer.kt
.github/scripts/test-offline-transducer.sh
查看文件 @
35c1b4a
...
...
@@ -16,6 +16,50 @@ echo "PATH: $PATH"
which
$EXE
log
"------------------------------------------------------------------------"
log
"Run zipformer transducer models (Japanese from ReazonSpeech) "
log
"------------------------------------------------------------------------"
url
=
https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-zipformer-ja-reazonspeech-2024-08-01.tar.bz2
name
=
$(
basename
$url
)
curl -SL -O
$url
tar xvf
$name
rm
$name
repo
=
$(
basename -s .tar.bz2
$name
)
ls -lh
$repo
cat
$repo
/test_wavs/
*
.txt
log
"test
$repo
"
test_wavs
=(
1.wav
2.wav
3.wav
4.wav
5.wav
)
for
w
in
${
test_wavs
[@]
}
;
do
time
$EXE
\
--tokens
=
$repo
/tokens.txt
\
--encoder
=
$repo
/encoder-epoch-99-avg-1.onnx
\
--decoder
=
$repo
/decoder-epoch-99-avg-1.onnx
\
--joiner
=
$repo
/joiner-epoch-99-avg-1.onnx
\
--debug
=
1
\
$repo
/test_wavs/
$w
done
for
w
in
${
test_wavs
[@]
}
;
do
time
$EXE
\
--tokens
=
$repo
/tokens.txt
\
--encoder
=
$repo
/encoder-epoch-99-avg-1.int8.onnx
\
--decoder
=
$repo
/decoder-epoch-99-avg-1.onnx
\
--joiner
=
$repo
/joiner-epoch-99-avg-1.int8.onnx
\
--debug
=
1
\
$repo
/test_wavs/
$w
done
rm -rf
$repo
log
"------------------------------------------------------------------------"
log
"Run Nemo fast conformer hybrid transducer ctc models (transducer branch)"
log
"------------------------------------------------------------------------"
...
...
.github/workflows/linux.yaml
查看文件 @
35c1b4a
...
...
@@ -141,6 +141,17 @@ jobs:
name
:
release-${{ matrix.build_type }}-with-shared-lib-${{ matrix.shared_lib }}-with-tts-${{ matrix.with_tts }}
path
:
install/*
-
name
:
Test offline transducer
shell
:
bash
run
:
|
du -h -d1 .
export PATH=$PWD/build/bin:$PATH
export EXE=sherpa-onnx-offline
.github/scripts/test-offline-transducer.sh
du -h -d1 .
-
name
:
Test offline CTC
shell
:
bash
run
:
|
...
...
@@ -191,16 +202,6 @@ jobs:
.github/scripts/test-online-ctc.sh
du -h -d1 .
-
name
:
Test offline transducer
shell
:
bash
run
:
|
du -h -d1 .
export PATH=$PWD/build/bin:$PATH
export EXE=sherpa-onnx-offline
.github/scripts/test-offline-transducer.sh
du -h -d1 .
-
name
:
Test C API
shell
:
bash
run
:
|
...
...
.github/workflows/macos.yaml
查看文件 @
35c1b4a
...
...
@@ -113,21 +113,22 @@ jobs:
otool -L build/bin/sherpa-onnx
otool -l build/bin/sherpa-onnx
-
name
:
Test offline
CTC
-
name
:
Test offline
transducer
shell
:
bash
run
:
|
export PATH=$PWD/build/bin:$PATH
export EXE=sherpa-onnx-offline
.github/scripts/test-offline-
ctc
.sh
.github/scripts/test-offline-
transducer
.sh
-
name
:
Test offline transducer
-
name
:
Test offline CTC
shell
:
bash
run
:
|
export PATH=$PWD/build/bin:$PATH
export EXE=sherpa-onnx-offline
.github/scripts/test-offline-
transducer
.sh
.github/scripts/test-offline-
ctc
.sh
-
name
:
Test online CTC
shell
:
bash
...
...
scripts/apk/generate-vad-asr-apk-script.py
查看文件 @
35c1b4a
...
...
@@ -278,6 +278,25 @@ def get_models():
popd
"""
,
),
Model
(
model_name
=
"sherpa-onnx-zipformer-ja-reazonspeech-2024-08-01"
,
idx
=
16
,
lang
=
"ja"
,
short_name
=
"zipformer_reazonspeech"
,
cmd
=
"""
pushd $model_name
rm -rfv test_wavs
rm -fv encoder-epoch-99-avg-1.onnx
rm -fv decoder-epoch-99-avg-1.int8.onnx
rm -fv joiner-epoch-99-avg-1.onnx
ls -lh
popd
"""
,
),
]
return
models
...
...
sherpa-onnx/kotlin-api/OfflineRecognizer.kt
查看文件 @
35c1b4a
...
...
@@ -338,6 +338,19 @@ fun getOfflineModelConfig(type: Int): OfflineModelConfig? {
tokens = "$modelDir/tokens.txt",
)
}
16 -> {
val modelDir = "sherpa-onnx-zipformer-ja-reazonspeech-2024-08-01"
return OfflineModelConfig(
transducer = OfflineTransducerModelConfig(
encoder = "$modelDir/encoder-epoch-99-avg-1.int8.onnx",
decoder = "$modelDir/decoder-epoch-99-avg-1.onnx",
joiner = "$modelDir/joiner-epoch-99-avg-1.int8.onnx",
),
tokens = "$modelDir/tokens.txt",
modelType = "transducer",
)
}
}
return null
}
...
...
请
注册
或
登录
后发表评论