Showing 6 results.
Items per Page 50
of 1

CVP Forum

« Back to CVP - All Versions

Problems adding SayItSmart Audios through java code

Combination View Flat View Tree View
Threads [ Previous | Next ]
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.

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

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