Skip to content

Instantly share code, notes, and snippets.

@mzaksana
Last active August 15, 2021 17:28
Show Gist options
  • Save mzaksana/83f673a2e0460f88c671c4f7f94dc0bb to your computer and use it in GitHub Desktop.
Save mzaksana/83f673a2e0460f88c671c4f7f94dc0bb to your computer and use it in GitHub Desktop.
# Script to genarate vosk api model from kaldi exp
# by mzaksana
# Path for model
model_online="/path-user/chain-online"
graph="/path-user/tree/graph"
lang="/path-user/data/lang"
dst="path-kaldi/s5/model"
. ./utils/parse_options.sh
# Make folder
mkdir -p $dst/am $dst/conf $dst/graph $dst/graph/phones $dst/ivector $dst/rescore
# depend on your chain model
cp $model_online/final.mdl $dst/am
cp $model_online/conf/* $dst/conf
cp $model_online/conf/splice.conf $dst/ivector
cp $model_online/ivector_extractor/* $dst/ivector
cp $graph/disambig_tid.int $dst/graph
cp $graph/HCLG.fst $dst/graph
cp $graph/words.txt $dst/graph
cp $graph/phones/word_boundary.int $dst/graph/phones
cp $lang/G.fst $dst/rescore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment