k2-fsa / snowfall

Moved to https://github.com/k2-fsa/icefall
Apache License 2.0
143 stars 42 forks source link

Can not find $SNOWFALL_ROOT/tools/env.sh #89

Open wangkaisine opened 3 years ago

wangkaisine commented 3 years ago

egs/aishell/asr/simple_v1/path.sh I see that I need to set up the PATH environment where the script will run. But I can't find 'env.sh' in master branch at the location : $SNOWFALL_ROOT/tools/ ?

csukuangfj commented 3 years ago

https://github.com/k2-fsa/snowfall/blob/2e679045be6fc251e9fbb5fff614a5e35104136f/egs/aishell/asr/simple_v1/path.sh#L1-L3

You can see that it is optional. Are there any errors when you execute run.sh?

wangkaisine commented 3 years ago

https://github.com/k2-fsa/snowfall/blob/2e679045be6fc251e9fbb5fff614a5e35104136f/egs/aishell/asr/simple_v1/path.sh#L1-L3

You can see that it is optional. Are there any errors when you execute run.sh?

Preparing data/local/train transcriptions local2/aishell_data_prep.sh: AISHELL data preparation succeeded local2/aishell_prepare_dict.sh: AISHELL dict preparation succeeded local/prepare_lang.sh --position-dependent-phones false data/local/dict_nosp data/local/lang_tmp_nosp data/lang_nosp To load L: Lfst = k2.Fsa.from_openfst(<string of data/lang_nosp/L.fst.txt>, acceptor=False) local2/aishell_train_lms.sh: train_lm.sh is not found. That might mean it's not installed local2/aishell_train_lms.sh: or it is not added to PATH local2/aishell_train_lms.sh: Use the script tools/extras/install_kaldi_lm.sh to install it

Actually my Kaldilm is installed. Btw, Error message 'tools/extras/install_kaldi_lm.sh' should be 'tools/install_kaldi_lm.sh'.

csukuangfj commented 3 years ago

Here is the script for installing kaldi_lm: https://github.com/kaldi-asr/kaldi/blob/master/tools/extras/install_kaldi_lm.sh

It is used to build the LM model.

csukuangfj commented 3 years ago

Actually my Kaldilm is installed.

How did you install it?

wangkaisine commented 3 years ago

Actually my Kaldilm is installed.

How did you install it?

The installation requirements of kaldilm are given in this file: $SNOWFALL_ROOT/requirements.txt. So I successfully installed it by : pip install -r requirements.txt

csukuangfj commented 3 years ago
cd /some/path
git clone https://github.com/danpovey/kaldi_lm.git
cd kaldi_lm
make -j
export PATH=/some/path/kaldi_lm:$PATH

should solve your problem for the AIShell recipe.


The kaldilm in the requirements.txt is for loading a pre-built LM, whereas kaldi_lm is for generating an LM from some transcripts.

kaldilm is different from kaldi_lm; sorry for the confusion.

kaldilm is used only in the librispeech recipe.

wangkaisine commented 3 years ago
cd /some/path
git clone https://github.com/danpovey/kaldi_lm.git
cd kaldi_lm
make -j
export PATH=/some/path/kaldi_lm:$PATH

should solve your problem for the AIShell recipe.

The kaldilm in the requirements.txt is for loading a pre-built LM, whereas kaldi_lm is for generating an LM from some transcripts.

kaldilm is different from kaldi_lm; sorry for the confusion.

kaldilm is used only in the librispeech recipe.

OK, I did confuse kaldilm with kaldi_lm. Now the Aishell script is running properly compiled according to what you said. Thanks!