cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
190
Views
0
Helpful
0
Comments
cdnadmin
Community Member
This document was generated from CDN thread

Created by: null on 29-11-2005 03:00:35 PM
Is it possible to have TTS prompts in multiple languages within the same application ?

For example Audio element 1 in en-US, Audio element 2 in es-MX etc.

The language setting in the project level sets the xml:lang attribute of the document for all generated VoiceXML.

For example:

<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.0" application="/CVP/Server?audium_root=true&#38;amp;calling_into=SpeechAppR01" xml:lang="en-US">
<property name="xml:lang" value="es-MX" />
<form id="audium_start_form">
<block>
<assign name="audium_vxmlLog" expr="''" />
<assign name="audium_element_start_time_millisecs" expr="new Date().getTime()" />
<goto next="#start" />
</block>
</form>
<form id="start">
<block>
<prompt bargein="true">

Para servicion in espanol oprima siethe.
</prompt>
<assign name="audium_vxmlLog" expr="audium_vxmlLog + '|||audio_group$$$' + 'initial_audio_group' + '^^^' + application.getElapsedTime(audium_element_start_time_millisecs)" />
<submit next="/CVP/Server" method="post" namelist=" audium_vxmlLog" />
</block>
</form>
</vxml>


According to the spec, what is needed is or set this the the document level per element basis.

<prompt bargein="true" xml:lang="es-MX"> ....

The VoiceXML property setting as shown above in the generated VoiceXML does not work for Cisco CVP.

What this the Audium recomended approach for doing this ?

Thanks,
Chandima.

Subject: RE: Multiple Language Support
Replied by: Vance Vagell on 29-11-2005 03:44:55 PM
Hi Chandima,

Yes, it is possible to change the language in the middle of a call using the Audium Java API. To do so, use the

[code:1:f1f5c423d0]setMainDocumentLanguage&#40;String language&#41;[/code:1:f1f5c423d0]

method of the APIBase class. Rather than hard-coding the language value, you may wish to create a configurable element that lets the voice application designer specify the desired language for the custom element in its configuration, to facilitate reusability. An example of this would be a custom "ChangeLanguage" Action element with a "New Language" setting that the designer can fill-in during development. When the element is encountered at runtime the language will change as specified, and future VoiceXML that is produced will include the appropriate xml:lang value.

If you have questions while creating this custom element, we would be glad to answer them for you. In addition, we could create such an element for you under Audium Premium Support. If there are time constraints, expedited service is also available.

Regards,
Vance

Subject: RE: Multiple Language Support
Replied by: null on 30-11-2005 02:56:05 AM
I have implemented what you suggested and it appears to work at the document level. However, when the request for a form grammar is done it is using en-US, when the document property is set to es-MX.

<grammar xmlns="http://www.w3.org/2001/06/grammar" mode="voice" type="application/grammar+xml" version="1.0" xml:lang="en-US" src="/CVP/gram.grxml" />

How do I change this to be consistant ? The output for the form is as follows:

<?xml version="1.0" encoding="UTF-8" ?>
  • <vxml version="2.0" application="/CVP/Server?audium_root=true&#38;calling_into=SpeechAppR01" xml:lang="es-MX">
<property name="timeout" value="5s" />
<property name="maxnbest" value="1" />
<property name="confidencelevel" value="0.40" />
  • <form id="audium_start_form">
  • <block>
<assign name="audium_vxmlLog" expr="''" />
<assign name="audium_element_start_time_millisecs" expr="new Date().getTime()" />
<goto next="#start" />
</block>
</form>
  • <form id="start">
<property name="inputmodes" value="dtmf voice" />
  • <block>
<assign name="audium_vxmlLog" expr="audium_vxmlLog + '|||audio_group$$$' + 'initial_audio_group' + '^^^' + application.getElapsedTime(audium_element_start_time_millisecs)" />
<goto nextitem="foundation_fld" />
</block>
  • <field name="foundation_fld" modal="false">
<property name="inputmodes" value="dtmf voice" />
<grammar xmlns="http://www.w3.org/2001/06/grammar" mode="voice" type="application/grammar+xml" version="1.0" xml:lang="en-US" src="/CVP/gram.grxml" />
<prompt bargein="true">Please say your member id number</prompt>
  • <catch event="nomatch">
<assign name="audium_vxmlLog" expr="audium_vxmlLog + '|||nomatch$$$' + '1' + '^^^' + application.getElapsedTime(audium_element_start_time_millisecs)" />
<assign name="audium_vxmlLog" expr="audium_vxmlLog + '|||audio_group$$$' + 'nomatch_audio_group' + '^^^' + application.getElapsedTime(audium_element_start_time_millisecs)" />
<reprompt />
</catch>
.....

Subject: RE: Multiple Language Support
Replied by: null on 30-11-2005 05:35:25 AM
Yes this is the same issue I have (posted under "grammars language setting").

Eagerly awaiting reply .....

Cheers, Mitch

Subject: RE: Multiple Language Support
Replied by: Vance Vagell on 30-11-2005 04:23:49 PM
Hi Chandima,

We have posted a detailed response to this question in another thread, since it has also been brought up by another customer. Please refer to this thread for the solution:

http://www.audiumcentral.com/supportcenter/viewtopic.php?p=5573#5573

Regards,
Vance
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links