In testing out multi-language capabilities using the N9 ASR, I wanted to make sure that I'm actually hitting the es-US ASR properly: While the code & grammar execute just fine, the logs for both "current" and "recent" calls don't output anything that confirms whether the code below invokes the English or Spanish ASR:
== DIALOG.xml ==
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1" application="appRoot.xml" xml:lang="en-US">
<form id="enterTask">
<field name="issueType">
<grammar type="application/srgs+xml" srcexpr="'spanGram.grxml'"/>
<audio expr="'Spanish-enterInput.wav'"/>
<filled/>
</field>
</form>
</vxml>
== spanGram.gxml ==
Code: Select all
<?xml version="1.0"?>
<grammar type="application/srgs+xml" root="DETAIL_RULE" mode="voice" xml:lang="es-US">
<rule id="DETAIL_RULE">
<one-of>
<item>bañera</item>
</one-of>
</rule>
</grammar>
My question: From the documents above, the vxml file uses the default en-US ASR. Is it sufficient to specify an xml:lang="es-US" within the external grammar file to switch to Spanish ASR in this case, or:
a) Is it required that I also specify es-US when I call the grammar within the vxml document?
b) Is it required that I set the xml:lang within the <vxml> tag?
If you guys can shed some light on this, it would be greatly appreciated. I'd also make a suggestion to consider outputting log lines that makes this a bit more clear to developers, as I'd imagine that others might find this to be useful as well.
Thanks,
Matt