Use Ekho in freeswitch in centos 5 to implement TTS function 2

Source: Internet
Author: User
Tags freeswitch

Iii. After festival is installed, return to the Ekho installation directory:

Run./configure -- enable-festival

Change configure

1: replace

# 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"

Changed:

$ 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: replace

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

Changed:

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

See \ 'config. log' For more details. "" $ lineno "5 ;}

3 Remove:

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/festival-I $ {srcdir}/include/speech_tools"

 

 

Else

Lib_festival = ""

Cflag_festival = ""

 

Fi

4: Add:

Else

With_mp3lame = No

Fi

Add later

Libs = "-lasound $ Libs"

5. After the above changes:

In the Ekho installation directory:

Execute make

The following error occurs:

 

Src/libekho. cpp: 58: 31: Error: festival/festival. H: No file or directory

Src/libekho. cpp: In member function 'int Ekho: initfestival ()':

Src/libekho. cpp: 252: Error: 'Festival _ initialize' not declared in this scope

Src/libekho. cpp: 257: Error: 'strintern' not declared in this scope

Src/libekho. cpp: 257: Error: 'siod _ set_lval' not declared in this scope

Src/libekho. cpp: 261: Error: 'Festival _ load_file 'has not been declared in this scope

Src/libekho. cpp: 269: Error: 'Festival _ tidy_up 'has not been declared in this scope

Src/libekho. cpp: In member function 'int Ekho: writetosonicstream (short int *, Int, bool, bool )':

Src/libekho. cpp: 752: Warning: when converting to 'short int' (from 'double ')

Src/libekho. cpp: 762: Warning: when converting to 'int' (from 'float ')

Src/libekho. cpp: In member function 'const char * Ekho: getpcmfromfestival (STD: String, Int &)':

Src/libekho. cpp: 1203: Error: 'Festival _ eval_command 'has not been declared in this scope

Src/libekho. cpp: 1218: Error: 'Est _ wave 'has not been declared in this scope

Src/libekho. cpp: 1218: Error: Expected '; 'before' wave'

Src/libekho. cpp: 1219: Error: 'wave 'has not been declared in this scope

Src/libekho. cpp: 1219: Error: 'Festival _ text_to_wave 'has not been declared in this scope

Src/libekho. cpp: 1225: Error: 'Est _ tvector' has not been declared in this scope

Src/libekho. cpp: 1225: Error: expected primary-expression before 'short'

Src/libekho. cpp: 1225: Error: Expected '; 'before' short'

Src/libekho. cpp: 1226: Error: 'tvector' has not been declared in this scope

Make [1]: *** [src/libekho_a-libekho.o] Error 1

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

Make: *** [all] Error 2

 

Solution:

Run mkdir/usr/include/festival.

CD/usr/include/Festival

Copy festival. h fngram. h intonation. h lexicon. h makefile moduledescription. h modules. h module_support.h phone. h text. h

To the festival folder

6. Go back to the Ekho installation directory:

Run make:

Appears:

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] Error 1

Solution:

Run the following command in the Ekho installation directory:

CP lib32 lib

Under the installation directory of festival and speech_tools, set the. A file

Libfestival. a In/festival/src/lib/is copied to the Lib under the Ekho installation directory and overwritten.

Libestools. A libestbase. A libeststring. A libeststring. a In/speech_tools/lib/is copied to the Lib in the Ekho installation directory and overwritten.

Finally, execute make & make install to complete the installation.

Use Ekho in freeswitch in centos 5 to implement TTS function 2

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.