| Anonymous | Hi Karl,
I believe we may already have the functionality you need today! Let me describe it, though, in case this is not what you want.
The Voice Foundation Class [i:d7f4e8b385]VGrammar[/i:d7f4e8b385] has a bunch of overloaded methods with the name [i:d7f4e8b385]setDtmfInline[/i:d7f4e8b385] and [i:d7f4e8b385]setSpeechInline[/i:d7f4e8b385] that allow you to create an inline grammar. Most of these methods take only the requisite information such as the keywords and values and the [i:d7f4e8b385]VGrammar[/i:d7f4e8b385] VFC will generate the inline grammar for you according to the requirements of the browser. But one of these implementations has the method signature of [i:d7f4e8b385]setDtmfInline(Element)[/i:d7f4e8b385] and [i:d7f4e8b385]setSpeechInline(Element)[/i:d7f4e8b385]. These methods take as input an [i:d7f4e8b385]Element[/i:d7f4e8b385] object, which is a JDOM element (actually it is a [i:d7f4e8b385]com.audium.thirdparty.jdom.Element[/i:d7f4e8b385] - which is really a copy of the JDOM class with the same name). These methods allow you to pass to it a JDOM tree defining the inline grammar and the [i:d7f4e8b385]VGrammar[/i:d7f4e8b385] VFC will throw that XML unchanged into the resulting VoiceXML page. You can then define whatever you want in whatever way you want using these methods.
Obviously using this methods now puts the burden on you to ensure that the XML you pass to it represents correct VoiceXML and conforms to the format of your individual browser and ASR engine, so there will probably be a larger testing burden. But you can do anything you want there, just like flat VoiceXML. Additionally, since this is a VFC, you would have to write your own voice element to use it, there is no built-in support in the included elements to support custom written XML inline grammars (and if I would venture a guess, will probably never have this capability).
So hopefully this is what you want and you can do it today! |
| Please sign in to flag this as inappropriate. |