<!DOCTYPE html PUBLIC "-//VoiceXML Forum//DTD XHTML+Voice 1.2//EN" "http://www.voicexml.org/specs/multimodal/x+v/12/dtd/xhtml+voice12.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events">

<head>
<title>By Plate</title>
<script type="text/javascript">
onload=self.blur();
</script>


<script type="text/javascript">
// ***************************** START JAVASCRIPT FUNCTIONS *****************************************


// *** pass specified plate to "localSearch.cgi?plate number" 
function check_plate(plate)
{
   //alert(plate);
   MDCstuff = window.open("localSearch.cgi?"+plate,"title","width=400,height=400");
   return("checking");
}

function reload_page()
{
   //alert("reload page");
   history.go(0);
   return("repeating ...");
}

function close_browser()
{
   //alert("reload page");
   close();
}


// ******************************* END JAVASCRIPT FUNCTIONS *****************************************
</script>



  <form xmlns="http://www.w3.org/2001/vxml" id="byPlate">

    <block>Hello 4 3 6 3 0</block>

    <field name="vehicle"> 
      <prompt><break time="0.5s"/>Plate Number?</prompt>

         <grammar>
            <![CDATA[
                 #JSGF V1.0;
                 grammar platenumber;
                 public <platenumber> = 
                           <letter><letter><letter><digit><digit><digit>|
                           <digit><digit><digit><letter><letter><letter>|
                           <letter>over<letter><digit><digit><digit><digit><digit>
                        ;

               <letter> = "Adam"|"Boy"|"Baker"|"Charles"|"David"|"Edward"|"Frank"|"George"|"Henry"|
	          "Ida"|"John"|"King"|"Lincoln"|"Mary"|"Nora"|"Ocean"|"Paul"|"Queen"|"Robert"|
                  "Sam"|"Tom"|"Union"|"Victor"|"Willy"|"William"|"X-ray"|"Yellow"|"Zebra"|
                  "Adum"|"Davud"|"Edwurd"|"Linkun"|"Ochun"|"Oshun"|"Keeng";
               <digit> = "One"|"Two"|"Three"|"Four"|"Five"|"Six"|"Seven"|"Eight"|"Nine"|"Zero"|"oh"
                       ;
            ]]>
         </grammar>

      <filled>
        <prompt><value expr="check_plate(vehicle)"/></prompt> 
      </filled>
      <nomatch>
       <prompt>Unable to Locate <value expr="vehicle" /></prompt>
      </nomatch>
      <noinput>
      <prompt><value expr="what"/></prompt>
      </noinput>

    </field>

    <field name="next_step"> 
      <prompt><break time="2.0s"/>Data Sent<break time="2.0s"/></prompt>
         <grammar>
            <![CDATA[
                 #JSGF V1.0;
                 grammar next_step;
                 public <next_step> = "continue"|"stop"|"Oh Kay"|"again"|"OK";
             ]]>
         </grammar>
      <filled>
         <if cond="next_step=='continue'">
            <prompt><value expr="reload_page()"/></prompt>
         <elseif cond="next_step=='stop'"/>
           <prompt>I will stop now<value expr="close_browser()"/></prompt>
         <else/>
           <prompt>I don't know what to say</prompt>
         </if>
      </filled>

    </field>

  </form>

<ev:listener ev:event="vxmldone" ev:handler="#reload_page"/>


</head>

<body id="page.body" ev:event="load" ev:handler="#byPlate">
<h1>By Plate Number Demo</h1>
<h2>
IMPORTANT: this demo REQUIRES a voice-enabled Opera client
</h2>
<p>
This is an illustrative prototype of the Project 10-9 system.
It prompts the user for an Oregon license plate number
and responds with the vehicle status as well as the
RO ("registered owner") status.
<i>All responses are fictious!</i>
</p>
<h2>Format of Plate Numbers</h2>
<p>
The demo accepts license plate numbers
in the form of three alphas followed by three numerics or
three numerics followed by three alphas.
Alphas are to be called out using the standard phonetics:
<table border="1">
<tr>
<td>ADAM</td><td>FRANK</td><td>KING</td><td>PAUL</td><td>UNION</td><td>ZEBRA</td>
</tr>
<tr>
<td>BOY or BAKER</td><td>GEORGE</td><td>LINCOLN</td><td>QUEEN</td><td>VICTOR</td>
</tr>
<tr>
<td>CHARLES</td><td>HENRY</td><td>MARY</td><td>ROBERT</td><td>WILLY</td>
</tr>
<tr>
<td>DAVID</td><td>IDA</td><td>NORA</td><td>SAM</td><td>X-RAY</td>
</tr>
<tr>
<td>EDWARD</td><td>JOHN</td><td>OCEAN</td><td>TOM</td><td>YELLOW</td>
</tr>
</table>
</p>

<h2>Tips</h2>
<p>
Make sure you are using a reasonable quality
headset. Wired boom mikes are good and we've had
good luck with high quality bluetooth headsets.
</p>
<p>
If the demo does not recognize the plate you call out,
repeat it several times.
Recognition accuracy during a session improves
with time.
</p>
<p>
Speak at a normal rate, and loudly (but don't shout).
Speak distinctly.
Do not speak each syllable separately, say the
word like you normally would.
</p>
<p>
Do not be in too much of a hurry to call out
the plate.
Opera will "beep" when it is ready to accept
voice input - wait until the beep and then
wait a little longer before speaking.
</p>
<p>
If the demo has trouble understanding you, try
changing the pronunciation of some of the words.
For example, "ZERO" seems to work better if you
pronounce it as "zeero".
</p>
<p>
To re-run the demo after you check a plate,
speak: "OPERA, RELOAD".
This will reload the page and re-run the
demo.
</p>
<p>
We suggest you set the Opera voice options to
"key not required to talk", "enable high quality
speech", and set the confidence level to "10".
</p>

<h2>Database Contains:</h2>
<p>
<pre>
Adam Boy Charles One Two Two (RO has 10-35 Info)
Adam Boy Charles One Two Four (stolen)
David Boy Charles One Two One (expired tags)
Seven Three Seven Union Tom Union (clear)
Edward Robert Robert Eight Zero Eight (clear)
Willy Edward Lincoln One Zero Nine (expired tags)
Robert Adam David Two Zero Zero (RO suspended)
Robert Adam Paul Zero One Two (RO has no ODL)
Paul Sam Union One Two Zero (clear)
Robert Adam David One One Zero (clear)
</pre>
</p>
<p>
If your speech is recognized by the grammar, you'll get
a pop-up window that both writes and speaks the
plate number back to you.
If the plate number is not matched in the database,
you will be advised that it is unable to be located.
If the pop-up does not display, you may hear the
demo say "unable to locate" - this means that what
you said did not match the grammar, and you can try
again.
</p>
</body>
</html>

