This document was generated from CDN thread
Created by: Rakesh Ameta on 23-06-2009 08:38:27 AM
I am trying to set sayItSmart Audios dynamically through a java method but it does not play anything when I test it in call flow. Here is the code I am using.
/////////////////////////////////////////////START OF CODE //////////////////////////////////////////////////////////////
private final static String AudiumSayItSmartDigit = "com.audium.sayitsmart.plugins.AudiumSayItSmartDigit";
public static void playDigits(VoiceElementConfig defaults, VoiceElementConfig.AudioGroup audioGroup, ElementAPI elementAPI, Object data)throws AudiumException{
String inputFormat = "number";
String outputFormat = "digits";
VoiceElementConfig.SayItSmart sayItSmartAudioItem = defaults.new SayItSmart(AudiumSayItSmartDigit, inputFormat, outputFormat, data);
sayItSmartAudioItem.setUseDefaultAudioPath(false);
sayItSmartAudioItem.setUseRecordedAudio(true);
sayItSmartAudioItem.setAudioPath((String)elementAPI.getSessionData("SystemDefaultAudioPath"));
audioGroup.addAudioItem(sayItSmartAudioItem);
}
////////////////////////////////////////////////END OF CODE //////////////////////////////////////////////////////////////
I am able to add the static audios dynamically but SayItSmart audios are turning painful as of now. Please suggest.
Subject: RE: Problems adding SayItSmart Audios through java code
Replied by: Janine Graves on 23-06-2009 02:15:35 PM
Regarding SayItSmart Audios through java code: Before the addAutioItem step you need to specify the fileset to use, for example, 'sayItSmartAudioItem.setFileset("standard");' and the audio type sayItSmartAudioItem.setAudioType("wav");' . Also, are you ever performing the step that adds the audio group to the 'defaults' config object - something like this 'defaults.setAudioGroup(audioGroup); ' I don't see it in your code and you have to, but perhaps you are doing that step outside of this code snippet.
Janine
www.TrainingTheExperts.com
Subject: RE: Problems adding SayItSmart Audios through java code
Replied by: Juned Ahsan on 22-07-2009 12:02:35 PM
Hey,
Using SayItSmart audios dynamically requires additional settings in comparision to normal audios dynamic usage.
You should set
'sayItSmartAudioItem.setFileset("standard");' or 'sayItSmartAudioItem.setFileset("enhanced");' according to your fileset
and
'sayItSmartAudioItem.setAudioType("wav");'
I hope you are setting rest of the things right.
Cheers!
Juned