-
Notifications
You must be signed in to change notification settings - Fork 295
167 lines (144 loc) · 4.79 KB
/
ksponspeech.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
name: ksponspeech
on:
push:
branches:
- ksponspeech
workflow_dispatch:
jobs:
ksponspeech:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.8]
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: '**/requirements-ci.txt'
- name: Install Python dependencies
run: |
grep -v '^#' ./requirements-ci.txt | xargs -n 1 -L 1 pip install
pip uninstall -y protobuf
pip install --no-binary protobuf protobuf==3.20.*
- name: Cache kaldifeat
id: my-cache
uses: actions/cache@v2
with:
path: |
~/tmp/kaldifeat
key: cache-tmp-${{ matrix.python-version }}-2023-05-22
- name: Install kaldifeat
if: steps.my-cache.outputs.cache-hit != 'true'
shell: bash
run: |
.github/scripts/install-kaldifeat.sh
- name: Test
shell: bash
run: |
export PYTHONPATH=$PWD:$PYTHONPATH
export PYTHONPATH=~/tmp/kaldifeat/kaldifeat/python:$PYTHONPATH
export PYTHONPATH=~/tmp/kaldifeat/build/lib:$PYTHONPATH
.github/scripts/ksponspeech/ASR/run.sh
- name: Show model files (2024-06-24)
shell: bash
run: |
src=/tmp/model-2024-06-24
ls -lh $src
- name: Show model files (2024-06-16)
shell: bash
run: |
src=/tmp/model-2024-06-16
ls -lh $src
- name: Upload model to huggingface (2024-06-24)
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
uses: nick-fields/retry@v3
with:
max_attempts: 20
timeout_seconds: 200
shell: bash
command: |
src=/tmp/model-2024-06-24
git config --global user.email "[email protected]"
git config --global user.name "Fangjun Kuang"
rm -rf hf
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/k2-fsa/sherpa-onnx-zipformer-korean-2024-06-24 hf
cd hf
git fetch
git pull
git merge -m "merge remote" --ff origin main
cp -av $src/* ./
ls -lh
git lfs track "bpe.model"
git lfs track "*.onnx"
git add .
git status
git commit -m "update models"
git status
git push https://csukuangfj:[email protected]/k2-fsa/sherpa-onnx-zipformer-korean-2024-06-24 main || true
rm -rf hf
- name: Upload model to huggingface (2024-06-16)
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
uses: nick-fields/retry@v3
with:
max_attempts: 20
timeout_seconds: 200
shell: bash
command: |
src=/tmp/model-2024-06-16
git config --global user.email "[email protected]"
git config --global user.name "Fangjun Kuang"
rm -rf hf
export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false
git clone https://huggingface.co/k2-fsa/sherpa-onnx-streaming-zipformer-korean-2024-06-16 hf
cd hf
git fetch
git pull
git merge -m "merge remote" --ff origin main
cp -v $src/* ./
ls -lh
git lfs track "bpe.model"
git lfs track "*.onnx"
cp -av test_wavs $src/
git add .
git status
git commit -m "update models"
git status
git push https://csukuangfj:[email protected]/k2-fsa/sherpa-onnx-streaming-zipformer-korean-2024-06-16 main || true
rm -rf hf
- name: Prepare for release (2024-06-16)
shell: bash
run: |
src=/tmp/model-2024-06-16
d=sherpa-onnx-streaming-zipformer-korean-2024-06-16
mv $src ./$d
tar cjvf ${d}.tar.bz2 $d
ls -lh
- name: Prepare for release (2024-06-24)
shell: bash
run: |
src=/tmp/model-2024-06-24
d=sherpa-onnx-zipformer-korean-2024-06-24
mv $src ./$d
tar cjvf ${d}.tar.bz2 $d
ls -lh
- name: Release exported onnx models
uses: svenstaro/upload-release-action@v2
with:
file_glob: true
overwrite: true
file: sherpa-onnx-*.tar.bz2
repo_name: k2-fsa/sherpa-onnx
repo_token: ${{ secrets.UPLOAD_GH_SHERPA_ONNX_TOKEN }}
tag: asr-models