2

I am working on the Java Sphinx4 API to recognize my speech in real time,I have gone through all the demo available with the source file,But I couldn't identify which demo to work on.

And How can I use transcribe demo to take input wav file real time and convert it into text.

I am working on a Speech Enabled Simulation Interface , Which requires pilot commands to get convert into text at Real time.

Any type of help is highly appreciate.

barryhunter
  • 20,886
  • 3
  • 30
  • 43
  • There should be a sample code in the name "TranscriberDemo.java" which uses a wav and converts it to text. Let me check how to give input realtime. – Rajind Ruparathna Jun 18 '16 at 07:04

1 Answers1

1

Look here under Configuration section. You should be able to convert TranscriberDemo.java to use the following.

LiveSpeechRecognizer uses microphone as the speech source.

LiveSpeechRecognizer recognizer = new LiveSpeechRecognizer(configuration);
// Start recognition process pruning previously cached data.
recognizer.startRecognition(true);
SpeechResult result = recognizer.getResult();
// Pause recognition process. It can be resumed then with startRecognition(false).
recognizer.stopRecognition();
Rajind Ruparathna
  • 2,215
  • 24
  • 55
  • Can you please tell me about changes that have I to make in the transcriberdemo.java file other than adding the above code. ? What will be the .wav file in the config.xml file ? – Ayush Agrawal Jun 20 '16 at 03:38