编译节日TTS C/ c++示例

Compiling festival TTS C/C++ example

本文关键字:c++ 示例 TTS 编译      更新时间:2023-10-16

我试着从这里编译这个例子,但没有成功。

这是我使用的命令

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

和我得到的错误

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 `_waveOutReset@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

我想我必须为音频添加一些东西,我不知道是什么。

我使用cygwin,如果这是不同的

终于修好了。我已经添加了-lwinmm -lncurses,它编译没有错误。

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