Examples of speakPlainText()


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

            synthesizer.getSynthesizerProperties().setVoice(voice);

      /* The the synthesizer to speak and wait for it to
             * complete.
             */
      synthesizer.speakPlainText("Hello world!", null);
      synthesizer.waitEngineState(Synthesizer.QUEUE_EMPTY);
     
      /* Clean up and leave.
             */
      synthesizer.deallocate();
View Full Code Here

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

      // 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);

      synthesizer1.speakPlainText("Now listen to me count!", null);
      synthesizer1.speakPlainText("1 2 3 4 5 6 7 8 9 10.", null);
View Full Code Here

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

        "The funny thing is, I do not have a tongue.", null);
      synthesizer1.speakPlainText(
    "Hey Alan, what time is it where you are right now?", null);
      synthesizer1.waitEngineState(Synthesizer.QUEUE_EMPTY);

      synthesizer2.speakPlainText(
        "the time is now twenty past six.", null);
      synthesizer2.waitEngineState(Synthesizer.QUEUE_EMPTY);

      synthesizer1.speakPlainText("Is that the exact time?", null);
      synthesizer1.waitEngineState(Synthesizer.QUEUE_EMPTY);
View Full Code Here

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

      synthesizer2.waitEngineState(Synthesizer.QUEUE_EMPTY);

      synthesizer1.speakPlainText("Is that the exact time?", null);
      synthesizer1.waitEngineState(Synthesizer.QUEUE_EMPTY);

      synthesizer2.speakPlainText("Almost", null);
      synthesizer2.waitEngineState(Synthesizer.QUEUE_EMPTY);

      synthesizer1.speakPlainText(
    "Is it twenty past six In the morning or the evening?", null);
      synthesizer1.waitEngineState(Synthesizer.QUEUE_EMPTY);
View Full Code Here

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

      synthesizer1.speakPlainText(
    "Is it twenty past six In the morning or the evening?", null);
      synthesizer1.waitEngineState(Synthesizer.QUEUE_EMPTY);

      synthesizer2.speakPlainText("in the morning.", null);
      synthesizer2.waitEngineState(Synthesizer.QUEUE_EMPTY);

      synthesizer1.speakPlainText(
        "Alan and I can talk at the same time", null);
      synthesizer1.waitEngineState(Synthesizer.QUEUE_EMPTY);
View Full Code Here

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

      synthesizer1.speakPlainText(
        "Alan and I can talk at the same time", null);
      synthesizer1.waitEngineState(Synthesizer.QUEUE_EMPTY);

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

      synthesizer1.speakPlainText( "That is a bit confusing.", null);
      synthesizer1.speakPlainText( "Well, thanks. This was fun.", null);
View Full Code Here

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

            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

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

                  break;
              }
          }
          synth.getSynthesizerProperties().setVoice(voice);
          synth.resume();
          synth.speakPlainText(text, null);
          synth.waitEngineState(Synthesizer.QUEUE_EMPTY);
          synth.deallocate();
 
      } catch(Exception ex) {
          String message = " missing speech.properties in " + System.getProperty("user.home") + "\n";
View Full Code Here

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

            synthesizer.resume();
            desc = (SynthesizerModeDesc) synthesizer.getEngineModeDesc();
            Voice voices[] = desc.getVoices();
            for (Voice v : voices) {
                synthesizer.getSynthesizerProperties().setVoice(v);
                synthesizer.speakPlainText("good job", null);
                synthesizer.waitEngineState(0x10000L);
            }
            synthesizer.deallocate();
        } catch (Exception ex) {
            ex.printStackTrace();
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.