【发布时间】:2015-02-09 06:07:05
【问题描述】:
我最近尝试在我的一个项目中使用 Flite 文本转语音系统 (2.0),当我调用 flite_text_to_speech() 时,程序退出并显示以下消息:
VAL: tried to access lexicon in -1 type val
我根据here找到的Flite文档中提供的代码做了一个小测试程序:
/* 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 中的错误还是我在这里做了一些愚蠢的事情?我知道 Flite 2.0 相对年轻,所以我正在考虑使用旧版本,但我更愿意使用最新版本。我的测试代码是否适用于任何人,如果适用,我应该做些什么不同的事情?
更新:我刚刚用 Flite 1.4 尝试了这个,同样的事情发生了。
【问题讨论】: