三:以上Festival安装完成以后回到ekho安装目录:

执行./configure --enable-festival 前

更改configure

1:替换

#AC_DEFINE(ENABLE_FESTIVAL,,[Enable Festival])

#LIB_FESTIVAL="${srcdir}/lib/libFestival.a ${srcdir}/lib/libestools.a ${srcdir}/lib/libestbase.a ${srcdir}/lib/libeststring.a -lncurses"

#           CFLAG_FESTIVAL="-I${srcdir}/include/festival -I${srcdir}/include/speech_tools"

else

{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5

$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}

as_fn_error $? "ncurses test failed

See \`config.log' for more details" "$LINENO" 5; }

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lestools" >&5

$as_echo_n "checking for main in -lestools... " >&6; }

if ${ac_cv_lib_estools_main+:} false; then :

$as_echo_n "(cached) " >&6

else

ac_check_lib_save_LIBS=$LIBS

LIBS="-lestools

$LIBS"

cat confdefs.h - <<_ACEOF >conftest.$ac_ext

/* end confdefs.h.  */

int

main ()

{

return main ();

;

return 0;

}

_ACEOF

if ac_fn_c_try_link "$LINENO"; then :

ac_cv_lib_estools_main=yes

else

ac_cv_lib_estools_main=no

fi

rm -f core conftest.err conftest.$ac_objext \

conftest$ac_exeext conftest.$ac_ext

LIBS=$ac_check_lib_save_LIBS

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_estools_main" >&5

$as_echo "$ac_cv_lib_estools_main" >&6; }

if test "x$ac_cv_lib_estools_main" = xyes; then :

cat >>confdefs.h <<_ACEOF

#define HAVE_LIBESTOOLS 1

_ACEOF

LIBS="-lestools $LIBS"

改为:

$as_echo "#define ENABLE_FESTIVAL /**/" >>confdefs.h

LIB_FESTIVAL="${srcdir}/lib/libFestival.a ${srcdir}/lib/libestools.a ${srcdir}/lib/libestbase.a ${srcdir}/lib/libeststring.a -lncurses"

CFLAG_FESTIVAL="-I${srcdir}/include/festival -I${srcdir}/include/speech_tools"

2:替换

as_fn_error $? "estool test failed

See \`config.log' for more details" "$LINENO" 5; }

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lFestival" >&5

$as_echo_n "checking for main in -lFestival... " >&6; }

if ${ac_cv_lib_Festival_main+:} false; then :

$as_echo_n "(cached) " >&6

else

ac_check_lib_save_LIBS=$LIBS

LIBS="-lFestival

$LIBS"

cat confdefs.h - <<_ACEOF >conftest.$ac_ext

/* end confdefs.h.  */

int

main ()

{

return main ();

;

return 0;

}

_ACEOF

if ac_fn_c_try_link "$LINENO"; then :

ac_cv_lib_Festival_main=yes

else

ac_cv_lib_Festival_main=no

改为:

as_fn_error "ncurses test failed (--disable-festival to disable)

See \`config.log' for more details." "$LINENO" 5; }

3去掉:

rm -f core conftest.err conftest.$ac_objext \

conftest$ac_exeext conftest.$ac_ext

LIBS=$ac_check_lib_save_LIBS

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Festival_main" >&5

$as_echo "$ac_cv_lib_Festival_main" >&6; }

if test "x$ac_cv_lib_Festival_main" = xyes; then :

$as_echo "#define ENABLE_FESTIVAL /**/" >>confdefs.h

LIB_FESTIVAL="-lFestival -lestbase -lestools -leststring -lncurses"

CFLAG_FESTIVAL="-I/usr/include/festival -I/usr/include/speech_tools"

else

$as_echo "#define ENABLE_FESTIVAL /**/" >>confdefs.h

LIB_FESTIVAL="${srcdir}/lib/libFestival.a ${srcdir}/lib/libestools.a ${srcdir}/lib/libestbase.a ${srcdir}/lib/libeststring.a -lncurses"

CFLAG_FESTIVAL="-I${srcdir}/include -I${srcdir}/include/festival -I${srcdir}/include/speech_tools"

else

LIB_FESTIVAL=""

CFLAG_FESTIVAL=""

Fi

4:添加:

else

with_mp3lame=no

fi

后添加

LIBS="-lasound $LIBS"

5以上更改以后:

在ekho安装目录下:

执行make

出现以下错误:

src/libekho.cpp:58:31: 错误:festival/festival.h:没有那个文件或目录

src/libekho.cpp: In member function ‘int ekho::Ekho::initFestival()’:

src/libekho.cpp:252: 错误:‘festival_initialize’ 在此作用域中尚未声明

src/libekho.cpp:257: 错误:‘strintern’ 在此作用域中尚未声明

src/libekho.cpp:257: 错误:‘siod_set_lval’ 在此作用域中尚未声明

src/libekho.cpp:261: 错误:‘festival_load_file’ 在此作用域中尚未声明

src/libekho.cpp:269: 错误:‘festival_tidy_up’ 在此作用域中尚未声明

src/libekho.cpp: In member function ‘int ekho::Ekho::writeToSonicStream(short int*, int, bool, bool)’:

src/libekho.cpp:752: 警告:当转换到 ‘short int’ (从 ‘double’)时

src/libekho.cpp:762: 警告:当转换到 ‘int’ (从 ‘float’)时

src/libekho.cpp: In member function ‘const char* ekho::Ekho::getPcmFromFestival(std::string, int&)’:

src/libekho.cpp:1203: 错误:‘festival_eval_command’ 在此作用域中尚未声明

src/libekho.cpp:1218: 错误:‘EST_Wave’ 在此作用域中尚未声明

src/libekho.cpp:1218: 错误:expected `;' before ‘wave’

