Author Message
PrasanthGottipati
Joined: Jan 3, 2022
Messages: 2
Offline
Hello,

I have a dynamic prompt where we are adding vocab ids using "GetVerbiageList.getInstance().addPrompts(promptElementArraylist,promptId, mySession);"

if the audio file is not available on the server it plays TTS with the voice(female) added on AEP without issue. My need is I set multiple voices male/female on AEP, we want to be able to control when to use each voice from the application side.

For example: for the list of MDNs/Phone numbers to play male voice and for others play in a female voice if the audio file is not available on server dynamically.

Since I need it only on audio files not available not sure how to mention or use the voice SSML tag as it works for only TTS element.

Please help me.
Thank you.
WilsonYu
Joined: Nov 6, 2013
Messages: 3937
Offline
You could override the updatePrompt method in the prompt's java class like the following. Just add logic to determine the attribute of the voice tag to use. That's how you wrap the phrase with the voice ssml tag.

@Override
public void updatePrompt(SCESession mySession) {
com.avaya.sce.runtime.Format format = null;
format = new com.avaya.sce.runtime.Format();
format.add("gender","male");
add(1, new com.avaya.sce.runtime.PromptElement(com.avaya.sce.runtime.PromptElement.XML_TAG_BEGIN,"voice", format));
add(1, new com.avaya.sce.runtime.PromptElement(com.avaya.sce.runtime.PromptElement.PHRASESET,"ps:test",false));
add(1, new com.avaya.sce.runtime.PromptElement(com.avaya.sce.runtime.PromptElement.XML_TAG_END,"voice"));
}
PrasanthGottipati
Joined: Jan 3, 2022
Messages: 2
Offline
Thank you for your response,

My phraseset is also dynamic it doesn't have any phrases added. so I tried to like

add(1, new com.avaya.sce.runtime.PromptElement(com.avaya.sce.runtime.PromptElement.PHRASESET,"ps",false));

But it still playing with a female voice.
WilsonYu
Joined: Nov 6, 2013
Messages: 3937
Offline
I don't know how you implement the whole thing. You would have to show more. ultimately, it all depends on the vxml that your app generates based on the code you implement. You can take a look at the vxml generated (given the showxml attribute is enabled in the log setting) in the trace.log to diagnose the problem.
Go to:   
Mobile view