05-03-2017 07:07 AM
I am in a weird situation, where we are developing CVP application for 3 languages. English /Spanish /Cantonese. The application I am working was developed long ago and I have to add few prompts in Spanish/Cantonese. The application flow is something like this.
1. Start.
2. Read the config file containing the prompts ( This contains English/Spanish and Cantonese).
3. Save the prompts (texts) as session variables. and these are being used as substitutions in the Audio element.
4. This prompts is played using Nuance TTS (vocalizer).
...
...
The application compiles fine. But Spanish and Cantonese prompts are not pronounced correctly. But if I copy the text in Audio element it renders properly. While I am reading the file (in a java class) I use (UTF-8) as encoding. But still Spanish and Cantonese prompts are not properly rendered when I have the text in config file and read into session variable.
I am assuming when I read the international locale into session variables they are not correctly interpreted.
Is there any mechanism to achieve this ??. ( we still use Call studio 9.X)
Thanks,
Raghu
Solved! Go to Solution.
05-03-2017 10:07 AM
Under Project/Properties/CallStudio/General - did you set the Encoding
to UTF-8 there?
It is possible that the java code must be updated to read the file in
the right format...
If you can enter text from the keyboard and it works, but doesn't work
when using variables created from reading a text file - then there's
probably a problem with reading the text file of non-US language characters.
If you use the General tab in the Add to Log box, to write the contents
to the Activity Log for one of your Session Variables that you're trying
to play. Then you can see what VXMLServer is getting - probably
jibberish as you mention.
In that case it leads me to believe you'll need to modify your java code.
05-03-2017 08:23 AM
Whether you are using a variable's value or entering the text directly
in the TTS box shouldn't make a difference. But perhaps somehow the
system isn't detecting that you've switched to a different language when
using variables.
You can use the Application Modifier element
(Elements/Context/AppModifier) in the app to change the "Language"
setting during the callflow to specify which TTS language pack you're
using, like en-US, ko-KO, es-MX, etc - it is specificed by the TTS
system, and you'll match it in the ap. This sets the TTS Server language
to be used. Then the Nuance system will try to use that language pack.
There are other things to try if this doesn't solve the problem.
05-03-2017 08:37 AM
I have tried that (adding Aplicaation modifier and setting the doc Language) . I can see that from nuance log files that lang parameter is sent properly. But in the log file is text sent is totally garbled.. ( one thing is , I remember , I set as es-mx rather than es-MX, not sure if that makes any difference, I will try that tomorrow)
My config file is encoded in "UTF-8". which is also reflected in Nuance logs. But stil it does not work.
Would like try other things....
05-03-2017 08:46 AM
Do you have this configured on the VoiceXML gateway - it was
undocumented but required for non US char sets a year or so ago: *mrcp
client accept-charset-compliance*
05-03-2017 08:54 AM
The only place where es-mx rather than es-MX matters is in the Studio app itself. In an element's Audio tab, you can right-click on the DefaultLanguage tab (half-way down in the window) and select or enter the language that matches (case-sensitive) the Document Language - this allows you to specify alternate audio prompts when this other language has been configured as the document language.
05-03-2017 08:59 AM
More info on using*: *mrcp client accept-charset-compliance
05-03-2017 09:57 AM
I remember I saw that config on the gateway. I will double check . But if that was not there it would not have played properly when I pasted the text.
I was trying to read the same config file outside call studio on my eclipse. When I run the java file it was printing ????????.
Then,I had to change the workspace settings (Window -> Preferences -> General -> Workspace : Text file encoding) changed to UTF-8 from cp1512) to render it properly.
Can we code call studio in UTF-8 ??
05-03-2017 10:07 AM
Under Project/Properties/CallStudio/General - did you set the Encoding
to UTF-8 there?
It is possible that the java code must be updated to read the file in
the right format...
If you can enter text from the keyboard and it works, but doesn't work
when using variables created from reading a text file - then there's
probably a problem with reading the text file of non-US language characters.
If you use the General tab in the Add to Log box, to write the contents
to the Activity Log for one of your Session Variables that you're trying
to play. Then you can see what VXMLServer is getting - probably
jibberish as you mention.
In that case it leads me to believe you'll need to modify your java code.
05-03-2017 10:07 PM
Janine Thank you very much. Its resolved now. I did two changes.
1. I changed the encoding to UTF-8 on the project,
2. The config file is like a properties file. I code was using load(FileInputStream) to load the properties. Here I could not set any encoding. Changed it to load(Reader) method. While constructing reader you can mention the encoding to be used.
InputStreamReader reader = new InputStreamReader( Fileinputstream,"UTF-8"). This trick worked...
Again your suggestions gave me another angle to look into the issue.
--Regards,
Raghu
05-04-2017 06:04 AM
glad you resolved the problem. And thanks for the follow up -I'll save
the info for the future when others have similar issues.
12-21-2021 06:24 AM
Hi Janine,
Sorry for barging into this quite old post, but i have somehow a similar issue:
i am writing a JAVA class that sends a REST API toward an SMS gateway. and the body of the SMS is in Arabic. so i am encoding the body of the message to UTF-8 and i am calling the API. to note that i have changed the project property to have UTF-8 as encoding, and same for the java class property. now if i send english the API Request in english without encoding, it works fine, but whenever i encode the http request to UTF-8, the SMS gateway team is claiming that they are not receiving any traffic from the CVP VXML server.
Appreciate your opinion on this matter.
01-04-2022 07:59 AM
from cisco...
The only way to troubleshoot these things is to examine to actual HTTP request being sent. Check the Content-Type header in particular for charset.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide