Package javax.speech.synthesis

Examples of javax.speech.synthesis.Synthesizer.allocate()


    System.exit(1);
      }

      /* Get the synthesizer ready to speak
             */
      synthesizer.allocate();
      synthesizer.resume();

            /* Choose the voice.
             */
            desc = (SynthesizerModeDesc) synthesizer.getEngineModeDesc();
View Full Code Here


    System.exit(1);
      }

      System.out.print("  Allocating synthesizers...");
      synthesizer1.allocate();
      synthesizer2.allocate();

      /* get general domain synthesizer ready to speak
             */
      System.out.print("Loading voices...");
      synthesizer1.getSynthesizerProperties().setVoice(kevinHQ);
View Full Code Here

                    "com.sun.speech.freetts.en.us.cmu_us_kal.KevinVoiceDirectory");

            Central.registerEngineCentral("com.sun.speech.freetts.jsapi.FreeTTSEngineCentral");
            Synthesizer synthesizer =
                    Central.createSynthesizer(new SynthesizerModeDesc(Locale.US));
            synthesizer.allocate();
            synthesizer.resume();
            synthesizer.speakPlainText("Can you hear me now?", null);
            synthesizer.waitEngineState(Synthesizer.QUEUE_EMPTY);
            synthesizer.deallocate();
        } catch (Exception e) {
View Full Code Here

          Central.registerEngineCentral("com.sun.speech.freetts.jsapi.FreeTTSEngineCentral");
 
          SynthesizerModeDesc desc = new SynthesizerModeDesc(null, "general", Locale.US, null, null);
 
          Synthesizer synth = Central.createSynthesizer(desc);
          synth.allocate();
          desc = (SynthesizerModeDesc) synth.getEngineModeDesc();
          Voice[] voices = desc.getVoices();
          Voice voice = null;
          for (Voice entry : voices) {
              if(entry.getName().equals(voiceName)) {
View Full Code Here

                    Locale.US, null, null);
            Synthesizer synthesizer = Central.createSynthesizer(desc);
            if (synthesizer == null) {
                System.exit(1);
            }
            synthesizer.allocate();
            synthesizer.resume();
            desc = (SynthesizerModeDesc) synthesizer.getEngineModeDesc();
            Voice voices[] = desc.getVoices();
            for (Voice v : voices) {
                synthesizer.getSynthesizerProperties().setVoice(v);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.