I am looking to just use the default configuration but am getting an error with the language model. The exception is: java.io.FileNotFoundException: models\language\en-us.lm.dmp (The system cannot find the path specified).
Is there a default model file available to me with the following two jars:
sphinx4-core-1.0-SNAPSHOT.jar
sphinx4-data-1.0-SNAPSHOT.jar
My code looks like:
public class SpeechAnalyzer {
publicstaticvoidmain(String[]args)throwsIOException,FileNotFoundException{/* Following the code at: http://cmusphinx.sourceforge.net/wiki/tutorialsphinx4 *//* Create configuration */Configurationconfiguration=createConfiguration();StreamSpeechRecognizerrecognizer=newStreamSpeechRecognizer(configuration);InputStreamfIS=SpeechAnalyzer.class.getClassLoader().getResourceAsStream("HappyAudio.wma");System.out.println("[SpeechAnalyzer] Starting recognition of the HappyAudio.wma file...");recognizer.startRecognition(fIS);SpeechResultresult=recognizer.getResult();recognizer.stopRecognition();System.out.println("[SpeechAnalyzer] Stopped recognition of the HappyAudio.wma file");}privatestaticConfigurationcreateConfiguration(){Configurationconfiguration=newConfiguration();/* Set path to acoustic model *///configuration.setAcousticModelPath("resource:/WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz");configuration.setAcousticModelPath("resource:/edu/cmu/sphinx/models/acoustic/wsj");/* Set path to dictionary */configuration.setDictionaryPath("resource:/edu/cmu/sphinx/models/acoustic/wsj/dict/cmudict.0.6d");/* Set language model */configuration.setLanguageModelPath("models/language/en-us.lm.dmp");returnconfiguration;}
}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am looking to just use the default configuration but am getting an error with the language model. The exception is: java.io.FileNotFoundException: models\language\en-us.lm.dmp (The system cannot find the path specified).
Is there a default model file available to me with the following two jars:
sphinx4-core-1.0-SNAPSHOT.jar
sphinx4-data-1.0-SNAPSHOT.jar
My code looks like:
public class SpeechAnalyzer {
publicstaticvoidmain(String[]args)throwsIOException,FileNotFoundException{/* Following the code at: http://cmusphinx.sourceforge.net/wiki/tutorialsphinx4 *//* Create configuration */Configurationconfiguration=createConfiguration();StreamSpeechRecognizerrecognizer=newStreamSpeechRecognizer(configuration);InputStreamfIS=SpeechAnalyzer.class.getClassLoader().getResourceAsStream("HappyAudio.wma");System.out.println("[SpeechAnalyzer] Starting recognition of the HappyAudio.wma file...");recognizer.startRecognition(fIS);SpeechResultresult=recognizer.getResult();recognizer.stopRecognition();System.out.println("[SpeechAnalyzer] Stopped recognition of the HappyAudio.wma file");}privatestaticConfigurationcreateConfiguration(){Configurationconfiguration=newConfiguration();/* Set path to acoustic model *///configuration.setAcousticModelPath("resource:/WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz");configuration.setAcousticModelPath("resource:/edu/cmu/sphinx/models/acoustic/wsj");/* Set path to dictionary */configuration.setDictionaryPath("resource:/edu/cmu/sphinx/models/acoustic/wsj/dict/cmudict.0.6d");/* Set language model */configuration.setLanguageModelPath("models/language/en-us.lm.dmp");returnconfiguration;}
I am following the tutorial at: http://cmusphinx.sourceforge.net/wiki/tutorialsphinx4
I am looking to just use the default configuration but am getting an error with the language model. The exception is: java.io.FileNotFoundException: models\language\en-us.lm.dmp (The system cannot find the path specified).
Is there a default model file available to me with the following two jars:
sphinx4-core-1.0-SNAPSHOT.jar
sphinx4-data-1.0-SNAPSHOT.jar
My code looks like:
public class SpeechAnalyzer {
}
It's
resource:/edu/cmu/sphinx/models/language/en-us.lm.dmp, I'veupdated the wiki.
On Wed, Nov 5, 2014 at 7:27 AM, DavidK upendyal@users.sf.net wrote:
--
Sincerely, Alexander