编译节日 TTS C/C++例子

发布于 2024-11-27 16:14:41 字数 2470 浏览 1 评论 0原文

我尝试从 此处编译示例 没有运气。

这是我使用的命令

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。

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 `_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

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

I am using cygwin if this makes a difference.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

眼眸 2024-12-04 16:14:41

最后我让它工作了。我添加了 -lwinmm -lncurses 并且编译时没有错误。

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

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文