We are using <say-as type="address"> ... </say-as> tags to repeat what we said for the address prompt, as a confirmation.
When we say "5405 Grand Prix Court, Fontana, CA 92336"or "324 Grand Prix Avenue, Manteca, CA", the <say-as type="address"> repeats the address with the word Prix as separate letters (P R I X). It should actually repeat it as a single word Prix.
Following is the vxml snippet which captures the address and repeats.
Code: Select all
<form id="getFullAddress">
<field name="chosen" type="uscitystate">
<prompt bargein="false">
<prosody rate="125.0">Please say your city and state of your address.</prosody>
</prompt>
<filled>
<assign name="input_city" expr="chosen.city" />
<assign name="input_state" expr="chosen.state" />
<goto next="#getStreet" />
</filled>
...
</field>
</form>
<form id="getStreet">
<field name="chosen">
<grammar srcexpr="'http://vxml.plumgroup.com/grammars/usstreetaddress.php?city='+escape(input_city)+'&state='+escape(input_state)"
root="usstreet" type="application/srgs+xml" mode="voice" />
<prompt bargein="false">
<prosody rate="125.0">Please say your full street address: the number first followed by the street name.</prosody>
</prompt>
<filled>
<script>
if (typeof chosen.StreetNumber === 'undefined' || chosen.StreetNumber == '') {
chosen.StreetNumber = 'NotProvided';
};
if (typeof chosen.StreetPreDirectional === 'undefined' || chosen.StreetPreDirectional == '') {
chosen.StreetPreDirectional = 'NotProvided';
};
if (typeof chosen.StreetName === 'undefined' || chosen.StreetName == '') {
chosen.StreetName = 'NotProvided';
};
if (typeof chosen.StreetSuffix === 'undefined' || chosen.StreetSuffix == '') {
chosen.StreetSuffix = 'NotProvided';
};
</script>
<if cond="chosen.StreetNumber != 'NotProvided'">
<assign name="address" expr="chosen.StreetNumber" />
</if>
<if cond="chosen.StreetPreDirectional != 'NotProvided'">
<assign name="address" expr="address + ' ' + chosen.StreetPreDirectional" />
</if>
<if cond="chosen.StreetName != 'NotProvided'">
<assign name="address" expr="address + ' ' + chosen.StreetName" />
</if>
<if cond="chosen.StreetSuffix != 'NotProvided'">
<assign name="address" expr="address + ' ' + chosen.StreetSuffix" />
</if>
<if cond="input_city || input_city != ''">
<assign name="address" expr="address + ', ' + input_city" />
</if>
<if cond="input_state || input_state != ''">
<assign name="address" expr="address + ', ' + input_state" />
</if>
<prompt bargein="false">
You said,
<say-as type="address"><value expr="address" /></say-as>
</prompt>
<goto next="#confirmation" />
</filled>
...
</field>
</form>
Thanks,
Mani