From: Anshuman S. R. <ar...@3c...> - 2012-09-17 07:51:00
|
Hi Lauters, I think this will give some pointers -> http://www.w3.org/TR/2003/PR-speech-grammar-20031218/#S2.5.1. Look at the example (in XML format) in this section. From that example, it seems to me that the way to make it work is : <rule id="action" scope="public"> turn <one-of> <item>on</item> <item>off</item> </one-of> </rule> Hope that helps, Anshuman On 9/13/2012 7:09 PM, Lauters Mehdi wrote: > Hi all, > I dond understand everything on the openVXI (3.4, linux/ubuntu) behaviour. > I'm trying to implement a simple vxml grammar to be able to say > > "turn (ON | OFF) the (RED | BLUE) light" but i've got a problem. > > I didn't find how to do it correctly: for example, this simple rule > doesn'work: > > <rule id="action" scope="public"> > <item>turn</item> > <one-of> > <item>on</item> > <item>off</item> > </one-of> > </rule> > > because it fiil the field only if i said "turn" OR "on" OR "off" > But i would like to get the field filled only with "turn on" or "turn off" > > in the same way, the following rule is true if I said "one" OR "two" > instead of "one two". > > <rule id="test" scope="public"> > <item>one</item> > <item>two</item> > </rule> > > Is there a openVXI bug or a vxml error (I checked on specifications, > it seems to be right) > > > This is a the complete grammar file: > > <?xml version="1.0"?> > <!DOCTYPE vxml PUBLIC "-//BeVocal Inc//VoiceXML 1.0//EN" > "http://cafe.bevocal.com/libraries/dtd/vxml1-0-bevocal.dtd"> > <vxml version = "2.1" > > <grammar version="1.0" root="task" > > > > > <rule id="task"> > <ruleref uri="#action" /> > <ruleref uri="#thing" /> > </rule> > > <rule id="action" scope="public"> > <item>turn</item> > <one-of> > <item>on<tag> state = HIGH </tag></item> > <item>off<tag> state = LOW </tag></item> > </one-of> > </rule> > > > <rule id="thing"> > <item>the </item> > <ruleref uri="#color" /> > <item>light</item> > </rule> > > > <rule id="color"> > <one-of> > <item> blue <tag> pin = 12 </tag></item> > <item> red <tag> pin = 13 </tag></item> > <item> green <tag> pin = 11 </tag></item> > <item> yellow <tag> pin = 10 </tag></item> > </one-of> > </rule> > </grammar> > </vxml> > > > Thanks for your advices. > > Regards > > Mehdi > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > > _______________________________________________ > Openvxi-discuss mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openvxi-discuss > > > No virus found in this message. > Checked by AVG - www.avg.com <http://www.avg.com> > Version: 2012.0.2221 / Virus Database: 2437/5266 - Release Date: 09/13/12 > |