src/libekho.cpp:1219: 错误:‘wave’ 在此作用域中尚未声明

src/libekho.cpp:1219: 错误:‘festival_text_to_wave’ 在此作用域中尚未声明

src/libekho.cpp:1225: 错误:‘EST_TVector’ 在此作用域中尚未声明

src/libekho.cpp:1225: 错误:expected primary-expression before ‘short’

src/libekho.cpp:1225: 错误:expected `;' before ‘short’

src/libekho.cpp:1226: 错误:‘tvector’ 在此作用域中尚未声明

make[1]: *** [src/libekho_a-libekho.o] 错误 1

make[1]: Leaving directory `/home/new_uucc_soft/ekho-6.0'

make: *** [all] 错误 2

解决方法:

用命令:mkdir /usr/include/festival

cd /usr/include/festival

拷贝festival.h  fngram.h  intonation.h  lexicon.h  Makefile  ModuleDescription.h  modules.h  module_support.h  Phone.h  text.h

到festival文件夹下

6.回到ekho安装目录下:

执行make:

出现:

g++: ./lib/libFestival.a: No such file or directory

g++: ./lib/libestools.a: No such file or directory

g++: ./lib/libestbase.a: No such file or directory

g++: ./lib/libeststring.a: No such file or directory

make[1]: *** [test_ekho] 错误 1

解决办法:

在ekho安装目录下执行:

cp lib32  lib

在festival和speech_tools的安装目录下面将.a文件

/festival/src/lib/中的libFestival.a拷贝到ekho安装目录下的lib中并覆盖

/speech_tools/lib/中的libestools.a libestbase.a libeststring.a拷贝到ekho安装目录下的lib中并覆盖

最后,执行make && make install ,安装完成

