Dear All Members,
I am using the below code for performing speech recognition using microphone:
Configuration configuration = new Configuration();
// Set path to acoustic model.configuration.setAcousticModelPath("resource:/edu/cmu/sphinx/models/acoustic/WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz");// Set path to dictionary.configuration.setDictionaryPath("resource:/edu/cmu/sphinx/models/acoustic/WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz/dict/cmudict.0.6d");// Set language model.configuration.setLanguageModelPath("resource:/edu/cmu/sphinx/models/language/en-us.lm.dmp");LiveSpeechRecognizerrecognizer=newLiveSpeechRecognizer(configuration);// Start recognition process pruning previously cached data.System.out.println("START");recognizer.startRecognition(true);SpeechResultresult=recognizer.getResult();System.out.println("MESSAGE:");System.out.println(result.getHypothesis());// Pause recognition process. It can be resumed then with startRecognition(false).System.out.println("STOP");recognizer.stopRecognition();while(true){System.out.println("START");recognizer.startRecognition(true);result=recognizer.getResult();System.out.println("MESSAGE:");System.out.println(result.getHypothesis());// Pause recognition process. It can be resumed then with startRecognition(false).System.out.println("STOP");recognizer.stopRecognition();}
...
The problem is that I am not getting the text what I am saying in the microphone. Can you members guide me to increase the accuracy?
Thanks,
Uzair Lakhani
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My OS is Windows 7 Ultimate 64-bit. I assigned 2GB to the program because without assigning this memory the Out of Memory exception occurs. Additionally I am using the 5prealpha version of Sphinx.
I am giving input on Microphone and I am not a native English speaker. I want to input one to two words at once but not the whole sentence.
I am also getting difficulty in selecting the language model, dictionary, and acoustic model. Currently I am using the models mentioned in the last post.
Thanks,
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear All Members,
I am using the below code for performing speech recognition using microphone:
Configuration configuration = new Configuration();
...
The problem is that I am not getting the text what I am saying in the microphone. Can you members guide me to increase the accuracy?
Thanks,
Uzair Lakhani
Dear All,
Here is some additional information.
My OS is Windows 7 Ultimate 64-bit. I assigned 2GB to the program because without assigning this memory the Out of Memory exception occurs. Additionally I am using the 5prealpha version of Sphinx.
I am giving input on Microphone and I am not a native English speaker. I want to input one to two words at once but not the whole sentence.
I am also getting difficulty in selecting the language model, dictionary, and acoustic model. Currently I am using the models mentioned in the last post.
Thanks,
Your main loop is wrong, here is how it should be
https://github.com/cmusphinx/sphinx4/blob/58898035b02f0409d03cb2482030ad8d5e7ba0d3/sphinx4-samples/src/main/java/edu/cmu/sphinx/demo/transcriber/TranscriberDemo.java#L55
Sincerely, Alexander
Last edit: Nickolay V. Shmyrev 2015-01-04