We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

Cannot get voice prompt when using Spanish accented characte

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
tony
Posts: 8
Joined: Fri Jan 06, 2012 4:13 pm

Cannot get voice prompt when using Spanish accented characte

Post by tony »

Hi,

When sending an expression that contains accented characters in Spanish like "Fué" in subdialog parameters like the one below, I don't get any sound, but if I use "Fue" without accent marks then it works, I would like to emphasize some words by using Spanish accent marks and I'd like them to properly sound.

<?xml version="1.0"?>
<!DOCTYPE vxml SYSTEM "http://plumvoiceportals.com/vxml-260.dtd">
<vxml xml:lang="es" version="2.0" >
.
.
.

<form id="wfvt_survey">
<property name="bargein" value="false"/>

<subdialog name="q5a_dlog" src="yesno.vxml">
<param name="confirm_prompt"
expr="'¿Fué la persona para la que usted trabajo hoy la misma de cuando usted empezo en el estudio?'"/>
<filled> <assign name="q5_a" expr="q5a_dlog.response"/> </filled>
</subdialog>

and this is how the yesno.vxml file looks like:

<?xml version="1.0"?>
<!DOCTYPE vxml SYSTEM "http://plumvoiceportals.com/vxml-260.dtd">
<vxml xml:lang="es" version="2.0" >

<noinput>
<prompt>
<speak xml:lang="es">
Lo siento, no pude oírle..
</speak>
</prompt>
<reprompt/>
</noinput>

<nomatch>
<prompt>
<speak xml:lang="es">
Lo siento, no le entiendo.
</speak>
</prompt>
<reprompt/>
</nomatch>

<form>

<var name="confirm_prompt"/>
<var name="response"/>

<field name="yn">
<grammar>
(1 | 2 | si | no)
</grammar>
<prompt>
<value expr="confirm_prompt"/>

</prompt>

<filled>
<if cond="(yn == '1') || (yn == 'si')">
<assign name="response" expr="'1'"/>
<else/>
<assign name="response" expr="'2'"/>
</if>
<return namelist="response"/>
</filled>
</field>

</form>
</vxml>

Any help is appreciated.

Thanks,
Tony

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

Re: Cannot get voice prompt when using Spanish accented char

Post by support »

Hi Tony,

Because you are using special language characters in your IVR application, you must specify the encoding that you are using in the XML prolog by adding an "encoding" attribute like this (assuming you're using UTF-8):

<?xml version="1.0" encoding="utf-8"?>

If you don't specify the encoding and the parser comes across a character it doesn't recognize given the default encoding, the speech synthesis will fail.

Hope this helps.

Regards,
Plum Support

tony
Posts: 8
Joined: Fri Jan 06, 2012 4:13 pm

Re: Cannot get voice prompt when using Spanish accented char

Post by tony »

That made the trick :)

Thank you,
Tony

tony
Posts: 8
Joined: Fri Jan 06, 2012 4:13 pm

How to submit data when caller hangs up

Post by tony »

Hi,

I have a index.vxml like the one showed below which contains questions whose answers are submitted to a saveResponses.php file at the end of the survey; however, some callers may hang up before they get to the end and I need to save their answers when they hang up; I am wondering how I can do this? would you please give me an example of submitting answers when callers hang up so I can get started. I'd appreciate your help.

Tony

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE vxml SYSTEM "http://plumvoiceportals.com/vxml-260.dtd">
<vxml xml:lang="es-MX" version="2.0" >

<noinput>
  <prompt>
    <speak xml:lang="es">
      Lo siento, no pude oírle.
    </speak>
  </prompt>
  <reprompt/>
</noinput>

<nomatch>
  <prompt>
    <speak xml:lang="es">
      Lo siento, no le entiendo.
    </speak>
  </prompt>
  <reprompt/>
</nomatch>

<property name="sensitivity" value="0.0"/>

<var name="qCustomerId" expr="'ID-GOES-HERE'"/>
<var name="qb1_Contractor" expr="0"/>
<var name="qb2_Change" expr="0"/>
<var name="qb2a_Description" expr="0"/>
<var name="q3TrabajoConstruccion" expr="0"/>

<form id="wfvt_survey">
 
  <subdialog name="qb1_dlog" src="yesno.vxml"> 
    <param name="confirm_prompt" expr="some question'"/>
    <filled>
	    <assign name="qb1_Contractor" expr="qb1_dlog.response"/>
    </filled>
 </subdialog>

  <subdialog name="qb2_dlog" src="yesno.vxml">
    <param name="confirm_prompt" expr="'some question'"/>
    <filled>
	    <assign name="qb2_Change" expr="qb2_dlog.response"/>
    </filled>
 </subdialog>

<subdialog name="qb2a_Description_dlog" src="audio.vxml" cond="qb2_Change == '1'">
   <param name="confirm_prompt" 
       expr="'some description question.'"/> 
    <filled>
	    <assign name="qb2a_Description" expr="qb2a_Description_dlog.response"/>
    </filled>
  </subdialog>

 <subdialog name="q3_dlog" src="yesno.vxml"> 
    <param name="confirm_prompt" expr="'¿Trabajó en construcción.?'"/> 
    <filled>
	    <assign name="q3TrabajoConstruccion" expr="q3_dlog.response"/>
	    <if cond="q3TrabajoConstruccion=='1'">
		<submit next="saveResponses.php" namelist="qCustomerId , fullname , date_of_call , time_of_call , firsttime , qb1_Contractor" method="post" enctype="multipart/form-data"/>
				<exit/>
	    </if>
    </filled>
 </subdialog>
    
</form>

</vxml>

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

Re: Cannot get voice prompt when using Spanish accented char

Post by support »

Hi Tony,

Our apologies. It appears that we missed this post when it was originally made. We're sorry about this. We have answered this post here.

Regards,
Plum Support

Post Reply