cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
cancel
780
Views
0
Helpful
1
Replies

Is it possible to create Custom SayItSmart AudioItem for VoiceElementConfig using java code?

vincent.zheng
Level 4
Level 4

I have this question because I create a custom SayItSmart plugin to play alpha numeric string. And I saw the java code online that is way to create static Audio like following:

        AudioGroup init_audgrp = cfg.new AudioGroup("initial_audio_group", false);

        StaticAudio tts = cfg.new StaticAudio(prompt, null);
        
        init_audgrp.addAudioItem(tts);
        init_audgrp.setBargein(false);
//cfg is VoiceElementConfig cfg.setAudioGroup(init_audgrp);

And I look at the source code for SayItSmart part, it cannot create the custom type like using following:

            String id = IDs[i -1];
            SayItSmart IDSayItSmart = cfg.new SayItSmart("AlphaNumeric", "com.vincent.sayitsmart.ItspSayItSmartAlphaNumeric", ID);
            init_audioGroup.addAudioItem(policyIDSayItSmart);

When I run that it will throw following exception:

Caused by: com.audium.server.xml.ElementConfigException: There is no Say It Smart plugin of type "AlphaNumeric".

 So is it any way I can create the sayitsmart audio item for voice element config to use?

1 Reply 1

vincent.zheng
Level 4
Level 4

OK, found it. Need to call the constructor for 

public SayItSmart(String aClass, String inputFormat, String outputFormat, String aVarName, boolean aSession)