CentOS 5下freeswitch中整合使用ekho實現TTS功能二

來源:互聯網
上載者:User

標籤:

三:以上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功能二

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.