public class TextToSpeech extends WatsonService
InputStreamdefaultHeaders, MESSAGE_CODE, MESSAGE_ERROR, skipAuthentication, VERSION| Constructor and Description |
|---|
TextToSpeech()
Instantiates a new text to speech.
|
TextToSpeech(String username,
String password)
Instantiates a new text to speech service by username and password.
|
| Modifier and Type | Method and Description |
|---|---|
ServiceCall<Void> |
deleteCustomVoiceModel(CustomVoiceModel model)
Deletes the given CustomVoiceModel (requires a valid id to be set).
|
ServiceCall<Void> |
deleteWord(CustomVoiceModel model,
CustomTranslation translation)
Deletes a custom word translation.
|
ServiceCall<CustomVoiceModel> |
getCustomVoiceModel(String id)
Gets the meta data of a specific CustomVoiceModel.
|
ServiceCall<List<CustomVoiceModel>> |
getCustomVoiceModels(String language)
Gets all meta data of the CustomVoiceModels that you own.
|
ServiceCall<Pronunciation> |
getPronunciation(String word,
Voice voice,
Phoneme phoneme)
Returns the phonetic pronunciation for the
word specified. |
ServiceCall<Voice> |
getVoice(String voiceName)
Gets the voice based on a given name.
|
ServiceCall<List<Voice>> |
getVoices()
Gets the voices.
|
ServiceCall<List<CustomTranslation>> |
getWords(CustomVoiceModel model)
Gets all customized word translation of the given CustomVoiceModel.
|
ServiceCall<CustomVoiceModel> |
saveCustomVoiceModel(CustomVoiceModel model)
Saves a CustomVoiceModel.
|
ServiceCall<Void> |
saveWords(CustomVoiceModel model,
CustomTranslation... translations)
Saves or updates custom word translations.
|
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. |
ServiceCall<InputStream> |
synthesize(String text,
Voice voice,
AudioFormat audioFormat,
String customizationId)
Synthesize text using a
Voice and AudioFormat. |
configureHttpClient, createServiceCall, getApiKey, getEndPoint, getName, getToken, processServiceCall, setApiKey, setAuthentication, setDefaultHeaders, setEndPoint, setSkipAuthentication, setUsernameAndPassword, toStringpublic ServiceCall<List<Voice>> getVoices()
Voicepublic ServiceCall<Voice> getVoice(String voiceName)
voiceName - the voice nameVoicepublic ServiceCall<Pronunciation> getPronunciation(String word, Voice voice, Phoneme phoneme)
word specified.word - The word for which the pronunciation is requested.voice - the voice to obtain the pronunciation for the specified word in the language of that voice.phoneme - the phoneme set in which to return the pronunciationPronunciationpublic 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 AudioFormatpublic ServiceCall<InputStream> synthesize(String text, Voice voice, AudioFormat audioFormat, String customizationId)
Voice and AudioFormat.text - the textvoice - the voiceaudioFormat - the AudioFormatcustomizationId - the customization IDpublic ServiceCall<List<CustomVoiceModel>> getCustomVoiceModels(String language)
language - the language (e.g. "en-us")public ServiceCall<CustomVoiceModel> getCustomVoiceModel(String id)
id - the customization id of the CustomVoiceModelpublic ServiceCall<CustomVoiceModel> saveCustomVoiceModel(CustomVoiceModel model)
model - the model to be savedpublic ServiceCall<Void> deleteCustomVoiceModel(CustomVoiceModel model)
model - the modelpublic ServiceCall<List<CustomTranslation>> getWords(CustomVoiceModel model)
model - the VoiceModelpublic ServiceCall<Void> saveWords(CustomVoiceModel model, CustomTranslation... translations)
model - the CustomVoiceModeltranslations - the translations to be saved or updatedpublic ServiceCall<Void> deleteWord(CustomVoiceModel model, CustomTranslation translation)
model - the CustomVoiceModeltranslation - the translationCopyright © 2015–2016 IBM Watson. All rights reserved.