Skip to content

Commit dbe7c7e

Browse files
authored
Upload WenetSpeech-Wu u2pp ASR models. (k2-fsa#3125)
1 parent 1a2b05d commit dbe7c7e

4 files changed

Lines changed: 79 additions & 12 deletions

File tree

.github/workflows/upload-models.yaml

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,29 @@ jobs:
4141
git config --global user.email "csukuangfj@gmail.com"
4242
git config --global user.name "Fangjun Kuang"
4343
44+
- name: WenetSpeech Wu
45+
if: true
46+
shell: bash
47+
run: |
48+
git lfs install
49+
git clone https://huggingface.co/csukuangfj2/sherpa-onnx-wenetspeech-wu-u2pp-conformer-ctc-zh-int8-2026-02-03
50+
git clone https://huggingface.co/csukuangfj2/sherpa-onnx-wenetspeech-wu-u2pp-conformer-ctc-zh-2026-02-03
51+
52+
d=sherpa-onnx-wenetspeech-wu-u2pp-conformer-ctc-zh-int8-2026-02-03
53+
rm -rf $d/.git*
54+
55+
tar cjfv $d.tar.bz2 $d
56+
57+
rm -rf $d
58+
59+
d=sherpa-onnx-wenetspeech-wu-u2pp-conformer-ctc-zh-2026-02-03
60+
rm -rf $d/.git*
61+
62+
tar cjfv $d.tar.bz2 $d
63+
rm -rf $d
64+
65+
ls -lh *.tar.bz2
66+
4467
- name: Setup tmate session
4568
if: false
4669
uses: mxschmitt/action-tmate@v3
@@ -172,7 +195,7 @@ jobs:
172195
tar cjvf $d.tar.bz2 $d
173196
174197
- name: Collect funasr-nano with LLM float32
175-
if: true
198+
if: false
176199
shell: bash
177200
run: |
178201
d=sherpa-onnx-funasr-nano-2025-12-30
@@ -804,7 +827,7 @@ jobs:
804827
mv models/* .
805828
806829
- name: Publish to huggingface
807-
if: true
830+
if: false
808831
env:
809832
HF_TOKEN: ${{ secrets.HF_TOKEN }}
810833
uses: nick-fields/retry@v3
@@ -864,16 +887,7 @@ jobs:
864887
command: |
865888
git config --global user.email "csukuangfj@gmail.com"
866889
git config --global user.name "Fangjun Kuang"
867-
models=(
868-
sherpa-onnx-funasr-nano-int8-2025-12-30.tar.bz2
869-
sherpa-onnx-funasr-nano-fp16-2025-12-30.tar.bz2
870-
sherpa-onnx-funasr-nano-2025-12-30.tar.bz2
871-
)
872-
for m in ${models[@]}; do
873-
if [ ! -f $m ]; then
874-
continue;
875-
fi
876-
890+
for m in *.tar.bz2; do
877891
export GIT_LFS_SKIP_SMUDGE=1
878892
export GIT_CLONE_PROTECTION_ACTIVE=false
879893

scripts/apk/generate-vad-asr-apk-script.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,38 @@ def get_models():
790790
791791
ls -lh
792792
793+
popd
794+
""",
795+
),
796+
Model(
797+
model_name="sherpa-onnx-wenetspeech-wu-u2pp-conformer-ctc-zh-int8-2026-02-03",
798+
idx=47,
799+
lang="wu",
800+
lang2="吴语",
801+
short_name="wenetspeech_wu_u2pconformer_ctc_2026_02_03_int8",
802+
cmd="""
803+
pushd $model_name
804+
805+
rm -rfv test_wavs
806+
807+
ls -lh
808+
809+
popd
810+
""",
811+
),
812+
Model(
813+
model_name="sherpa-onnx-wenetspeech-wu-u2pp-conformer-ctc-zh-2026-02-03",
814+
idx=48,
815+
lang="wu",
816+
lang2="吴语",
817+
short_name="wenetspeech_wu_u2pconformer_ctc_2026_02_03",
818+
cmd="""
819+
pushd $model_name
820+
821+
rm -rfv test_wavs
822+
823+
ls -lh
824+
793825
popd
794826
""",
795827
),

sherpa-onnx/csrc/offline-recognizer-ctc-impl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ class OfflineRecognizerCtcImpl : public OfflineRecognizerImpl {
151151
// WeNet CTC models assume input samples are in the range
152152
// [-32768, 32767], so we set normalize_samples to false
153153
config_.feat_config.normalize_samples = false;
154+
config_.feat_config.dither = 1;
154155
}
155156

156157
if (!config_.model_config.medasr.model.empty()) {

sherpa-onnx/kotlin-api/OfflineRecognizer.kt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -779,6 +779,26 @@ fun getOfflineModelConfig(type: Int): OfflineModelConfig? {
779779
)
780780
}
781781

782+
47 -> {
783+
val modelDir = "sherpa-onnx-wenetspeech-wu-u2pp-conformer-ctc-zh-int8-2026-02-03"
784+
return OfflineModelConfig(
785+
wenetCtc = OfflineWenetCtcModelConfig(
786+
model = "$modelDir/model.int8.onnx",
787+
),
788+
tokens = "$modelDir/tokens.txt",
789+
)
790+
}
791+
792+
48 -> {
793+
val modelDir = "sherpa-onnx-wenetspeech-wu-u2pp-conformer-ctc-zh-2026-02-03"
794+
return OfflineModelConfig(
795+
wenetCtc = OfflineWenetCtcModelConfig(
796+
model = "$modelDir/model.onnx",
797+
),
798+
tokens = "$modelDir/tokens.txt",
799+
)
800+
}
801+
782802
9000 -> {
783803
val modelDir =
784804
"sherpa-onnx-qnn-5-seconds-sense-voice-zh-en-ja-ko-yue-2024-07-17-int8-android-aarch64"

0 commit comments

Comments
 (0)