Menu

Android implementation of newly created model

Help
pannam
2016-08-22
2016-08-22
  • pannam

    pannam - 2016-08-22

    I have tried my level best going thru the tutorial to create the an android speech to text app with my newly created language model (which runs successfully on ubuntu). In almost all tutorials there is something about grammar.

    private void setupRecognizer(File assetsDir) {
            File modelsDir = new File(assetsDir, "models");
            recognizer = defaultSetup()
                    .setAcousticModel(new File(modelsDir, "hmm/en-us-semi"))
                    .setDictionary(new File(modelsDir, "dict/cmu07a.dic"))
                    .setRawLogDir(assetsDir).setKeywordThreshold(1e-40f)
                    .getRecognizer();
            recognizer.addListener(this);
    
    
            File digitsGrammar = new File(modelsDir, "grammar/digits.gram");
            recognizer.addGrammarSearch("digits", digitsGrammar);
    

    I have not set up grammar or threshold . I just want to work with continuos speech just to understand the usage in android. So, far I am going no where . My files is attached, I have downloaded a demo project from here https://github.com/cmusphinx/pocketsphinx-android-demo but I am simply lost as to what is to be done so I can use my files ?

    Is there anywhere I can find an example that deals with newly created language model ?

     

    Last edit: pannam 2016-08-22

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.