I am successful to following
as http://cmusphinx.sourceforge.net/wiki/tutorialandroid
but Now I want to add new dictinary, but I don't know how to do it?
for example, my dictionary like:
one
two
three
four
five
Could you help me?? step by step?
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
But I want to ask you what is "cmudict-en-us.dict"?, I thought that, is it default dictionary(if that, which are words, I thought that it is so many words :))? and below code to add new dictionary?
// Create grammar-based search for selection between demosFilemenuGrammar=newFile(assetsDir,"menu.gram");recognizer.addGrammarSearch(MENU_SEARCH,menuGrammar);// Create grammar-based search for digit recognitionFiledigitsGrammar=newFile(assetsDir,"digits.gram");recognizer.addGrammarSearch(DIGITS_SEARCH,digitsGrammar);// Create language model searchFilelanguageModel=newFile(assetsDir,"weather.dmp");recognizer.addNgramSearch(FORECAST_SEARCH,languageModel);// Phonetic searchFilephoneticModel=newFile(assetsDir,"en-phone.dmp");recognizer.addAllphoneSearch(PHONE_SEARCH,phoneticModel);
Now If i want to add my own dictionay, for Ex my dictionary like (it is saved to the mytest.txt):
one
hello
goodbye
2.1 I will using http://www.speech.cs.cmu.edu/tools/lmtool-new.html to generate dictionary
2.2 Generate the CMU binary form (DMP)(convert from .lm->.dmp)
sphinx_lm_convert -i 1234.lm -o 1234.dmp
2.3 then add copy 1234.dmp to asse dicrectory , and what about 1234.dic? I don't know how to use it, I think it must be use
2.4 then do as example code.
And I failed, I don't know why? I think I failed because I don't use 1234.dic? if that how to use 1234.dic?
thanks
Last edit: Nickolay V. Shmyrev 2015-06-02
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am successful to following
as http://cmusphinx.sourceforge.net/wiki/tutorialandroid
but Now I want to add new dictinary, but I don't know how to do it?
for example, my dictionary like:
one
two
three
four
five
Could you help me?? step by step?
Thanks
any guys help me?
thanks adavance!
This issue is covered in our tutorial
http://cmusphinx.sourceforge.net/wiki/tutorialdict
Thanks you.
I wonder as:
1-In the android code we had
But I want to ask you what is "cmudict-en-us.dict"?, I thought that, is it default dictionary(if that, which are words, I thought that it is so many words :))? and below code to add new dictionary?
Now If i want to add my own dictionay, for Ex my dictionary like (it is saved to the mytest.txt):
2.1 I will using http://www.speech.cs.cmu.edu/tools/lmtool-new.html to generate dictionary
2.2 Generate the CMU binary form (DMP)(convert from .lm->.dmp)
sphinx_lm_convert -i 1234.lm -o 1234.dmp
2.3 then add copy 1234.dmp to asse dicrectory , and what about 1234.dic? I don't know how to use it, I think it must be use
2.4 then do as example code.
And I failed, I don't know why? I think I failed because I don't use 1234.dic? if that how to use 1234.dic?
thanks
Last edit: Nickolay V. Shmyrev 2015-06-02
A default dictionary
No, the code is used to configure searches with language models and grammars
Put it into assets directory instead of default dictionary and use it with setDictionary instead of default dictionary.
Thanks
But I still failed!
and I had a question, how to use default dictionary?
default dictionary is used in default demo application:
It's unclear what you failed in.
I failed in creating new dictionary!
But, I want to ask you, how many words in the defaulted dictionary?
follow tutorial carefully. it's quite simple.
You can open it and check. Smth like 130k
Also, you can provide logcat output to get help on this issue. It is available inside your IDE, you can cut it and paste here.