What is the best method for having the TTS engine pronounce a date correctly in Spanish?
As you can see from the code below, I have used a say-as tag, which works perfectly in English. But when the date is passed and the voice tag is set to the Spanish voice, the date is spelled out (with the voice saying "slash") rather than being pronounced as a date.
(The Spanish voice is conditionally selected in code. This condition isn't tripped when the page is called by the Validator.)
Do I need to format the date differently than I would for English?
If so, what format should I use?
Thank you.
1 <?xml version="1.0" ?>
2 <!DOCTYPE vxml PUBLIC "-//The Plum Group//DTD VOICEXML 2.1//EN" "/usr/local/plumvp/vxml.dtd">
3 <vxml version="2.0">
4 <property name="inputmodes" value="dtmf"/>
5 <property name="voicename" value="lauren"/>
6 <form id="mainmenu">
7 <var name="callee_type" expr="'?= $calleetype ?'"/>
8 <record cond="callee_type=='answeringmachine'" finalsilence="1000ms">
9 <noinput>
10 <prompt>
11 <voice name="lauren">
12 <prosody rate="-10%">
13 Hello. This is Dr. xxx's office calling to remind
14 (patient name)
15 of your appointment on Monday, <say-as type="date">12:00:00 AM</say-as> at <say-as type="time">12:00:00 AM</say-as>
16 at our (clinic name) clinic.
17 </prosody>
18 </voice>
19 </prompt>
20 <disconnect/>
21 <exit/>
22 </noinput>
23 </record>
24 <field name="menuchoice">
25 <grammar type="application/x-jsgf" mode="dtmf">
26 1|2|3|4|5
27 </grammar>
28 <prompt>
29 <voice name="lauren">
30 <prosody rate="-10%">
31 Hello. This is Dr. xxx's office calling to remind
32 (patient name)
33 of your appointment on Monday, <say-as type="date">12:00:00 AM</say-as> at <say-as type="time">12:00:00 AM</say-as>
34 at our (clinic name) clinic.
35 Please press 1 to confirm this appointment, 2 to Reschedule this appointment, 3 to cancel this appointment, 4 to speak to a clinic staff member and 5 to repeat these options.</prosody>
36 </voice>
37 </prompt>
38 <filled>
39 <if cond="menuchoice==1">
40 <prompt bargein="false">
41 <voice name="lauren">
42 <prosody rate="-10%">
43 Your appointment has been confirmed. We look forward to seeing you at our (clinic) clinic on Monday, <say-as type="date">12:00:00 AM</say-as> at <say-as type="time">12:00:00 AM</say-as>.
44 </prosody>
45 </voice>
46 </prompt>
47 <submit next="http://EMRTest.INSitebiz.com/PhoneRemin ... &call_id=0" method="get" namelist="menuchoice"/>
48 <elseif cond="menuchoice==2"/>
49 <prompt bargein="false">
50 <voice name="lauren">
51 <prosody rate="-10%">
52 Please hold while you are transferred to the next available staff member to reschedule your appointment. We appreciate your patience.
53 </prosody>
54 </voice>
55 </prompt>
56 <submit next="http://EMRTest.INSitebiz.com/PhoneRemin ... &call_id=0" method="get" namelist="menuchoice"/>
57 <elseif cond="menuchoice==3"/>
58 <prompt bargein="false">
59 <voice name="lauren">
60 <prosody rate="-10%">
61 The appointment has been cancelled. Your success is important to us. A staff member will be contacting you soon to reschedule.
62 </prosody>
63 </voice>
64 </prompt>
65 <submit next="http://EMRTest.INSitebiz.com/PhoneRemin ... &call_id=0" method="get" namelist="menuchoice"/>
66 <elseif cond="menuchoice==4"/>
67 <prompt bargein="false">
68 <voice name="lauren">
69 <prosody rate="-10%">
70 Please hold while you are transferred to the next available staff member to reschedule your appointment. We appreciate your patience.
71 </prosody>
72 </voice>
73 </prompt>
74 <submit next="http://EMRTest.INSitebiz.com/PhoneRemin ... &call_id=0" method="get" namelist="menuchoice"/>
75 <elseif cond="menuchoice==5"/>
76 <clear namelist="menuchoice"/>
77 <reprompt/>
78 </if>
79 </filled>
80 <noinput>
81 <reprompt/>
82 </noinput>
83 <nomatch>
84 <prompt>
85 <voice name="lauren">
86 <prosody rate="-10%">
87 Input not recognized.
88 </prosody>
89 </voice>
90 </prompt>
91 <reprompt/>
92 </nomatch>
93 </field>
94 <catch event="connection.disconnect">
95 <submit next="http://EMRTest.INSitebiz.com/PhoneRemin ... &call_id=0" method="get" namelist="menuchoice"/>
96 </catch>
97 </form>
98 </vxml>
99
We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics
Spanish TTS, say-as, and Dates
IVR code for Spanish dates
Hi,
You would want to format your date to look like the following for Spanish:
The following example of IVR code demonstrates on how you can read back dates in Spanish (the voice used is for AT&T Natural Voices):
spanishdate.php:
Regards,
Plum Support
You would want to format your date to look like the following for Spanish:
Code: Select all
31/10/2008
spanishdate.php:
Code: Select all
<?php
header("Content-type: text/xml");
echo("<?xml version=\"1.0\"?>\n");
?>
<vxml version="2.0">
<form>
<block>
<prompt>
<voice name="rosa">
La fecha está hoy <say-as type="date">31/10/2008</say-as>.
</voice>
</prompt>
</block>
</form>
</vxml>
Plum Support
Last edited by support on Mon Jan 11, 2010 1:05 pm, edited 2 times in total.
Plum Support
http://www.plumvoice.com
http://www.plumvoice.com
-
- Posts: 11
- Joined: Wed Aug 13, 2008 3:25 pm