Interface Channel

public interface Channel
  • Method Details

    • close

      void close()
    • getVoices

      Voice[] getVoices()
    • getChannelName

      String getChannelName()
    • getVoiceName

      String getVoiceName()
    • setVoice

      void setVoice(String name)
    • speak

      long speak(String text, Channel.Listener listener, int relPitch, int relRate, boolean cancelPrevious)
      Synthesize speech with sending the result to speakers directly. This methods is always executed asynchronously returning control to the caller immediately. Partial implementation may ignore listener argument, if it doesn't supports notifying about finishing the work (synthesizing a speech and its complete playing in computer speakers).
      text - A text to speak
      listener - A listener object to catch the moment of finishing the speaking (may be null and may be ignord)
      relPitch - Relative value of desired pitch (0 means to use default)
      relPitch - Relative value of desired rate (0 means to use default)
      cancelPrevious - Cancel previous text to speak, if there is any
      An identifier of the accepted task
    • speakLetter

      long speakLetter(char letter, Channel.Listener listener, int relPitch, int relRate, boolean cancelPrevious)
    • synth

      Channel.Result synth(String text, OutputStream stream, AudioFormat format, Channel.SyncParams params, Set<Channel.Flags> flags)
    • silence

      void silence()
    • getSynthSupportedFormats

      AudioFormat[] getSynthSupportedFormats()