gpt4 book ai didi

android - 使用 pocketsphinx_wrap.c 为 Android 构建 PocketSphinx 演示项目时出错

转载 作者:行者123 更新时间:2023-11-29 22:26:27 25 4
gpt4 key购买 nike

我已经下载了这 3 个项目:PocketSphinxAndroidDemo口袋狮身人面像狮身人面像

我已经更新了 C:\android-ndk-r5b\samples\PocketSphinxAndroidDemo\jni\Android.mk 文件第 006 行:SPHINX_PATH :=/home/eliana/android-ndk-r5b/samples

但在那一刻,我尝试运行 ndk-build 创建 libpocketsphinx_jni.so 文件:/home/eliana/android-ndk-r5b/ndk-build V=1 NDK_LOG=1,pocketsphinx_wrap 出现以下错误.c 特别是:

/home/eliana/android-ndk-r5b/samples/PocketSphinxAndroidDemo/jni/pocketsphinx_wrap.c:757:26: error: pocketsphinx.h: No such file or directory
/home/eliana/android-ndk-r5b/samples/PocketSphinxAndroidDemo/jni/pocketsphinx_wrap.c:758:28: error: sphinxbase/err.h: No such file or directory
/home/eliana/android-ndk-r5b/samples/PocketSphinxAndroidDemo/jni/pocketsphinx_wrap.c: In function 'new_Hypothesis':
/home/eliana/android-ndk-r5b/samples/PocketSphinxAndroidDemo/jni/pocketsphinx_wrap.c:777: warning: initialization makes pointer from integer without a cast
/home/eliana/android-ndk-r5b/samples/PocketSphinxAndroidDemo/jni/pocketsphinx_wrap.c:779: warning: assignment makes pointer from integer without a cast
/home/eliana/android-ndk-r5b/samples/PocketSphinxAndroidDemo/jni/pocketsphinx_wrap.c:781: warning: assignment makes pointer from integer without a cast
/home/eliana/android-ndk-r5b/samples/PocketSphinxAndroidDemo/jni/pocketsphinx_wrap.c: In function 'new_Config__SWIG_0':
/home/eliana/android-ndk-r5b/samples/PocketSphinxAndroidDemo/jni/pocketsphinx_wrap.c:792: error: 'FALSE' undeclared (first use in this function)
/home/eliana/android-ndk-r5b/samples/PocketSphinxAndroidDemo/jni/pocketsphinx_wrap.c:792: error: (Each undeclared identifier is reported only once
/home/eliana/android-ndk-r5b/samples/PocketSphinxAndroidDemo/jni/pocketsphinx_wrap.c:792: error: for each function it appears in.)
/home/eliana/android-ndk-r5b/samples/PocketSphinxAndroidDemo/jni/pocketsphinx_wrap.c: In function 'new_Config__SWIG_1':
/home/eliana/android-ndk-r5b/samples/PocketSphinxAndroidDemo/jni/pocketsphinx_wrap.c:796: error: 'FALSE' undeclared (first use in this function)
/home/eliana/android-ndk-r5b/samples/PocketSphinxAndroidDemo/jni/pocketsphinx_wrap.c: In function 'Config_getString':
/home/eliana/android-ndk-r5b/samples/PocketSphinxAndroidDemo/jni/pocketsphinx_wrap.c:827: warning: return makes pointer from integer without a cast
/home/eliana/android-ndk-r5b/samples/PocketSphinxAndroidDemo/jni/pocketsphinx_wrap.c: In function 'new_Decoder__SWIG_0':
/home/eliana/android-ndk-r5b/samples/PocketSphinxAndroidDemo/jni/pocketsphinx_wrap.c:836: error: 'FALSE' undeclared (first use in this function)
/home/eliana/android-ndk-r5b/samples/PocketSphinxAndroidDemo/jni/pocketsphinx_wrap.c: In function 'new_Decoder__SWIG_1':
/home/eliana/android-ndk-r5b/samples/PocketSphinxAndroidDemo/jni/pocketsphinx_wrap.c:840: warning: initialization makes pointer from integer without a cast
/home/eliana/android-ndk-r5b/samples/PocketSphinxAndroidDemo/jni/pocketsphinx_wrap.c: In function 'Decoder_getConfig':
/home/eliana/android-ndk-r5b/samples/PocketSphinxAndroidDemo/jni/pocketsphinx_wrap.c:844: warning: return makes pointer from integer without a cast
/home/eliana/android-ndk-r5b/samples/PocketSphinxAndroidDemo/jni/pocketsphinx_wrap.c: In function 'Decoder_getUttid':
/home/eliana/android-ndk-r5b/samples/PocketSphinxAndroidDemo/jni/pocketsphinx_wrap.c:853: warning: return makes pointer from integer without a cast
/home/eliana/android-ndk-r5b/samples/PocketSphinxAndroidDemo/jni/pocketsphinx_wrap.c: In function 'Decoder_getHyp':
/home/eliana/android-ndk-r5b/samples/PocketSphinxAndroidDemo/jni/pocketsphinx_wrap.c:866: error: 'int32' undeclared (first use in this function)
/home/eliana/android-ndk-r5b/samples/PocketSphinxAndroidDemo/jni/pocketsphinx_wrap.c:866: error: expected ';' before 'best_score'
/home/eliana/android-ndk-r5b/samples/PocketSphinxAndroidDemo/jni/pocketsphinx_wrap.c:867: error: 'best_score' undeclared (first use in this function)
/home/eliana/android-ndk-r5b/samples/PocketSphinxAndroidDemo/jni/pocketsphinx_wrap.c: In function 'Java_edu_cmu_pocketsphinx_pocketsphinxJNI_Decoder_1processRaw_1_1SWIG_10':
/home/eliana/android-ndk-r5b/samples/PocketSphinxAndroidDemo/jni/pocketsphinx_wrap.c:1435: warning: assignment discards qualifiers from pointer target type
make: *** [/home/eliana/android-ndk-r5b/samples/PocketSphinxAndroidDemo/obj/local/armeabi/objs-debug/pocketsphinx_jni/pocketsphinx_wrap.o] Error 1

感谢任何帮助,因为在 Android 上试用 PocketSphinx 对我来说非常重要。

谢谢,

最佳答案

尝试将你的 floders 名称 sphinxbase.X.X 和 pocketsphinx.X.X 更改为 sphinxbase 和 pocketsphinx

希望对你有帮助

关于android - 使用 pocketsphinx_wrap.c 为 Android 构建 PocketSphinx 演示项目时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5806816/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com