-
Notifications
You must be signed in to change notification settings - Fork 0
/
readme
62 lines (45 loc) · 2.33 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
62
/*
* This is my University Project
* Urdu based Offline Speech recognition for Smartphones (Android Platform)
* Copyrights by Sumeet Gehi 2012
*/
Offline Speech Recognition With PocketSphinx
Follow the below steps to run AndroidPocketSphinxDemo project provided by Sphinx community:
1. Download the latest version of sphinxbase from the following link:
http://sourceforge.net/projects/cmusphinx/files/sphinxbase/
Extract the downloaded tar file and save it under a folder called 'sphinx' .
2. Download the latest version of pocketsphinx from the link:
http://sourceforge.net/projects/cmusphinx/files/pocketsphinx
Extract the downloaded tar file and save it under a folder named 'sphinx' .
3. After extracting sphinxbase and pocketsphinx, you will have to install both
in your system through the following commands,
cd <sphinxbase path or pocketsphinx path>
./configure
make
make install
4. Make sure that you have installed Android NDK, if not installed, refer
the link:
http://developer.android.com/sdk/ndk/index.html
5. Download AndroidPocketSphinxDemo project from the link:
https://github.com/cjac/cmusphinx/tree/trunk/PocketSphinxAndroidDemo
6. Copy the following files from <pocketsphinx path>/swig/edu/cmu/pocketsphinx
to PocketSphinxDemo/jni/edu.cmu.pocketsphinx. The required files are:
Config.java
Decoder.java
Hypothesis.java
pocketsphinx.java
pocketsphinxJNI.java
SegmentIterator.java
7. Specify the path of 'sphinx' folder containing pocketsphinx and sphinxbase in
'Android.mk' file. Then do Ndk build.
8. In the emulator/device in which you are going to install the project, create the
folder called 'edu.cmu.pocketsphinx' under the path '/sdcard/Android/data/' .
9. Under the folder 'edu.cmu.pocketsphinx', create two folders called 'hmm' and
'lm'. Under both 'hmm' and 'lm' create folder called 'en_US'.
10. Inside '/sdcard/Android/data/edu.cmu.pocketsphinx/hmm/en_US', copy the
folder 'hub4wsj_sc_8k' present under
<pocketsphinx path>/model/hmm/en_US
11. Inside '/sdcard/Android/data/edu.cmu.pocketsphinx/lm/en_US', copy the files
'hub4.5000.dic' and 'hub4.5000.DMP' present under
<pocketsphinx path>/model/lm/en_US
12. Now the project is ready to run on the emualtor/device.