RE: Recommendation for xml:lang expressions

In most of the applications I'm familiar with people record basically all the audio so there is no TTS or nearly no TTS.  With so little TTS, they don't care as much about the language of the TTS voice for their secondary languages - if the string is two for English and deux for French in an application that is primarily French, then they don't care that it is a French voice that says two with a French accent (example made up since obviously all the numbers are easy enough to record - TTS tends to occur only in truly dynamic content like reading your email or text messages to you).

It is also worth noting that the xml:lang may well influence the grammar acoustic model too, so you may wish to be a little careful in changing it just for the prompts (of course it may be you want the exact same changes for the grammars too, as likely if you want to say a prompt in one language, you want to listen to a speaker of the same language - again to solve that issue platform extensions of which grammar language model/acoustic model to use might be a way to go - and here we definitely have applications that do this.).

From: David Wright [mailto:David.Wright@OntarioSystems.com]
Sent: Tuesday, May 27, 2014 12:13 PM
To: Michael Bodell; www-voice@w3.org
Subject: RE: Recommendation for xml:lang expressions

Thanks for the response, Michael.  I expect that many many many VXMl scripts have business requirements that they change language mid-script based on the caller's selection.  So how are most other VXML developers normally handling this within the existing standard?  Are they choosing one of the options that you proposed?

From: Michael Bodell [mailto:bodell@247-inc.com]
Sent: Tuesday, May 27, 2014 3:02 PM
To: David Wright; www-voice@w3.org<mailto:www-voice@w3.org>
Subject: RE: Recommendation for xml:lang expressions

It is not obvious that VXML would want to redefine xml:lang directly since that comes from the XML specification directly (hence the xml namespace prefix).  See http://www.w3.org/TR/REC-xml/#sec-lang-tag for more on that.

Obviously VXML could define something like xmllangexpr attribute and have it defined to evaluate to an string which should then be interpreted as xml:lang, but that could be a little messy IMO.

There are a few different approaches that could be taken to solve your issue, including the if method you call out.  Other methods include:


-           using a server side solution and sending the TTS and language information to the server in an audio URL and having the server render the TTS for you into a normal audio file.

-          (platform extension) defining a VXML property to be the xml:lang on SSML fragments and/or default voice.  Using that property tag to set the language for your program.

-          (spec extension) allowing the value expr to write XML tags as well as text so the <value expr="'&lt;s xml:lang=\"' + callerXmlLang + '\"&gt;$' + thisAmount +'&lt;/s%gt;'"/> or some such similar string.  This was traditionally a feature request (using value to write SSML fragments and/or using value to write SRGS fragments) but for various reasons and much discussion it was generally decided that this sort of document.write like functionality was inappropriate in VXML 2.0/2.1.

From: David Wright [mailto:David.Wright@OntarioSystems.com]
Sent: Wednesday, May 21, 2014 11:45 AM
To: www-voice@w3.org<mailto:www-voice@w3.org>
Subject: Recommendation for xml:lang expressions

In a VXML script, I prompt the caller for language and get a result from a <field>.  I need a way to programmatically express to all additional <audio> tags in my application that the language selected by my caller (let's say 'es') is to be used for TTS.  The <s xml:lang='es'> works if I wanted to hand-code this stuff and have <if> blocks all over the place to see what language to play the audio in, but I'm too lazy to do this much work.  I would really like to have a new attribute in the <s>, <p> and <voice> tags that lets me pass an ecmascript expression that is evaluated and placed into the xml:lang property before sending it over to the SSML engine.

As it is right now, in order to read a dollar amount in either Spanish or English, depending on what the caller chose, I have to do this:

<if cond="callerXmlLang == 'es'">
       <prompt>
              <s xml:lang="es">
                     <value expr="'$' + thisAmount"/>
              </s>
       </prompt>
</if>
<if cond="callerXmlLang == 'en'">
       <prompt>
              <s xml:lang="en">
                     <value expr="'$' + thisAmount"/>
              </s>
       </prompt>
</if>

I also considered using javascript to change the xml:lang attribute on the <vxml> tag, but this would be painful to have to set within every <form> that is called via <subdialog>, since the application context is fresh everytime you use <subdialog>.

[https://no-cache.hubspot.com/cta/default/159435/96c76b68-b911-464a-b811-210d8e4954c1.png]<http://tinyurl.com/ndzpd5y>
Join Ontario Systems at PowerUp 2014. Visit the website and register today.  Register today<http://tinyurl.com/qz6a57q>.
  

Received on Tuesday, 27 May 2014 19:45:31 UTC