我最近一直在尝试在我的一个项目中使用Flite text- to -speech system (2.0),当我调用flite_text_to_speech()时,程序退出时会显示以下消息:
VAL: tried to access lexicon in -1 type val我根据Flite文档中提供的代码做了一个小测试程序,找到了here
/* File: test.cpp */
#include <flite.h>
int main(int argc, char **argv)
{
cst_voice *v;
flite_init();
v = new_voice();
flite_text_to_speech("This is a test",v,"play");
return 0;
}这将使用以下命令进行干净的编译:
g++ -Wall -g -o flite_test test.cpp -I/usr/local/include/flite -lflite_cmu_us_kal -lflite_usenglish -lflite_cmulex -lflite -lasound -lm但是,当我运行./flite-test时,我仍然得到相同的错误:
VAL: tried to access lexicon in -1 type val这是Flite中的一个bug,还是我在这里做了什么愚蠢的事情?我知道Flite 2.0相对年轻,所以我正在考虑使用较老的版本,但我更愿意使用最新的版本。我的测试代码对任何人都有效吗?如果可以,我应该做些什么不同的事情?
更新:我刚刚用Flite 1.4尝试了一下,同样的事情也发生了。
发布于 2015-02-11 06:21:06
我研究了flite实用程序的源代码,通过大量复制它在flite_main.c中的主函数,我能够解决我的问题。
https://stackoverflow.com/questions/28403734
复制相似问题