java - Freetts javax.speech.EngineException -


i using converting text speech send sip application. keep getting error

javax.speech.engineexception: javax.speech.central: no class found com.sun.speech.freetts.jsapi.freettsenginecentral     @ javax.speech.central.registerenginecentral(central.java:706)     @ text2speech.texttospeech.initenglish(texttospeech.java:49)     @ gov.nist.jrtp.test.send_recv.jrtptest.encodertp(jrtptest.java:192)     @ gov.nist.jrtp.test.send_recv.jrtptest.<init>(jrtptest.java:93)     @ org.universaal.samples.sip.exporter.sipexpimpl.<init>(sipexpimpl.java:81)     @ org.universaal.samples.sip.exporter.activator.start(activator.java:20)     @ org.apache.felix.framework.util.secureaction.startactivator(secureaction.java:633)     @ org.apache.felix.framework.felix.activatebundle(felix.java:1817)     @ org.apache.felix.framework.felix.startbundle(felix.java:1734)     @ org.apache.felix.framework.felix.setactivestartlevel(felix.java:1143)     @ org.apache.felix.framework.startlevelimpl.run(startlevelimpl.java:264)     @ java.lang.thread.run(thread.java:745) 

i have included required dependencies , have spent wholw day unable resolve error.

when try run code normal java application works fine.

code:

 public void initenglish(string voicename) {        system.out.println("using voice: " + voicename);            try {               if (desc == null) {                    system.setproperty("freetts.voices", "com.sun.speech.freetts.en.us.cmu_us_kal.kevinvoicedirectory");  //                desc = new synthesizermodedesc(null,"general",    locale.us,null,null);//new synthesizermodedesc(locale.us);                   desc = new synthesizermodedesc(locale.us);                   central.registerenginecentral  ("com.sun.speech.freetts.jsapi.freettsenginecentral"); //                central.registerenginecentral  ("com.sun.speech.engine.synthesis.text.textenginecentral");                    synthesizer = central.createsynthesizer(desc);                   synthesizer.allocate();                   synthesizer.resume();                   voicemanager vm=voicemanager.getinstance();                   voice=vm.getvoice(voicename);                   if(voice!=null)                     {                     voice.allocate();                     }                    freetts=new freetts(voice);                   system.out.println(system.getproperty("user.dir"));                   filelocation =system.getproperty("user.dir");                   audioplayer = new singlefileaudioplayer(filelocation+"/newvoice", type.wave);                   voice.setaudioplayer(audioplayer);                 }          } catch (illegalargumentexception e) {             e.printstacktrace();         } catch (engineexception e) {             e.printstacktrace();         } catch (audioexception e) {             e.printstacktrace();         } catch (enginestateerror e) {             e.printstacktrace();         }     } 


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -