Skip to content

release models

Jackwaterveg edited this page Jul 13, 2022 · 2 revisions

以 aishell 的 conformer 模型为例

1.构建打包的工作目录

cd examples/aishell/asr1
mkdir for_release
cd for_release
ln -s ../utils/generate_infer_yaml.py 
mkdir conf
mkdir data

2.拷贝 conf 文件的内容

cp ../conf/conformer.yaml conf/
cp ../conf/preprocess.yaml conf/
mkdir -p conf/tuning
cp ../conf/tuninig/decode.yaml conf/tuning

3.拷贝 data 文件的内容

cp ../data/mean_std.json data/
cp -r ../data/lang_char data/

4.拷贝模型的参数文件和结果信息

mkdir -p exp/conformer/checkpoints
cp -r ../exp/conformer/checkpoints/avg_30* exp/conformer/checkpoints/

5.构建 model.yaml 文件

python generate_infer_yaml.py --cfg_pth conf/conformer.yaml --dcd_pth conf/tuning/decode.yaml --vb_pth data/lang_char/vocab.txt --cmvn_pth data/mean_std.json --save_pth model.yaml --pre_pth conf/preprocess.yaml

6.构建 tar 包

tar czvf asr1_conformer_aishell_ckpt_1.0.1.model.tar.gz model.yaml conf data/ exp/

7.上传

8.测试 cli