Page 1 of 1

Voice Responce

Posted: Wed Sep 06, 2017 4:39 pm
by jhewitt
Hi,

We have an onsite system and was trying to use the <grammar> function with the "voice" option but it doesn't seem to work. The below example works if I press 1,2 or 3. But if I say anything nothing happens. Wondering if I'm doing something wrong or if we have this option enable in our onsite system?

Thanks for the help!

Code: Select all

   <form>
      <field name="selection">
         <grammar type="application/srgs+xml" root="voice_options" mode="voice">
            <rule id="voice_options">
               <one-of>
                  <item>sales</item>
                  <item>support</item>
                  <item>directory</item>
               </one-of>
            </rule>
         </grammar>
         <grammar type="application/srgs+xml" root="dtmf_options" mode="dtmf">
            <rule id="dtmf_options">
               <one-of>
                  <item>1</item>
                  <item>2</item>
                  <item>3</item>
               </one-of>
            </rule>
         </grammar>
         <prompt>
            For sales, press 1 or say sales.
            For tech support, press 2 or say support.
            For company directory, press 3 or say directory.
         </prompt>
         <filled>
            <if cond="selection == 1 || selection == 'sales'">
               <prompt>You selected sales.</prompt>
            <elseif cond="selection == 2 || selection == 'support'"/>
               <prompt>You selected support.</prompt>
            <elseif cond="selection == 3 || selection == 'directory'"/>
               <prompt>You selected directory.</prompt>
            </if>
         </filled>
      </field>
   </form>

Re: Voice Responce

Posted: Fri Sep 08, 2017 3:11 pm
by jhewitt
I think I figure this out. It looks like in the root.php file it issues the below command which makes the system only respond to DTMF and not voice, correct?

Code: Select all

<property name="inputmodes" value="dtmf"/>

Re: Voice Responce

Posted: Fri Sep 08, 2017 3:36 pm
by support
Yes, that's correct. If inputmodes is only set to dtmf, your application will only listen for dtmf and ignore all voice inputs.

Re: Voice Responce

Posted: Fri Sep 08, 2017 4:13 pm
by jhewitt
So the correct setting for both options should be:

Code: Select all

<property name="inputmodes" value="dtmf+voice"/>

Re: Voice Responce

Posted: Mon Sep 11, 2017 8:59 am
by support
No, the correct setting would be:

Code: Select all

<property name="inputmodes" value="dtmf voice"/>
Also, if you remove the inputmodes property completely from your root document, "dtmf voice" is the default.

Re: Voice Responce

Posted: Tue Sep 12, 2017 2:08 pm
by jhewitt
Thanks, that is working.