Problems trying to build PocketSphinxAndroidDemo using NDK

后端 未结 2 1066
别跟我提以往
别跟我提以往 2021-01-01 04:10

I am trying to compile PocketSphinxAndroidDemo, which provides an example implementation of the CMU pocketsphinx speech recognizer on Android. I first received an error simi

2条回答
  •  时光取名叫无心
    2021-01-01 04:38

    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.

提交回复
热议问题