VoiceXML Forum Community Message Board


Post New Topic  Post A Reply
my profile | register | search | faq | forum home
  next oldest topic   next newest topic
» VoiceXML Forum Community Message Board   » Newbies   » Grammar from an external file

 - UBBFriend: Email this page to someone!    
Author Topic: Grammar from an external file
univGuy
Junior Member
Member # 3179

Rate Member
Icon 1 posted June 16, 2005 03:11 PM      Profile for univGuy   Email univGuy   Send New Private Message       Edit/Delete Post   Reply With Quote 
I am simply trying to provide the grammar by using an external file. Here is the code:
code:
 <field name="name">
<prompt>Please say your real name</prompt>
<grammar src="http://studentwebs.colstate.edu/sliwowski_marcin/fpdb/nameGrammar.grammar#UserName" type="application/x-nuance-gsl"/>
</field>

What happens is that after the prompt, the phone call is simply disconnected. I am not sure why? Do I need to specify more attributes in the grammar tag?
Here is the grammar file:
code:
;GSL2.0
UserName:public [Marcin Joe Frank Mike John Steve Paul]

I am using nuance GSL grammar strcuture. Does anyone know why this is not working?
Posts: 1 | From: NJ | Registered: Jun 2005  |  IP: Logged
mheadd
Member
Member # 3181

Member Rated:
4
Icon 1 posted June 17, 2005 03:47 PM      Profile for mheadd   Author's Homepage   Email mheadd   Send New Private Message       Edit/Delete Post   Reply With Quote 
This is just a guess, but are you using the right MIME type with your external grammar file? There is a good discussion of this on the Voxeo developer site at http://docs.voxeo.com/voicexml/2.0/gslhints.htm#start

For example, when I use external grammar files (like those I need to build from a database query), I send back the appropriate MIME type to the VoiceXML browser with the grammar file by setting the response headers as follows (note � I favor PHP for my server side stuff, but the Voxeo site has examples for several other popular languages):

header('Content-type: application/x-nuance-gsl');

Also, for a grammar as small as the one you site in your example, you may just want to use it inline, as opposed to an external file. This might also address the problem.

You might also want to check the logs on your VoiceXML platform -� the error messages recorded in those logs might help you identify the problem. Hope this is helpful.

--------------------
Mark
VoiceinGov.org
http://www.voiceingov.org

Posts: 45 | Registered: Jun 2005  |  IP: Logged
Voice Enabler
Junior Member
Member # 3156

Rate Member
Icon 1 posted July 26, 2005 04:42 AM      Profile for Voice Enabler   Email Voice Enabler       Edit/Delete Post   Reply With Quote 
Your grammar is not correct. In GSL only rule references may start with a capital letter.
Moreover your grammar should fill a natural language slot, which is 'name' in your case.

Posts: 3 | From: Berlin | Registered: May 2005  |  IP: Logged


All times are Eastern  
Post New Topic  Post A Reply Close Topic    Move Topic    Delete Topic next oldest topic   next newest topic
 - Printer-friendly view of this topic
Hop To:

Contact Us | VoiceXML Forum



Powered by Infopop Corporation
UBB.classicTM 6.3.1.2