Package javax.speech.synthesis

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


      }

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

            /* Choose the voice.
             */
            desc = (SynthesizerModeDesc) synthesizer.getEngineModeDesc();
            Voice[] voices = desc.getVoices();
View Full Code Here


        });
      }
     
      System.out.println("And here we go!");
      synthesizer1.resume();
      synthesizer2.resume();
     
      // speak the "Hello world" string
      synthesizer1.speakPlainText("Hello! My name is Kevin.", null);
      synthesizer1.speakPlainText("I am a die phone synthesizer", null);
      synthesizer1.speakPlainText("I have a friend named Alan.", null);
View Full Code Here

      synthesizer1.speakPlainText("I have a friend named Alan.", null);
      synthesizer1.speakPlainText("Listen to him count!", null);

      // get synth2 ready to speak
      synthesizer2.waitEngineState(Synthesizer.ALLOCATED);
      synthesizer2.resume();

      synthesizer1.waitEngineState(Synthesizer.QUEUE_EMPTY);
      synthesizer2.speakPlainText("1 2 3 4 5 6 7 8 9 ten", null);

      synthesizer2.waitEngineState(Synthesizer.QUEUE_EMPTY);
View Full Code Here

            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) {
            e.printStackTrace();
View Full Code Here

                  voice = entry;
                  break;
              }
          }
          synth.getSynthesizerProperties().setVoice(voice);
          synth.resume();
          synth.speakPlainText(text, null);
          synth.waitEngineState(Synthesizer.QUEUE_EMPTY);
          synth.deallocate();
 
      } catch(Exception ex) {
View Full Code Here

            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);
                synthesizer.speakPlainText("good job", null);
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.