Share my Android.mk for speex.
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libspeex
LOCAL_CFLAGS = -DFIXED_POINT -DEXPORT=”" -UHAVE_CONFIG_H -I$(LOCAL_PATH)/include
LOCAL_SRC_FILES := \
./libspeex/bits.c \
./libspeex/buffer.c \
./libspeex/cb_search.c \
./libspeex/exc_10_16_table.c \
./libspeex/exc_10_32_table.c \
./libspeex/exc_20_32_table.c \
./libspeex/exc_5_256_table.c \
./libspeex/exc_5_64_table.c \
./libspeex/exc_8_128_table.c \
./libspeex/filterbank.c \
./libspeex/filters.c \
./libspeex/gain_table.c \
./libspeex/gain_table_lbr.c \
./libspeex/hexc_10_32_table.c \
./libspeex/hexc_table.c \
./libspeex/high_lsp_tables.c \
./libspeex/jitter.c \
./libspeex/kiss_fft.c \
./libspeex/kiss_fftr.c \
./libspeex/lpc.c \
./libspeex/lsp.c \
./libspeex/lsp_tables_nb.c \
./libspeex/ltp.c \
./libspeex/mdf.c \
./libspeex/modes.c \
./libspeex/modes_wb.c \
./libspeex/nb_celp.c \
./libspeex/preprocess.c \
./libspeex/quant_lsp.c \
./libspeex/resample.c \
./libspeex/sb_celp.c \
./libspeex/scal.c \
./libspeex/smallft.c \
./libspeex/speex.c \
./libspeex/speex_callbacks.c \
./libspeex/speex_header.c \
./libspeex/stereo.c \
./libspeex/testdenoise.c \
./libspeex/testecho.c \
./libspeex/testenc.c \
./libspeex/testenc_uwb.c \
./libspeex/testenc_wb.c \
./libspeex/testjitter.c \
./libspeex/vbr.c \
./libspeex/vq.c \
./libspeex/window.c
#LOCAL_LDLIBS := -llog
include $(BUILD_STATIC_LIBRARY)
Hi please can you help me. How i can use speex in android? I need stream voice and use speex for this and send it on server. How i can use this mk?
THX
Petr Vytlacil
By: Petr Vytlačil on May 29, 2010
at 11:33 am
http://www.speex.org/docs/manual/speex-manual/node7.html
By: slworkthings on June 1, 2010
at 7:46 am
Can you tell me where to put the speex files?
thx
By: challenge.chen on August 18, 2010
at 5:29 am
Which files?
My file structure is like this:
(1) Downloaded speex source code is in my $android-ndk/sources/speex-1.2rc; there is a Android.mk file in there.
(2) I have $android-ndk/apps/speex-1.2rc dir; and Application.mk file in there.
(3) Once I build my speex-1.2rc, there is a libspeex.a in my $android-ndk/out/apps/speex-1.2rc/android-1.5-arms dir.
(4) Done. I can write JNI code to link against this libspeex.a file.
By: slworkthings on August 18, 2010
at 8:07 am
i do it on your said ,but it doesn’t work,could you tell me detail ,my ndk vision is r5
Could you please describe the process to help me compile it,it takes me two days,but…
By: lanqingzhao on February 11, 2011
at 7:40 pm
i do it on your said ,but it doesn’t work,could you tell me detail ,my ndk vision is r5
By: lanqingzhao on February 11, 2011
at 7:35 pm
I know it ,thx
By: lanqingzhao on February 17, 2011
at 11:30 pm
[...] speex and Android.mk « Coding (tags: android speex speech ndk) [...]
By: links for 2011-06-01 « Softwarebaer on May 31, 2011
at 11:11 pm
Hi, i have problem with compiling my speex, my Android.mk looks like this:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libOgg
LOCAL_CFLAGS = -DFIXED_POINT -DUSE_KISS_FFT -DEXPORT=”” -UHAVE_CONFIG_H
LOCAL_C_INCLUDES := $(LOCAL_PATH)/ogg/include
LOCAL_SRC_FILES := \
./ogg/src/bitwise.c \
./ogg/src/framing.c
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libSpeex
LOCAL_CFLAGS = -DFIXED_POINT -DUSE_KISS_FFT -DEXPORT=”” -UHAVE_CONFIG_H
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_SRC_FILES := \
./libspeex/bits.c \
./libspeex/buffer.c \
./libspeex/cb_search.c \
./libspeex/exc_10_16_table.c \
./libspeex/exc_10_32_table.c \
./libspeex/exc_20_32_table.c \
./libspeex/exc_5_256_table.c \
./libspeex/exc_5_64_table.c \
./libspeex/exc_8_128_table.c \
./libspeex/fftwrap.c \
./libspeex/filterbank.c \
./libspeex/filters.c \
./libspeex/gain_table.c \
./libspeex/gain_table_lbr.c \
./libspeex/hexc_10_32_table.c \
./libspeex/hexc_table.c \
./libspeex/high_lsp_tables.c \
./libspeex/jitter.c \
./libspeex/kiss_fft.c \
./libspeex/kiss_fftr.c \
./libspeex/lpc.c \
./libspeex/lsp.c \
./libspeex/lsp_tables_nb.c \
./libspeex/ltp.c \
./libspeex/mdf.c \
./libspeex/modes.c \
./libspeex/modes_wb.c \
./libspeex/nb_celp.c \
./libspeex/preprocess.c \
./libspeex/quant_lsp.c \
./libspeex/resample.c \
./libspeex/sb_celp.c \
./libspeex/scal.c \
./libspeex/smallft.c \
./libspeex/speex.c \
./libspeex/speex_callbacks.c \
./libspeex/speex_header.c \
./libspeex/stereo.c \
./libspeex/vbr.c \
./libspeex/vq.c \
./libspeex/window.c
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := spoorle_SpeexLib
LOCAL_STATIC_LIBRARIES := libOgg libSpeex
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_CFLAGS = -DFIXED_POINT -DEXPORT=”” -UHAVE_CONFIG_H
LOCAL_SRC_FILES := spoorle_SpeexLib.cpp \
speex_codec.c \
wav_io.c
include $(BUILD_SHARED_LIBRARY)
when, i try compile in cygwin shows me error:
StaticLibrary : libSpeex.a
StaticLibrary : libstdc++.a
SharedLibrary : libspoorle_SpeexLib.so
C:/android-ndk-r5c/apps/SpoorleClient/obj/local/armeabi/objs-debug/spoorle_Speex
Lib/spoorle_SpeexLib.o: In function `speexenc(char const*, char const*)’:
C:/android-ndk-r5c/apps/SpoorleClient/jni/speex_codec.c:216: undefined reference
to `read_wav_header(__sFILE*, int*, int*, int*, int*)’
C:/android-ndk-r5c/apps/SpoorleClient/jni/speex_codec.c:392: undefined reference
to `flush_ogg_stream_to_file’
C:/android-ndk-r5c/apps/SpoorleClient/jni/speex_codec.c:436: undefined reference
to `flush_ogg_stream_to_file’
C:/android-ndk-r5c/apps/SpoorleClient/jni/speex_codec.c:461: undefined reference
to `add_eos_packet_to_stream’
C:/android-ndk-r5c/apps/SpoorleClient/jni/speex_codec.c:462: undefined reference
to `flush_ogg_stream_to_file’
C:/android-ndk-r5c/apps/SpoorleClient/obj/local/armeabi/objs-debug/spoorle_Speex
Lib/spoorle_SpeexLib.o: In function `out_file_open(char const*, int, int*)’:
C:/android-ndk-r5c/apps/SpoorleClient/jni/speex_codec.c:670: undefined reference
to `write_wav_header(__sFILE*, int, int, int, int)’
C:/android-ndk-r5c/apps/SpoorleClient/obj/local/armeabi/objs-debug/spoorle_Speex
Lib/speex_codec.o: In function `speexenc’:
C:/android-ndk-r5c/apps/SpoorleClient/jni/speex_codec.c:392: undefined reference
to `flush_ogg_stream_to_file’
C:/android-ndk-r5c/apps/SpoorleClient/jni/speex_codec.c:436: undefined reference
to `flush_ogg_stream_to_file’
C:/android-ndk-r5c/apps/SpoorleClient/jni/speex_codec.c:461: undefined reference
to `add_eos_packet_to_stream’
C:/android-ndk-r5c/apps/SpoorleClient/jni/speex_codec.c:462: undefined reference
to `flush_ogg_stream_to_file’
collect2: ld returned 1 exit status
make: *** [/cygdrive/c/android-ndk-r5c/apps/SpoorleClient/obj/local/armeabi/libs
poorle_SpeexLib.so] Error 1
By: Inspire8512 on July 6, 2011
at 3:16 am
Hi,
Sorry, I don’t know. I didn’t compile ogg. I only need libspeex.
By: slworkthings on July 6, 2011
at 8:07 am