开发者

Compiling festival TTS C/C++ example

I tried to compile the example from here with no luck.

This is the command that i used

g++ festival_test.cpp -Ifestival/src/include/ -Ispeech_tools/include/ -Lfestival/src/lib/ -Lspeech_tools/lib/ -lFestival -lestools -leststring -lestbase

and the errors i get

festival/src/lib//libFestival.a(HTS_audio.o):HTS_audio.c:(.text+0xcf): undefined
 reference to `_waveOutWrite@12'
festival/src/lib//libFestival.a(HTS_audio.o):HTS_audio.c:(.text+0x19c): undefine
d reference to `_wav开发者_如何学运维eOutReset@4'
festival/src/lib//libFestival.a(HTS_audio.o):HTS_audio.c:(.text+0x1c0): undefine
d reference to `_waveOutUnprepareHeader@12'
festival/src/lib//libFestival.a(HTS_audio.o):HTS_audio.c:(.text+0x1e4): undefine
d reference to `_waveOutUnprepareHeader@12'
festival/src/lib//libFestival.a(HTS_audio.o):HTS_audio.c:(.text+0x1f5): undefine
d reference to `_waveOutClose@4'
festival/src/lib//libFestival.a(HTS_audio.o):HTS_audio.c:(.text+0x364): undefine
d reference to `_waveOutOpen@24'
festival/src/lib//libFestival.a(HTS_audio.o):HTS_audio.c:(.text+0x3bd): undefine
d reference to `_waveOutPrepareHeader@12'
festival/src/lib//libFestival.a(HTS_audio.o):HTS_audio.c:(.text+0x40f): undefine
d reference to `_waveOutPrepareHeader@12'
speech_tools/lib//libestools.a(editline.o):editline.c:(.text+0x6117): undefined
reference to `_tgetent'
speech_tools/lib//libestools.a(editline.o):editline.c:(.text+0x6137): undefined
reference to `_tgetstr'
speech_tools/lib//libestools.a(editline.o):editline.c:(.text+0x614c): undefined
reference to `_tgetstr'
speech_tools/lib//libestools.a(editline.o):editline.c:(.text+0x6161): undefined
reference to `_tgetstr'
speech_tools/lib//libestools.a(editline.o):editline.c:(.text+0x6176): undefined
reference to `_tgetstr'
speech_tools/lib//libestools.a(editline.o):editline.c:(.text+0x620b): undefined
reference to `_tgetstr'
speech_tools/lib//libestools.a(editline.o):editline.c:(.text+0x6232): undefined
reference to `_tgetnum'
speech_tools/lib//libestools.a(editline.o):editline.c:(.text+0x6243): undefined
reference to `_tgetnum'
speech_tools/lib//libestools.a(editline.o):editline.c:(.text+0x6391): undefined
reference to `_tgetstr'
speech_tools/lib//libestbase.a(win32audio.o):win32audio.cc:(.text+0xd3): undefin
ed reference to `_PlaySoundA@12'
collect2: ld returned 1 exit status

I think i have to add something for audio and i don't know what.

I am using cygwin if this makes a difference.


Finally i got it working. I've added -lwinmm -lncurses and it compiles with no errors.

g++ festival_test.cpp -Ifestival/src/include/ -Ispeech_tools/include/ -Lfestival/src/lib/ -Lspeech_tools/lib/ -lFestival -lestools -leststring -lestbase -lwinmm -lncurses
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