http://www.perlmonks.org?node_id=137049

ice6200 has asked for the wisdom of the Perl Monks concerning the following question:

Well I was fooling around with TellMe and I came across a problem. I was writing a vxml form for a cgi script which lists homework for my school (taken from the 'homework board'). The thing I can't figure out is how to get like natural input from the user, such as plaintext without having to use grammar or nomatch or anything like that. What I need is the teacher's last name to look up, and I can't really figure out how to implement an input like this on a form. Please help fellow monks!

Replies are listed 'Best First'.
Re: How to make a form in VoiceXML (VXML) with input of the equivalent of input type="text"
by LukeyBoy (Friar) on Jan 13, 2002 at 10:23 UTC

    I've dabbled with a few of the commercial VXML products out there (like Nuance, VoiceGenie, etc) and you just can't really do what you're looking for. It's called "speech transcribing", and some third-party vendors offer plugins for the voice servers to provide this capability, but even then it really sucks.

    One workaround though (which also sucks) is to build a grammar and VXML document that queries for each letter, one after another, until the user says something like "done".

Re: How to make a form in VoiceXML (VXML) with input of the equivalent of input type="text"
by kwoff (Friar) on Jan 09, 2002 at 23:05 UTC
    Don't get me wrong, I think VoiceXML is cool, but I don't see how this relates to Perl. Anyway...

    Originally, I interpreted your question to mean how do you get text input using VXML. Finally I realized that you don't mean text input, but rather you want to let the user input arbitrary words. First, note that would potentially introduce a security hole because now you have to parse the input (it's on-topic for purposes of meme propagation :). For that reason, it's better to explicitly list what input is allowed and have the user choose from that list.

    Beyond that, it'd be difficult for the voice interpreter to translate arbitrary voice input into text. Say you have a professor named "Skocpol". Maybe the student will pronounce it as "Scockpole", or maybe as "Schohpaul". It would be easier for the interpreter to compare the voice input to a list of names than to translate arbitrary input into a word (which you would then have to match a regexp to "all" possible interpretations). Even safer would be inputting dial tones using "dtmf" mode.

    I understand you want to allow arbitrary names because then you don't have to hard-code the names each quarter/semester (also you don't have to list the names). But in that case, you should probably use an XML structure (or database) to store the data and a web interface for updating the data (maybe even VXML, if it's updated like: "Spell the professor's name." "Ess Kay Oh Pee ..." :)

Re: How to make a form in VoiceXML (VXML) with input of the equivalent of input type="text"
by kwoff (Friar) on Jan 09, 2002 at 02:52 UTC
    "ERROR: invalid query. Please press the # key, now."

      You don't get it, I looked for 3 hours on every VoiceXML site I could find and I couldn't figure it out.