Page 1 of 1

Record user response

Posted: Fri Sep 08, 2017 3:06 pm
by jhewitt
Hi, is there a way to record the user's response to a prompt? I have tried the below but it just causes an error.

Code: Select all

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

<form id="acct_status">
<record name="myrecording" type="audio/x-wav" maxtime="300s" finalsilence="30s" beep="true" dtmfterm="true">
<block>
  <prompt>
    <speak xml:lang="<?=$lang?>"><voice name="'<?=$TTS[$lang]?>'">
        When you say “Yes” to the following prompt your payment will be authorized. To cancel this transaction say “No”.
        Please wait for the beep to record your response.
    </voice></speak>
  </prompt>
</block>

<field name="mainmenu">
  <grammar type="application/srgs+xml" root="ROOT" mode="voice">
    <rule id="ROOT">
      <one-of>
        <item>yes</item>
        <item>no</item>
      </one-of>
    </rule>
  </grammar>

<prompt>
    <speak xml:lang="<?=$lang?>">
        <voice name="'<?=$TTS[$lang]?>'">
            Are you authorizing [CompanyNameHere] to initiate an electronic payment from your [AcctType] account, 
            ending in [Last4Digits] on [Date] for the amount of $[Amount]?        
        </voice>
    </speak>
</prompt>
  
<filled>
    <assign name="recorded_message" expr="myrecording"/>
    <if cond="mainmenu=='yes'">
        <prompt>You confirmed your payment. <value expr="recorded_message"/></prompt>
        <submit next="http://11989d89.ngrok.io/api/IVR/saverecording" namelist="recorded_message" method="post" enctype="multipart/form-data"/>
    <elseif cond="mainmenu==2"/>
        <prompt>You candled your payment. <value expr="recorded_message"/></prompt>
        <goto next="end.php"/>
    </if>
</filled>
</record>
</field>

</form>

Re: Record user response

Posted: Mon Sep 11, 2017 3:53 pm
by support
You cannot use <block> or <field> tags inside a <record> tag. For more information, please take a look at the docs:

http://www.plumvoice.com/docs/dev/voice ... rd&s[]=tag

In order to have an audio recording of a caller going through a <block> or <field> you will have to use the call recording feature:

http://www.plumvoice.com/docs/dev/voice ... recordcall

Here is an example of how you should reformat your code.

Code: Select all

  <property name="recordcall" value="true"/>
  <property name="inputmodes" value="dtmf voice"/>

  <form id="acct_status">
    <field name="mainmenu">
      <grammar src="builtin:grammar/boolean" mode="voice"/>
      <prompt>
          <speak xml:lang="<?=$lang?>">
              <voice name="'<?=$TTS[$lang]?>'">
                  When you say Yes to the following prompt your payment will be authorized. To cancel this transaction say No.
                  Are you authorizing [CompanyNameHere] to initiate an electronic payment from your [AcctType] account,
                  ending in [Last4Digits] on [Date] for the amount of $[Amount]?       
              </voice>
          </speak>
      </prompt>
    
      <filled>
          <if cond="mainmenu==1">
              <prompt>You confirmed your payment.</prompt>
              <submit next="http://11989d89.ngrok.io/api/IVR/saverecording" namelist="callrecording" method="post" enctype="multipart/form-data"/>
          <elseif cond="mainmenu==0"/>
              <prompt>You candled your payment. </prompt>
              <goto next="end.php"/>
          </if>
      </filled>
    </field>

  </form>

Re: Record user response

Posted: Tue Sep 12, 2017 1:04 pm
by jhewitt
Thanks,

This seems to be working but the system is having problems recognizing me saying "Yes", I get an invalid entry. I got it to recognize "No" only after trying 5 different times, but no luck with "Yes".

Any ideas?

Thanks,
John

Re: Record user response

Posted: Tue Sep 12, 2017 3:39 pm
by support
Please make sure you are in a quiet environment and speaking clearly. You may also want to experiment with some voice recognition properties like:

