vi 例子.c
#include<stdio.h>
#include "flite.h"
register_cmu_us_kal();
int main(int argc,char** argv)
{
cst_voice *v;
if(argc!=2)
{
fprintf(stderr,"usage:file_test FILE\n");
exit(-1);
}
flite_init();
v=register_cmu_us_kal(NULL);
flite_file_to_speech(argv[1],v,"play");
return 0;
}
编译:桌面:
~/flite-1.4-release$ gcc example.c -I./include/ -L./build/i386-linux-gnu/lib -lflite -lflite_cmu_us_kal -lflite_cmulex -lflite_usenglish -lflite_cmu_us_rms -lflite_cmu_time_awb -lflite_cmu_us_slt -lflite_cmu_us_awb -lm -o example
example.c:3: warning: data definition has no type or storage class
example.c: In function ‘main’:
example.c:13: warning: assignment makes pointer from integer without a cast
我已经探索了下面的 lib 文件夹的内容。
桌面:
~/flite-1.4-release$ ls
ACKNOWLEDGEMENTS config.guess configure example flite.sln lang mkinstalldirs src wince
bin config.log configure.in example.c -I main palm testsuite windows
build config.status COPYING Exports.def include Makefile README test.txt
config config.sub doc fliteDll.vcproj install-sh missing sapi tools
桌面:
~/flite-1.4-release/build/i386-linux-gnu/lib$ ls
libflite.a libflite_cmu_us_awb.shared.a libflite_cmu_us_kal.so.1 libflite.shared.a
libflite_cmulex.a libflite_cmu_us_awb.so libflite_cmu_us_kal.so.1.4 libflite.so
libflite_cmulex.shared.a libflite_cmu_us_awb.so.1 libflite_cmu_us_rms.a libflite.so.1
libflite_cmulex.so libflite_cmu_us_awb.so.1.4 libflite_cmu_us_rms.shared.a libflite.so.1.4
libflite_cmulex.so.1 libflite_cmu_us_kal16.a libflite_cmu_us_rms.so libflite_usenglish.a
libflite_cmulex.so.1.4 libflite_cmu_us_kal16.shared.a libflite_cmu_us_rms.so.1 libflite_usenglish.shared.a
libflite_cmu_time_awb.a libflite_cmu_us_kal16.so libflite_cmu_us_rms.so.1.4 libflite_usenglish.so
libflite_cmu_time_awb.shared.a libflite_cmu_us_kal16.so.1 libflite_cmu_us_slt.a libflite_usenglish.so.1
libflite_cmu_time_awb.so libflite_cmu_us_kal16.so.1.4 libflite_cmu_us_slt.shared.a libflite_usenglish.so.1.4
libflite_cmu_time_awb.so.1 libflite_cmu_us_kal.a libflite_cmu_us_slt.so
libflite_cmu_time_awb.so.1.4 libflite_cmu_us_kal.shared.a libflite_cmu_us_slt.so.1
libflite_cmu_us_awb.a libflite_cmu_us_kal.so libflite_cmu_us_slt.so.1.4
请帮我解决这个问题。