目的:使用到MFA来做语音文本对齐。
官网:官网网址https://montreal-forced-aligner.readthedocs.io/en/latest/
安装:(环境WIN10,MINICONDA3)
首先确保已经安装MINICONDA3,打开后输入:
conda config --add channels conda-forge
pip install montreal-forced-aligner
步骤一、下载Acoustic models:
由于我们使用的是中文语库,所以下载中文模型:
网址为:Acoustic models — mfa model 2.2.10 documentation (mfa-models.readthedocs.io)
点击后跳转:
mfa model download acoustic mandarin_mfa
下载方式有两个:
一个是在git上下载(Or download from the release page):
另一个是使用命令行:
不过需要安装库:
使用pip install安装出错的库与解决方法,如(请先使用相同方法尝试):
pynini | conda install -c conda-forge pynini |
sox | conda install -c conda-forge sox |
推荐使用github下载(快)。
步骤二、下载dictionary
mfa model download dictionary mandarin_china_mfa
网址:Mandarin (China) MFA dictionary v2.0.0 — mfa model 2.2.10 documentation (mfa-models.readthedocs.io)
=========================================================================================上述安装不成功,无论是在ubuntu22.04虚拟机中,还是在使用中文mandarin的声模型和词库,既不能完成validate也不能完成align。在英文模型和词库中,出现能validate不能完成align。其间也出现安装不方便的各种情况。与是换一个软件测试。=========================================================================
使用speech-aligner(ubuntu22.04桌面版、miniconda)。
speech-aligner需要安装
mkl:
conda install mkl
(mkl默认会随conda一起安装)
atlas:
sudo apt-get install libatlas3-base
kaodi:
运行时,可能出现错误(libstdc++.so.6: version ‘GLIBCXX_3.4.30‘ not found):
最后运行示例成功。
不过要同时输入.wav与对应翻译文件,输出为音素与持续时间-毫秒