CentOS 5下freeswitch中集成使用ekho实现TTS功能二的更多相关文章

  1. CentOS 5下freeswitch中集成使用ekho实现TTS功能三

    四:在freeswitch中调用ekho 注:在测试过程中该语音包好像没用 FreeSWITCH 中文语音包测试版fssounds.zip 在/usr/local/freeswitch/sounds/ ...

  2. freeswitch中集成使用ekho实现TTS功能一

    Linux下安装freeswitch并集成ekho实现TTS 1. linux下安装freeswitch就不多介绍了,具体链接网址: http://www.8000hz.com/archives/14 ...

  3. AngularJS进阶(十九)在AngularJS应用中集成百度地图实现定位功能

    在AngularJS应用中集成百度地图实现定位功能 注:请点击此处进行充电! 前言 根据项目需求,需要实现手机定位功能,考虑到百度业务的强大能力,遂决定使用百度地图第三方服务. 添加第三方模块的步骤与 ...

  4. 记录下项目中常用到的JavaScript/JQuery代码二(大量实例)

    记录下项目中常用到的JavaScript/JQuery代码一(大量实例) 1.input输入框监听变化 <input type="text" style="widt ...

  5. 实战MySQL集群,试用CentOS 6下的MariaDB-Galera集成版

    说起mysql的集群估计很多人会首先想起mysql自带的replication或者mysql-mmm.mysql-mmm其实也是基于mysql自带的replication的,不过封装的更好用一些,但是 ...

  6. windows下openresty中使用lua做接口转发、二次封装等

    需求:根据客户需求,可以在ngx下 通过lua做接口二次封装再次转发给用户或第三方 场景:对返回值有要求的.接口屏蔽字段.或做一些业务上的验证等 1.windows直接下载openresty 解压即可 ...

  7. 现有项目中集成Flutter

    本文列举了项目开发使用Flutter会遇到的问题,以及如何使用Flutter module在现有项目中集成Flutter,并对其原理进行了分析. 最近在做的一个商业项目,完全的使用Flutter编写的 ...

  8. 怎么在我们的App中集成条码扫描功能?

    现在很多App都有条码扫描功能,有的手机比如某米在照相机中集成了条码扫描功能,但是还有一部分手机没有这样的集成,比如韩国某星,需要自己下载一个条码扫描App.今天我们就来看看怎么在自己的App中集成一 ...

  9. windows下VMware-workstation中安装CentOS

    windows下VMware-workstation中安装CentOS,可以分两部分,安装虚拟机和安装CentOS虚拟机.具体步骤如下: 一.安装虚拟机 1.安装VMware-workstation, ...

随机推荐

  1. 如何使用 TP中的公共函数 (定义在common/common.php中的函数)

    如何使用 TP中的公共函数 (定义在common/common.php中的函数) (2011-09-30 15:32:09) 转载▼ 标签: 杂谈   1.在common/common.php 中有个 ...

  2. 【转】Web前端开发:为何选择MVVM而非MVC

    在Web中充斥着所谓的MVC框架,而在我看来,因为一些关键性的技术原因,MVC在Web前端开发中根本无法使用(对的,是无法,而不是不该) 在Web中充斥着所谓的MVC框架,而在我看来,因为一些关键性的 ...

  3. Spring MVC内部资源视图解析器

    InternalResourceViewResolver用于将提供的URI解析为实际URI.下面的示例演示如何在Spring Web MVC框架中使用SpringResultViewResolver. ...

  4. fabric 自动化部署

    fabric 项目发布和运维的工作相当机械,频率还蛮高,导致时间浪费在敲大量重复的命令上. 修复bug什么的,测试,提交版本库(2分钟),ssh到测试环境pull部署(2分钟),rsync到线上机器A ...

  5. WPF 后台任务 等待动画 样例 && C# BackgroundWorker 详解

    运行效果: 前台代码: <Window x :Class="Waiting.Window1" xmlns="http://schemas.microsoft.com ...

  6. asp.net C#实现下载文件的六种方法实例

    protected void Button1_Click(object sender, EventArgs e)  {  /*  微软为Response对象提供了一个新的方法TransmitFile来 ...

  7. 【BZOJ5056】OI游戏 最短路+有向图生成树计数

    [BZOJ5056]OI游戏 Description 小Van的CP最喜欢玩与OI有关的游戏啦~小Van为了讨好她,于是冥思苦想,终于创造了一个新游戏. 下面是小Van的OI游戏规则: 给定一个无向连 ...

  8. 【BZOJ2794】[Poi2012]Cloakroom 离线+背包

    [BZOJ2794][Poi2012]Cloakroom Description 有n件物品,每件物品有三个属性a[i], b[i], c[i] (a[i]<b[i]).再给出q个询问,每个询问 ...

  9. D - Find a way

    D - Find a way Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Desc ...

  10. Javascript-Switch

    JavaScript Switch 语句 请使用 switch 语句来选择要执行的多个代码块之一. 语法 switch(n) { case 1: 执行代码块 1 break; case 2: 执行代码 ...