I'm trying to implement a "dictation" feature using the PocketSphinx on Android in conjunction with one of Keith Vertanen's language models. I've modified the sample to look like this:
My only other thought was that perhaps the extension is wrong, since this says
Language model can be stored and loaded in three different format - text ARPA format, binary format BIN and binary DMP format. ARPA format takes more space but it is possible to edit it. ARPA files have .lm extension. Binary format takes significantly less space and faster to load. Binary files have .lm.bin extension. It is also possible to convert between formats. DMP format is obsolete and not recommended.
which makes it sound like the file should be named lm_csr_5k_nvp_2gram.lm instead of lm_csr_5k_nvp_2gram.arpa. I did try renaming the file, however, without any change in the exception.
What is the correct way to do this?
Last edit: M WO 2016-02-01
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm trying to implement a "dictation" feature using the PocketSphinx on Android in conjunction with one of Keith Vertanen's language models. I've modified the sample to look like this:
where
lm_csr_5k_nvp_2gram.arpais from the 5K NVP 2-gram dowload on Keith Vertanen's site.I'm getting this error:
The lines
make me think that the
lm_csr_5k_nvp_2gram.arpafile isn't correctly formatted or something. The file looks like this:which at least looks like the example file here.
My only other thought was that perhaps the extension is wrong, since this says
which makes it sound like the file should be named
lm_csr_5k_nvp_2gram.lminstead oflm_csr_5k_nvp_2gram.arpa. I did try renaming the file, however, without any change in the exception.What is the correct way to do this?
Last edit: M WO 2016-02-01
I answered you in
http://stackoverflow.com/questions/35123338/pocketsphinx-for-an-android-dictation-app/35142930#35142930