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

标签 c++ text-to-speech festival

我试图编译来自 here 的示例没有运气。

这是我使用的命令

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

关于c++ - 编译节日 TTS C/C++ 示例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6915115/

相关文章:

android - 同时进行语音转文本和文本转语音

python - 如何在生成样本时阻止 Azure TTS 播放音频?

text-to-speech - 哪里可以下载Festival TTS语音

c++ - MingW32 编译节

c++ - "a list of vectors of ints"- 这可能吗?

c# - C++ 和 C# 原始数据类型之间有什么区别?

c++ std::enable_if 约束变体和问题

ios - Swift - 如何将保存的音频文件对话转换为文本?

text-to-speech - 供个人使用的高质量文本转语音引擎

c++ - 链接两个供应商提供的库时双重删除静态变量