- From: Pavel Cenek <cenek@optimsys.cz>
- Date: Mon, 02 Jun 2014 09:51:56 +0200
- To: www-voice@w3.org
- Message-ID: <538C2D1C.9070600@optimsys.cz>
Hello, I think that the document's xml:lang attribute was never meant to filter out prompts whose language does not match the document language. The interpreter should play all the prompts, applying language specific voice and normalization/phonetic transcription rules to each of the prompts according to the language they specify. When it comes to the VXML doc authoring style – we also mostly prefer static VXML documents that work with dynamically delivered data through the <data> tag or from the CCXML document. Unfortunately, VXML 2.0/2.1 is pretty inflexible in this respect. Pavel *Pavel Cenek* CEO OptimSys logo cenek@optimsys.com <mailto:cenek@optimsys.com> Tel: +420 511 205 391 Fax: +420 541 143 066 http://www.optimsys.com <http://www.optimsys.com/> OptimSys, s.r.o. JIC | Innovation park U Vodárny 2 61600 Brno Czech Republic On 29.5.2014 1:13, Ales Dolecek (Europe) wrote: > > Hello, > > this can be elegantly solved on the web application server. Once you > know the language you submit it to WAS and it shall render further > VoiceXML documents with proper language in the <vxml> element. You can > have multiple prompts in the document for different languages and only > change the root vxml element. Taking your example the server shall output > > For Spanish: > > <vxml … *xml:lang="es"*> > > … > > <prompt xml:lang="es"> > > <s><value expr="'$' + thisAmount"/></s> > > </prompt> > > <prompt xml:lang="en"> > > <s><value expr="'$' + thisAmount"/></s> > > </prompt> > > … > > </vxml> > > Or for English: > > <vxml … *xml:lang="en"*> > > … > > <prompt xml:lang="es"> > > <s><value expr="'$' + thisAmount"/></s> > > </prompt> > > <prompt xml:lang="en"> > > <s><value expr="'$' + thisAmount"/></s> > > </prompt> > > … > > </vxml> > > The interpreter will play only prompts that match language of the document. > > Generally: Writing voice application with only static VoiceXML documents > is usually not feasible. Maybe fixed menu. But the real-world > applications in 99% require dynymic generation of VoiceXML – starting > from template documents and filling just little pieces (like above) > ending with servers that generate VoiceXML on-fly form dynamic models > edited by GUIs. > > Ales > > > Aleš Doleček > Senior Consultant > Dimension Data Czech Republic > Tel: +420 255 770 737 > Mob: +420 737 269 737 > Fax: +420 255 770 120 > Email: ales.dolecek@dimensiondata.com > > Na Hrebenech II 1718/10, Praha 4, Czech republic, 140 00, Czech Republic > > Dimension Data is an NTT Group company. For further information about > Dimension Data, please go to www.dimensiondata.com > <http://www.dimensiondata.com> > Follow us on Social Media Blog <http://blog.dimensiondata.com> Facebook > <http://www.facebook.com/pages/Dimension-Data-Europe/208242309194429> > LinkedIn <http://www.linkedin.com/company/dimension-data> Twitter > <http://twitter.com/DimensionData> > > P Before printing this email please think about the environment > > > <http://www.dimensiondata.com/global/solutions/ucc/index.html> > > Default Banner > > *From:*David Wright [mailto:David.Wright@OntarioSystems.com] > *Sent:* Wednesday, May 21, 2014 8:45 PM > *To:* 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>. >
Received on Monday, 2 June 2014 07:52:27 UTC