2015-02-09 72 views
0

我最近一直在嘗試在我的一個項目中使用的弗萊特文本到語音轉換系統(2.0),當我打電話flite_text_to_speech()的程序與此消息退出:弗萊特TTS演示運行失敗

VAL: tried to access lexicon in -1 type val 

我做一個小的測試程序基於所述弗萊特文檔中提供的代碼中發現here

g++ -Wall -g -o flite_test test.cpp -I/usr/local/include/flite -lflite_cmu_us_kal -lflite_usenglish -lflite_cmulex -lflite -lasound -lm 

/* 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; 
} 

這與完全編譯

然而,當我運行./flite-test,我仍然得到了同樣的錯誤:

VAL: tried to access lexicon in -1 type val 

這是弗萊特的錯誤還是我在這裏做一些愚蠢的事情?我知道Flite 2.0相對年輕,所以我正在考慮使用舊版本,但我寧願使用最新版本。我的測試代碼是否適用於任何人?如果是這樣,我應該做什麼改變?

更新:我只是用Flite 1.4試了這個,發生了同樣的事情。

回答

0

我研究了flite實用程序的源代碼,我能夠通過在flite_main.c中的主要函數中大量複製來解決我的問題。