[RavenclawDev 225] Re: swapping grammars for the ASR

Antoine Raux antoine at cs.cmu.edu
Thu Feb 22 08:21:49 EST 2007


Hi Svetlana,

Note that we are already using state-specific (statistical) LMs in our
current systems. The way we switch between LMs is through the
INPUT_LINE_CONFIGURATION directive which is generally used in REQUEST agents
and agencies, as in the following example from Let's Go:

INPUT_LINE_CONFIGURATION( "set_lm=time, set_dtmf_len=1")

The specific syntax of the configuration string is dependent on AudioServer
(RavenClaw just sends the slot-value pairs to AudioServer). Right now, you
use set_lm to specify the LM name for the Sphinx 2/3 recognizers, and
set_dtmf_len to specify how many digits your DTMF recognizer should expect.
Of course, you could add new directives, as long as you modify AudioServer
so that it does the right thing (which is most likely sending the directives
to each individual recognition engine).

So the current way to implement what you're proposing is to add an
INPUT_LINE_CONFIGURATION directive to all request agents that indicates all
the rules that should be active at that time. 
Now, it might be interesting to have a default behavior that does what
you're saying (i.e. automatically building the LM configuration from the
expectation agenda). This could be achieved by overloading the CDialogAgent
virtual method GetInputLineConfiguration, so it (optionally) constructs a
list of active rules when called (it's already written so that it inherits
unspecified slots from its parent agent, in addition to parsing the string
specified in its own INPUT_LINE_CONFIGURATION). Another option is to have RC
actually send the whole expectation agenda to AudioServer (it's already
sending it to Helios), but then you have to modify AudioServer to allow it
to parse the full agenda.

Hope this helps...

antoine



-----Original Message-----
From: ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu
[mailto:ravenclaw-developers-bounces at LOGANBERRY.srv.cs.cmu.edu] On Behalf Of
Svetlana Stenchikova
Sent: Wednesday, February 21, 2007 10:38 PM
To: ravenclaw-developers at cs.cmu.edu
Subject: [RavenclawDev 224] swapping grammars for the ASR

Hi,  we are using JSGF grammars with sphinx 4 recognizer.
The grammar of sphinx 4 is generated by converting the grammar of the
phoenix parser.
We would like  to be able to swap Sphinx 4 grammars during the
runtime. This functionality is supported by sphinx 4.


One of the solutions that we consider is to modify the dialog system
specific part of the DM:  create execute agents that call
enable/disable grammars on the ASR and place these agents manually in
the dialog tree. This is not a good solution because there will be a
duplication between what is passed to ASR and what is set in the
GRAMMAR_MAPPING directive on the dialog manager.

Another idea is to use the implementation of the GRAMMAR_MAPPING
directive  to make a call to the ASR component notifying it to change
the grammar.
>From looking at the code  CMAExpect::DeclareExpectations and
CMARequest::DeclareExpectations, each agent has a list of expected
grammatical rules.

So, when an agent is activated(or executed) it could potentially make
a call to the ASR component to notify it of the grammar in the current
state of the DM and to enable the rules that should be active at this
point of the dialog.
This would ensure the synchrony between the DM grammar and the ASR
grammar. This requires a 1-to-1 mapping between phoenix and ASR
grammars, which we comply with because ASR grammar is a conversion
from phoenix grammar.

Can you please tell us what do you think of this idea?
This functionality is currently not present in ravenclaw, right?
How difficult would it be to implement this?
Could you please give any pointers or suggestions for the implementation?


Thank you

Svetlana




More information about the Ravenclaw-developers mailing list