Problems trying to build PocketSphinxAndroidDemo using NDK

两盒软妹~` 提交于 2019-11-30 10:27:36

Apparently, some of the sources still needed to be marked for ARM compilation. I modified the following section of Android.mk to set cmn.c and lda.c to compile with ARM.

include $(CLEAR_VARS)
LOCAL_C_INCLUDES := $(SPHINX_PATH)/sphinxbase/include/android $(SPHINX_PATH)/sphinxbase/include
LOCAL_CFLAGS += -DHAVE_CONFIG_H
LOCAL_CFLAGS += -DANDROID_NDK

LOCAL_PATH := $(SPHINX_PATH)/sphinxbase/src/libsphinxbase/feat
LOCAL_MODULE := sphinxfeat

LOCAL_SRC_FILES := \
    agc.c \
    cmn.c.arm \
    cmn_prior.c.arm \
    feat.c \
    lda.c.arm

I am still wondering if anyone else had to do this to get their code to compile successfully.

Edit file jni/Android.mk

Change Line 162 :

LOCAL_STATIC_LIBRARIES := sphinxutil sphinxfe sphinxfeat sphinxlm pocketsphinx

to :

LOCAL_STATIC_LIBRARIES := pocketsphinx sphinxlm sphinxfeat sphinxfe sphinxutil
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!