FreeSWITCH源码安装目录执行mod_flite-install,提示you must install libflite-dev tu build mod_flite
首先编辑/usr/local/src/freeswitch/module.conf,注释掉:asr_tts/mod_flite
此问题为主要是系统已经安装了flite-1.3的版本,需要手动卸载此版本
yum remove -y lite
下载flite-2.1.0版本
git clone https://github.com/festvox/flite.git flite-2.1.0
cd flite-2.1.0
./configure --prefix=/usr/lib64/flite2.1 --enable-shared
#注意一定要加上enable-shared,否则编译不出来动态链接库,后面编译还是会失败. 2.0.0版还要 --enable-fPIC
make && make install
ln -s /usr/lib64/flite2.1/lib/* /usr/lib64/
vi /usr/lib64/pkgconfig/flite.pc
粘贴以下配置
prefix=/usr/lib64/flite2.1
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: flite
Description: a text to speech library
Requires:
Version: 2.1.0
Libs: -L${libdir} -lflite -lflite_cmu_grapheme_lang -lflite_cmu_grapheme_lex -lflite_cmu_indic_lang -lflite_cmu_indic_lex -lflite_cmulex -lflite_cmu_time_awb -lflite_cmu_us_awb -lflite_cmu_us_kal16 -lflite_cmu_us_kal -lflite_cmu_us_rms -lflite_cmu_us_slt -lflite_usenglish
Libs.private: -lm
Cflags: -I${includedir}/flite/
重新编译安装环境
./configure --prefix=/usr/local/freeswitch --disable-multilib --with-lib-subdir=/usr/lib64 > configure.consolelog.txt(执行的时候会有错误信息,但不影响)
进入/usr/local/src/freeswitch。重新编译FreeSWITCH环境。
./configure
make && make install
make mod_flite-install
然后在freeswitch页面执行load mod_flite,加载成功,问题解决了