下载:
https://github.com/MontrealCorpusTools/Montreal-Forced-Aligner/releases/tag/v1.0.1
然后,解压tar -zxvf montreal-forced-aligner_linux.tar.gz
然后,把./montreal-forced-aligner/lib/libpython3.6m.so.1.0
这个文件复制一个并改名libpython3.6m.so
用官网说的什么conda create的坑太多了,直接用安装包
使用:
./montreal-forced-aligner/bin/mfa_align corpus_dir dict_path acoustic_model output_dir
./montreal-forced-aligner/bin/mfa_align ./data ./lexicon/librispeech-lexicon.txt english ./textgrid
或者
./montreal-forced-aligner/bin/mfa_train_and_align corpus_dir dict_path output_dir
./montreal-forced-aligner/bin/mfa_train_and_align ./data ./lexicon/pinyin-lexicon-r.txt ./textgrid
-
corpus_dir
- 里面放着一堆xx.wav和xx.lab
-
dict_path
-
acoustic_model
- 在这下载:https://montreal-forced-aligner.readthedocs.io/en/latest/pretrained_models.html
./montreal-forced-aligner/bin/mfa_align ./data ./lexicon/pinyin-lexicon.txt mandarin.zip ./textgrid
-
output_dir
https://montreal-forced-aligner.readthedocs.io/en/latest/index.html