public class TextToSpeech extends WatsonService
FORWARD_SLASH| Constructor and Description |
|---|
TextToSpeech()
Instantiates a new text to speech.
|
| Modifier and Type | Method and Description |
|---|---|
List<Voice> |
getVoices()
Gets the voices.
|
InputStream |
synthesize(String text,
String format)
Synthesize text using format.
|
InputStream |
synthesize(String text,
Voice voice)
Synthesize text using a voice.
|
InputStream |
synthesize(String text,
Voice voice,
String format)
Synthesize text using a voice and format.
|
execute, executeRequest, executeWithoutResponse, getApiKey, getDefaultContentType, getDefaultRequestParams, getEndPoint, getHttpClient, getThreadSafeClient, setApiKey, setAuthentication, setEndPoint, setUsernameAndPassword, toStringpublic InputStream synthesize(String text, Voice voice, String format)
text - the textvoice - the voiceformat - the output formatpublic InputStream synthesize(String text, Voice voice)
text - the text to synthesizevoice - the voicepublic InputStream synthesize(String text, String format)
text - the text to synthesizeformat - the format, it needs to be an audio mime type, for example:
audio/wav or audio/ogg; codecs=opusCopyright © 2015. All rights reserved.