0

When I try to instantiate the LiveSpeechRecognizer, it throws an error which gives the following stack trace:

Exception thrown: 'edu.cmu.sphinx.util.props.PropertyException' in VoiceRecognition.dll
   at edu.cmu.sphinx.frontend.AutoCepstrum.newProperties(PropertySheet ps)
   at edu.cmu.sphinx.util.props.PropertySheet.getOwner()
   at edu.cmu.sphinx.util.props.ConfigurationManager.lookup(String instanceName)
   at edu.cmu.sphinx.util.props.PropertySheet.getComponentList(String name, Class tclass)
   at edu.cmu.sphinx.frontend.FrontEnd.newProperties(PropertySheet ps)
   at edu.cmu.sphinx.util.props.PropertySheet.getOwner()
   at edu.cmu.sphinx.util.props.PropertySheet.getComponent(String name)
   at edu.cmu.sphinx.decoder.scorer.SimpleAcousticScorer.newProperties(PropertySheet ps)
   at edu.cmu.sphinx.util.props.PropertySheet.getOwner()
   at edu.cmu.sphinx.util.props.PropertySheet.getComponent(String name)
   at edu.cmu.sphinx.decoder.search.WordPruningBreadthFirstSearchManager.newProperties(PropertySheet ps)
   at edu.cmu.sphinx.decoder.search.WordPruningBreadthFirstLookaheadSearchManager.newProperties(PropertySheet ps)
   at edu.cmu.sphinx.util.props.PropertySheet.getOwner()
   at edu.cmu.sphinx.util.props.PropertySheet.getComponent(String name)
   at edu.cmu.sphinx.decoder.AbstractDecoder.newProperties(PropertySheet ps)
   at edu.cmu.sphinx.decoder.Decoder.newProperties(PropertySheet ps)
   at edu.cmu.sphinx.util.props.PropertySheet.getOwner()
   at edu.cmu.sphinx.util.props.PropertySheet.getComponent(String name)
   at edu.cmu.sphinx.recognizer.Recognizer.newProperties(PropertySheet ps)
   at edu.cmu.sphinx.util.props.PropertySheet.getOwner()
   at edu.cmu.sphinx.util.props.ConfigurationManager.lookup(String instanceName)
   at edu.cmu.sphinx.api.Context..ctor(String path, Configuration config)
   at edu.cmu.sphinx.api.Context..ctor(Configuration config)
   at edu.cmu.sphinx.api.AbstractSpeechRecognizer..ctor(Configuration configuration)
   at edu.cmu.sphinx.api.LiveSpeechRecognizer..ctor(Configuration configuration)
   at TestingStandaloneCSVoiceRecognition.Program..ctor()

I"ve been trying to sift through the documentation and code to figure out what's causing it, but I've had little luck so far. I should probably note that I used IKVM to convert the .jars to a .dll which I've imported into a Visual Studio C# project. The LiveSpeechRecognizer doesn't even finish instantiating before throwing the error. I've made sure that I've imported all dependencies, so that's not the issue. The java program works fine.

Astrolamb
  • 171
  • 12

1 Answers1

1

It is a bad idea to call java code from C#, instead you can simply use pocketsphinx dll with C# API, see

https://github.com/cmusphinx/pocketsphinx/tree/master/swig/csharp

Nikolay Shmyrev
  • 24,897
  • 5
  • 43
  • 87