Hi, I am using PocketSphinx in my Android project , the problem is the apk size .
I only need a couple of english words for remote control (7 words),so I would like to hear some advices and tips as to how to reduce the asset's size.
Thank you.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
1) Remove unused parts (like weather.dmp)
2) Remove unused words from cmudict leaving the ones that used.
If above is not enough you can:
3) Implement a tool that drops senones from acoustic model. Only context-independent senones and senones specific to your words are important. Others can be dropped.
The assets folder in the demo version has 10M, which is huge for an android app, especially if the voice recognition is just one among many modules in the project, and I guess many android developers will come here to ask the same question.
I removed the unused parts as you said in (1), and went for hub4wsj_sc_8k model, as a result the size dropped to about 3M.
Being a newcomer, I don't really know how to implement your advices (2) and (3), It would be nice if you explain little bit more or just give some links.
Last edit: alfahim 2015-03-17
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I am using PocketSphinx in my Android project , the problem is the apk size .
I only need a couple of english words for remote control (7 words),so I would like to hear some advices and tips as to how to reduce the asset's size.
Thank you.
You can:
1) Remove unused parts (like weather.dmp)
2) Remove unused words from cmudict leaving the ones that used.
If above is not enough you can:
3) Implement a tool that drops senones from acoustic model. Only context-independent senones and senones specific to your words are important. Others can be dropped.
Last part is not trivial though.
Related threads:
https://sourceforge.net/p/cmusphinx/discussion/help/thread/3915fa1b/
Last edit: Nickolay V. Shmyrev 2015-03-17
Thank you for your answer.
The assets folder in the demo version has 10M, which is huge for an android app, especially if the voice recognition is just one among many modules in the project, and I guess many android developers will come here to ask the same question.
I removed the unused parts as you said in (1), and went for hub4wsj_sc_8k model, as a result the size dropped to about 3M.
Being a newcomer, I don't really know how to implement your advices (2) and (3), It would be nice if you explain little bit more or just give some links.
Last edit: alfahim 2015-03-17
Search on this forum, there used to be a thread with the same subject. There you will find answers.