Skip to content Skip to sidebar Skip to footer

Problems Trying To Build Pocketsphinxandroiddemo Using Ndk

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

Solution 1:

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.

Solution 2:

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

Post a Comment for "Problems Trying To Build Pocketsphinxandroiddemo Using Ndk"