Problems trying to build PocketSphinxAndroidDemo using NDK

后端 未结 2 1044
别跟我提以往
别跟我提以往 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.

    0 讨论(0)
  • 2021-01-01 04:42

    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
    
    0 讨论(0)
提交回复
热议问题