public class TextToSpeech extends WatsonService
InputStream
MESSAGE_CODE, MESSAGE_ERROR, VERSION
Constructor and Description |
---|
TextToSpeech()
Instantiates a new text to speech.
|
Modifier and Type | Method and Description |
---|---|
ServiceCall<List<Voice>> |
getVoices()
Gets the voices.
|
ServiceCall<InputStream> |
synthesize(String text,
Voice voice)
Synthesize text using a voice.
|
ServiceCall<InputStream> |
synthesize(String text,
Voice voice,
AudioFormat audioFormat)
Synthesize text using a
Voice and AudioFormat . |
configureHttpClient, createServiceCall, getApiKey, getEndPoint, getName, getToken, processServiceCall, setApiKey, setAuthentication, setDefaultHeaders, setEndPoint, setUsernameAndPassword, toString
public ServiceCall<List<Voice>> getVoices()
Voice
public ServiceCall<InputStream> synthesize(String text, Voice voice)
text
- the text to synthesizevoice
- the voicepublic ServiceCall<InputStream> synthesize(String text, Voice voice, AudioFormat audioFormat)
Voice
and AudioFormat
.text
- the textvoice
- the voiceaudioFormat
- the AudioFormat
Copyright © 2015–2016. All rights reserved.