sensitivity (http://www.plumvoice.com/docs/dev/voice ... ensitivity)
confidencelevel (http://www.plumvoice.com/docs/dev/voice ... dencelevel)

Re: Record user response

Posted: Wed Sep 13, 2017 3:34 pm
by jhewitt
The only way I have been able to ensure this works is to add bargein="false" to the prompt, other wise I just couldn't get it to work.

I have the file being submitted to the server but wanted to make sure I have the raw file format correct?
Rate = 8000 Hz
1 channel or mono

Anything else I need to know in order to convert it to a wav file?

Thanks for the help!
John

Re: Record user response

Posted: Wed Sep 13, 2017 4:52 pm
by support
The audio you get from out platform is in this format: 8 kHz 8-bit µ-law encoded headerless (*.ul)

Re: Record user response

Posted: Thu Sep 14, 2017 1:57 pm
by jhewitt
I'm still having issues with the IVR picking up voice responses correctly. Is there a way I can send you one of the voice files so you can hear it? This last one didn't hear yes the first time and the 2nd time it took it as no.

Thanks,
John

Re: Record user response

Posted: Thu Sep 14, 2017 3:51 pm
by support
Since you have set bargein=false, please make sure the entire prompt is finished before you try speaking. If you speak while the prompt is playing, the IVR will not be listening.

We've tested the example code we sent earlier and were not able to reproduce the issue. Please list step by step how you are experience the problem.

Re: Record user response

Posted: Fri Sep 15, 2017 12:06 pm
by jhewitt
Obviously, I'm waiting until the end of the prompt because I did set bargein=false because it would work at ALL without doing so!

As suggested earlier, I've been trying to adjust the below settings but haven't found a setting that is spot on and works. It is hit and miss and sometimes it is just wrong.

sensitivity (http://www.plumvoice.com/docs/dev/voice ... ensitivity)
confidencelevel (http://www.plumvoice.com/docs/dev/voice ... dencelevel)
  • 1. Call the IVR number
    2. Listen to the prompt, waiting to the end to answer, Answer "Yes"
    3. Listen to it tell me "Invalid entry"
    4. Listen to the Prompt again, waiting to the end to answer, Answer "Yes"
At this point, this is either going to repeat until the configured 3 try's unsuccessful then transfer the call
OR
It thinks I said "No" but I actually said "Yes"
OR
On it might actually get it right. I haven't had it get it correct the first time that often. Which I just can't deploy and have a user going thru this.

Below are my current settings, but If I take them out and go with the default setting it isn't any better.
Again, if I could just send you the recorded session you would know the steps I'm taking, that I'm waiting to the end of the prompt and hear what the system is doing.

Code: Select all

<property name="recordcall" value="true"/>
<property name="inputmodes" value="voice"/>
<property name="speedvsaccuracy" value="0.2"/>
<property name="confidencelevel" value="0.3"/>
<property name="sensitivity" value="0.3"/>

Re: Record user response

Posted: Fri Sep 15, 2017 12:38 pm
by support
Hi John,

It seems that given our team is simply unable to reproduce the issue as you described, you may be in need of more in-depth support than this free forum provides. We encourage you to please contact our support team and include a valid customer ID in the subject line with your inquiry. If you do not have a valid customer ID, please contact our sales department at sales@plumgroup.com.

Regards,
Plum Support

Re: Record user response

Posted: Fri Sep 15, 2017 6:59 pm
by jhewitt
That's too bad.

For what it's worth here is the log of the last test.
Fri 15 Sep 2017 03:58:42.739 PM:
Fetching Document: acknowledgePayment.php
DocumentParser::FetchDocument(acknowledgePayment.php)
Posted form data is URL encoded
Attempting to fetch http://10.0.1.129/vxml/acknowledgePayment.php

Fri 15 Sep 2017 03:58:42.745 PM:
Click here to view saved VoiceXML script

Fri 15 Sep 2017 03:58:42.746 PM:
Fetching Root Document: root.php
DocumentParser::FetchDocument(root.php)
Attempting to fetch http://10.0.1.129/vxml/root.php

Fri 15 Sep 2017 03:58:42.749 PM:
Click here to view saved VoiceXML script

Fri 15 Sep 2017 03:58:42.754 PM:
Loading Builtin grammar: builtin:grammar/boolean

Fri 15 Sep 2017 03:58:42.755 PM:
VXI::var_element(name="IVRCallData" expr = "session.id + '|' + session.telephone.ani + '|' + session.telephone.dnis")
Entering form = 'acknowledgePayment' form item = '$_internalName_103015'
Page=acknowledgePayment.php

Fri 15 Sep 2017 03:58:42.756 PM:
Form=acknowledgePayment
IVRCallData= 000001;000;1505515980||502
Entering form = 'acknowledgePayment' form item = '$_internalName_103016'
VXI::assign_element(name="totalAmount" expr = "1553.50")
VXI::assign_element(name="bankAcctType" expr = "'Checking'")
VXI::assign_element(name="last4chars" expr = "4321")
VXI::assign_element(name="CompanyName" expr = "'Evergreen Note Servicing'")
VXI::assign_element(name="today" expr = "'September 15, 2017'")
Entering form = 'acknowledgePayment' form item = 'response'
VXI::queue_prompts()
bargein set to false
INPUTMODES set to "VOICE"
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak xml:lang="en-us"><voice gender="female"><speak xml:lang="en-us"><voice name="&apos;Samantha&apos;"><speak>
When you say Yes to the following prompt your payment will be authorized. To cancel this transaction say No.
Are you authorizing Evergreen Note Servicing to initiate an electronic payment from your Checking account,
ending in 4, 3, 2, 1, on September 15, 2017 for the amount of $1553.5?
</speak></voice></speak></voice></speak>
---------

Fri 15 Sep 2017 03:58:42.920 PM:
Newly queued prompts are now being played
VXI::field_element - activating grammars for form = 'acknowledgePayment' formitem = 'response'

Fri 15 Sep 2017 03:58:42.921 PM:
VXI::do_recognition()
PromptManager::Play()

Fri 15 Sep 2017 03:59:09.727 PM:
received event: nomatch:

Fri 15 Sep 2017 03:59:09.728 PM:
bargein set to true
INPUTMODES set to "VOICE"
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak xml:lang="en-us"><voice gender="female"><speak xml:lang="en-us"><voice name="&apos;Samantha&apos;"><speak>In-val-lid entry.</speak></voice></speak></voice></speak>
---------

Fri 15 Sep 2017 03:59:09.744 PM:
Entering form = 'acknowledgePayment' form item = 'response'

Fri 15 Sep 2017 03:59:09.745 PM:
VXI::queue_prompts()
bargein set to false
INPUTMODES set to "VOICE"
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak xml:lang="en-us"><voice gender="female"><speak xml:lang="en-us"><voice name="&apos;Samantha&apos;"><speak>
When you say Yes to the following prompt your payment will be authorized. To cancel this transaction say No.
Are you authorizing Evergreen Note Servicing to initiate an electronic payment from your Checking account,
ending in 4, 3, 2, 1, on September 15, 2017 for the amount of $1553.5?
</speak></voice></speak></voice></speak>
---------

Fri 15 Sep 2017 03:59:09.888 PM:
VXI::field_element - activating grammars for form = 'acknowledgePayment' formitem = 'response'
VXI::do_recognition()
PromptManager::Play()
Newly queued prompts are now being played

Fri 15 Sep 2017 03:59:36.921 PM:
received event: nomatch:
bargein set to true
INPUTMODES set to "VOICE"

Fri 15 Sep 2017 03:59:36.922 PM:
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak xml:lang="en-us"><voice gender="female"><speak xml:lang="en-us"><voice name="&apos;Samantha&apos;"><speak>In-val-lid entry.</speak></voice></speak></voice></speak>
---------

Fri 15 Sep 2017 03:59:36.938 PM:
Entering form = 'acknowledgePayment' form item = 'response'
VXI::queue_prompts()
bargein set to false
INPUTMODES set to "VOICE"
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak xml:lang="en-us"><voice gender="female"><speak xml:lang="en-us"><voice name="&apos;Samantha&apos;"><speak>
When you say Yes to the following prompt your payment will be authorized. To cancel this transaction say No.
Are you authorizing Evergreen Note Servicing to initiate an electronic payment from your Checking account,
ending in 4, 3, 2, 1, on September 15, 2017 for the amount of $1553.5?
</speak></voice></speak></voice></speak>
---------

Fri 15 Sep 2017 03:59:37.104 PM:
VXI::field_element - activating grammars for form = 'acknowledgePayment' formitem = 'response'
VXI::do_recognition()
PromptManager::Play()
Newly queued prompts are now being played

Fri 15 Sep 2017 04:00:03.799 PM:
received event: nomatch:
Fetching Document: transfer.php
DocumentParser::FetchDocument(transfer.php)
Attempting to fetch http://10.0.1.129/vxml/transfer.php

Fri 15 Sep 2017 04:00:03.806 PM:
Click here to view saved VoiceXML script
Fetching Root Document: root.php
DocumentParser::FetchDocument(root.php)
Attempting to fetch http://10.0.1.129/vxml/root.php

Fri 15 Sep 2017 04:00:03.810 PM:
Click here to view saved VoiceXML script

Fri 15 Sep 2017 04:00:03.814 PM:
Entering form = '$_internalName_103019' form item = '$_internalName_103020'
VXI::queue_prompts()
bargein set to true
INPUTMODES set to "DTMF"

Fri 15 Sep 2017 04:00:03.815 PM:
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak xml:lang="en-us"><voice gender="female"><speak xml:lang="en-us"><voice name="&apos;Samantha&apos;"><speak>Please remain on the line while your call <break size="medium" time="300ms"/> is transferred to a customer service representative.</speak></voice></speak></voice></speak>
---------

Fri 15 Sep 2017 04:00:03.872 PM:
Newly queued prompts are now being played

Fri 15 Sep 2017 04:00:09.376 PM:
Bridge Transfer: 2104

Fri 15 Sep 2017 04:00:11.380 PM:
impl->dxi->waitForPlayEOD() detected a disconnect. Abandoning queued data.
Line disconnect detected. Abandoning queued audio data.
received event: connection.disconnect.hangup:

Fri 15 Sep 2017 04:00:11.381 PM:
VXI::exit_element()
Call End Event

Fri 15 Sep 2017 04:00:11.382 PM:
Ending session
Ending Session On Channel 0