Skip to content

jainanshul/pocketsphinx-android

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About
=====

This project is a wrapper for Pocketsphinx for Android providing
high-level interface for recognizing the microphone input.

Build
=====

You will need SWIG, Gradle and Android NDK to build a distributable
archive of pocketsphinx for Android.

You need to checkout sphinxbase, pocketsphinx and pocketsphinx-android
and put them in the same folder.

Root folder
 \_pocketsphinx
 \_sphinxbase
 \_pocketsphinx-android

Older versions might be incompatible with the latest pocketsphinx-android,
so you need to make sure you are using latest versions. You can use
the following command to checkout from repository:

svn checkout svn://svn.code.sf.net/p/cmusphinx/code/trunk/sphinxbase
svn checkout svn://svn.code.sf.net/p/cmusphinx/code/trunk/pocketsphinx
svn checkout svn://svn.code.sf.net/p/cmusphinx/code/trunk/pocketsphinx-android

After arragement of the files you need to update the file
'gradle.properties' in the project root and define the following
properties:

  * sdk.dir - path to Android SDK
  * ndk.dir - path to Android NDK
  * sdk.vrsion - Android API version
  * ndk.ext - extension for ndk-build script (empty on Linux, .cmd on Windows)

For example:

sdk.dir=/home/user/local/adt-bundle-linux-x86_64-20140321/sdk
ndk.dir=/home/user/local/android-ndk-r9d
sdk.version=19

After everything is set, run `gradle build`. It will create
pocketsphinx-android-5prealpha-nolib.jar in build/libs. It will also
create .so files in libs folder

Using the library
=================

Library is distributed as architecture-independent
pocketsphinx-android-5prealpha-nolib.jar and binary .so files for different
hardware architectures.

You will have to use "-nolib" version of the library and add shared
libraries manually. In Android Studio you need to place jar file in
app/libs folder and jni .so files into app/src/main/jniLibs folder.

For further information on usage please see the wiki page:

http://cmusphinx.sourceforge.net/wiki/tutorialandroid

About

pocketsphinx build for Android

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 87.0%
  • Makefile 13.0%