forked from cmusphinx/pocketsphinx-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
62 lines (44 loc) · 1.92 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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