来自github的Pocketsphinx安装包含一个名为livedemo.c的文件,用于gstreamer插件测试,我最终设法使用
进行了编译gcc livedemo.c -o livedemo.out $(pkg-config --cflags --libs gstreamer-1.0)
但是当我尝试使用它启动时
./livedemo.out anyfile.raw
我得到一个输出,最后几行:
Running...
Error: Failed to initialize PocketSphinx
Returned, stopping playback
Deleting pipeline
我想知道问题是什么,因为这是来自Pocketsphinx安装的代码。顺便说一句,livedemo.py正在运行。我究竟做错了什么?也许音频文件的格式有误(但是我尝试了很多不同的方法),能否为我提供适合您的音频文件以便我检查?
更正文件名时,在gdb中得到以下输出:
Thread 2 "file-source:src" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x73eb2470 (LWP 1310)]
0x768b4878 in ps_get_hyp (ps=0x19cd50, out_best_score=0x73eb1bf0,
out_best_score@entry=0x73eb1be8) at pocketsphinx.c:1231
1231 hyp = ps_search_hyp(ps->search, out_best_score);