#!/bin/bash
# Copyright (c) 2018, Johns Hopkins University (Jan "Yenda" Trmal<jtrmal@gmail.com>)
# License: Apache 2.0
# Begin configuration section.
# End configuration section
. ./utils/parse_options.sh
. ./path.sh
set -e -o pipefail
set -o nounset # Treat unset variables as an error
# The parts of the output of this that will be needed are
# [in data/local/dict/ ]
# lexicon.txt
# extra_questions.txt
# nonsilence_phones.txt
# optional_silence.txt
# silence_phones.txt
# check existing directories
[ $# != 0 ] && echo "Usage: $0" && exit 1;
dir=data/local/dict
mkdir -p $dir
## 此处是获得CMU词典包
echo "$0: Getting CMU dictionary"
if [ ! -f $dir/cmudict.done ]; then
[ -d $dir/cmudict ] && rm -rf $dir/cmudict
svn co https://svn.code.sf.net/p/cmusphinx/code/trunk/cmudict $dir/cmudict
touch $dir/cmudict.done
fi
##静音音素
# silence phones, one per li
kaldi的prepare_dict.sh解读
最新推荐文章于 2021-02-03 12:41:02 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)