Java speech recognizer

I assume that readers are familiar with speech technology and its terms (if not take a look: Java speech synthesis). A speech recognizer is a speech engine that converts speech to text. The major step involved speech recognizer is defining its grammar.

Grammar: grammars are nothing but a file which defines the words that may be spoken by a user and the patterns in which they may be spoken. A grammar must be created and activated for a recognizer engine to know what it should listen for in incoming audio.


There are two type of grammar

1. Rule grammars

2. Dictation grammars

Rule grammars:

In rule grammar, users are allowed to speak in specified patter form on which specific actions are invoked. For instance in rule based grammar user audio input could be like “please open the window”. The words please, open, the window are defined in the grammar on demand of this audio input specified action is invoke in our case it could opening a window.

Dictation grammars

Dictation grammars impose fewer restrictions on what can be said, making them closer to providing the ideal of free-form speech input. Dictation grammars may be optimized for particular kinds of text. Often a Dictation recognizer may be available with dictation grammars for general purpose text, for legal text, or for various types of medical reporting. In these different domains, different words are used, and the patterns of words also differ. (Dictation grammars are application oriented)

Most of the processes of a speech recognizer are automatic and are not controlled by the application developer. For instance, microphone placement, background noise, sound card quality, system training, CPU power and speaker accent all affect recognition performance but are beyond an application’s control.

As I said before (in last blog) there are many speech engine providers for speech recognizer we are goanna to use with cmu sphinx . cmu sphinx tool kit consists of xml configuration files and grammar files.

Sample program: Speech recognizer sample code


  1. shakthydoss wrote
    at 9:32 PM - 23rd October 2012 Permalink

    Ref : Speech Recognizer Execution

  2. shakthydoss wrote
    at 7:33 PM - 4th September 2013 Permalink

    Hi all,

    Sample demo Application has been moved to github. please find the url

  3. shakthydoss wrote
    at 7:38 PM - 4th September 2013 Permalink

    Hi all

    Demo application has been moved to github please find the link

Post a Comment

Your email is never published nor shared. Required fields are marked *