German

Flat
Problems with german acoustic model
User: roprob
Date: 2/19/2017 7:28 pm
Views: 7938
Rating: 0

Hi,

I tried to use the german acoustic model using the latest versions of Sphinx 4 and the acoustic models available here:

https://sourceforge.net/projects/cmusphinx/files/Acoustic%20and%20Language%20Models/German/

Everything was fine with the english default model, so I just replaced the line

        configuration.setAcousticModelPath("resource:/edu/cmu/sphinx/models/en-us/en-us");

to this one:
        configuration.setAcousticModelPath("/Users/Ich/Desktop/model/model3/cmusphinx-de-ptm-voxforge-5.2");

 

After running the program an error ocurred:

Exception in thread "main" java.lang.NullPointerException
    at edu.cmu.sphinx.linguist.lextree.HMMNode.getBaseUnit(HMMTree.java:494)
    at edu.cmu.sphinx.linguist.lextree.HMMNode.<init>(HMMTree.java:472)
    at edu.cmu.sphinx.linguist.lextree.HMMTree.getHMMNodes(HMMTree.java:741)
    at edu.cmu.sphinx.linguist.lextree.LexTreeLinguist.getHMMNodes(LexTreeLinguist.java:1597)
    at edu.cmu.sphinx.linguist.lextree.LexTreeLinguist.access$1200(LexTreeLinguist.java:144)
    at edu.cmu.sphinx.linguist.lextree.LexTreeLinguist$LexTreeEndUnitState.getSuccessors(LexTreeLinguist.java:944)
    at edu.cmu.sphinx.decoder.search.WordPruningBreadthFirstLookaheadSearchManager.collectSuccessorTokens(WordPruningBreadthFirstLookaheadSearchManager.java:410)
    at edu.cmu.sphinx.decoder.search.WordPruningBreadthFirstSearchManager.growBranches(WordPruningBreadthFirstSearchManager.java:396)
    at edu.cmu.sphinx.decoder.search.WordPruningBreadthFirstSearchManager.growNonEmittingBranches(WordPruningBreadthFirstSearchManager.java:436)
    at edu.cmu.sphinx.decoder.search.WordPruningBreadthFirstSearchManager.recognize(WordPruningBreadthFirstSearchManager.java:316)
    at edu.cmu.sphinx.decoder.search.WordPruningBreadthFirstLookaheadSearchManager.recognize(WordPruningBreadthFirstLookaheadSearchManager.java:190)
    at edu.cmu.sphinx.decoder.Decoder.decode(Decoder.java:65)
    at edu.cmu.sphinx.recognizer.Recognizer.recognize(Recognizer.java:106)
    at edu.cmu.sphinx.recognizer.Recognizer.recognize(Recognizer.java:122)
    at edu.cmu.sphinx.api.AbstractSpeechRecognizer.getResult(AbstractSpeechRecognizer.java:60)
    at voicecom.NewClass1.main(NewClass1.java:37)

Do you know how to get rid of it?

Thanks



Re: Problems with german acoustic model
User: nsh
Date: 2/20/2017 12:15 am
Views: 5
Rating: 0

You also need to set the dictionary and the language model.

 

Re: Problems with german acoustic model
User: roprob
Date: 2/20/2017 7:17 am
Views: 65
Rating: 0

Well, I created my dictionary and language model using "Sphinx Knowledge Base Tool".

I tried to the dictionaries from model download page. No errors occured but the accurancy was very bad, worser than the english model. May the problem lays in my bad microphone? The program recognizes something that wasn't spoken. Can I use my own dictionary and language model? I  just need a few commands.

My code is

   while ((result = recognize.getResult()) != null) {
 
            String command = result.getHypothesis();
            System.out.println(command);
   }
Re: Problems with german acoustic model
User: nsh
Date: 2/27/2017 2:43 am
Views: 712
Rating: 0

You can provide the data to reproduce your issues to get help with the accuracy. With a langauge model or grammar it should be accurate. You should not use Knowledge base tool, it works for US English only.

Re: Problems with german acoustic model
User: Koers
Date: 11/9/2017 7:10 am
Views: 2776
Rating: 0

I have the same problem! Did you find a way to create your dictionary and language model in german? Is there any converter for german?

PreviousNext