Package org.luwrain.speech
Interface Channel
public interface Channel
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumstatic interfacestatic final classstatic final class -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Voice[]voidvoidsilence()longspeak(String text, Channel.Listener listener, int relPitch, int relRate, boolean cancelPrevious) Synthesize speech with sending the result to speakers directly.longspeakLetter(char letter, Channel.Listener listener, int relPitch, int relRate, boolean cancelPrevious) synth(String text, OutputStream stream, AudioFormat format, Channel.SyncParams params, Set<Channel.Flags> flags)
-
Method Details
-
close
void close() -
getVoices
Voice[] getVoices() -
getChannelName
String getChannelName() -
getVoiceName
String getVoiceName() -
setVoice
-
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 ignorelistenerargument, if it doesn't supports notifying about finishing the work (synthesizing a speech and its complete playing in computer speakers).- Parameters:
text- A text to speaklistener- 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- Returns:
- 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()
-