Is it possible to create a JSGF grammar that includes a wildcard match from
the LM dictionary? For example, if I want to create a command that says:
open new documents
where is any digit between 1-1,000 (for example), is this possible? Or do you
have to define the grammar by explicitly listing all of the possible numbers,
i.e. one | two | three | four, etc?
Similarly, would it be possible for the wildcard to be just '?' where the ?
can be any word in the dictionary, and I can just parse it at a later time?
Failing this, what would be the correct way to do this? Would I need to create
two recognition sessions, one to recognize the start of the command, and the
other to recognize the dictated speech (which provides the random variable I
need)?
Thank You,
Eric
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is it possible to create a JSGF grammar that includes a wildcard match from
the LM dictionary?
No
where is any digit between 1-1,000 (for example), is this possible? Or do
you have to define the grammar by explicitly listing all of the possible
numbers, i.e. one | two | three | four, etc?
You need to build a grammar to describe them. For 1-1000 it should be
something like
Similarly, would it be possible for the wildcard to be just '?' where the ?
can be any word in the dictionary, and I can just parse it at a later time?
No, its impossible
Would I need to create two recognition sessions, one to recognize the start
of the command, and the
other to recognize the dictated speech (which provides the random variable I
need)?
You need to create a grammar to describe your prompts. That's easy thing to
do. I would recommend you to read some introduction into writing grammar
(there are many books on that)
Is it possible to create a JSGF grammar that includes a wildcard match from
the LM dictionary? For example, if I want to create a command that says:
open new documents
where is any digit between 1-1,000 (for example), is this possible? Or do you
have to define the grammar by explicitly listing all of the possible numbers,
i.e. one | two | three | four, etc?
Similarly, would it be possible for the wildcard to be just '?' where the ?
can be any word in the dictionary, and I can just parse it at a later time?
Failing this, what would be the correct way to do this? Would I need to create
two recognition sessions, one to recognize the start of the command, and the
other to recognize the dictated speech (which provides the random variable I
need)?
Thank You,
Eric
No
You need to build a grammar to describe them. For 1-1000 it should be
something like
You obviosly don't need to list all 1000 choices
No, its impossible
You need to create a grammar to describe your prompts. That's easy thing to
do. I would recommend you to read some introduction into writing grammar
(there are many books on that)
http://www.amazon.com/Art-Business-Speech-Recognition-
Creating/dp/0321154924
There are also quite interesting blogs on how to write grammars properly like:
http://blog.nuecho.com/tag/grammars/
And you can look on real life grammar examples for IVR systems:
http://lima-2.speech.cs.cmu.edu/~dhuggins/letsgo_jsgf.tar.bz2