Watson Developer Cloud Unity SDK
1.0.0
The Unity SDK uses the Watson Developer Cloud services, a collection of REST APIs and SDKs that use cognitive computing to solve complex problems.
|
This class wraps the Text to Speech service. Text to Speech Service More...
Public Member Functions | |
TextToSpeech (Credentials credentials) | |
delegate void | GetVoicesCallback (Voices voices, string customData) |
This callback is used by the GetVoices() function. More... | |
bool | GetVoices (GetVoicesCallback callback, string customData=default(string)) |
Returns all available voices that can be used. More... | |
delegate void | GetVoiceCallback (Voice voice, string customData) |
This callback is used by the GetVoice() function. More... | |
bool | GetVoice (GetVoiceCallback callback, VoiceType?voice=null, string customData=default(string)) |
Return specific voice. More... | |
delegate void | ToSpeechCallback (AudioClip clip, string customData) |
This callback is passed into the ToSpeech() method. More... | |
bool | ToSpeech (string text, ToSpeechCallback callback, bool usePost=false, string customData=default(string)) |
Converts the given text into an AudioClip that can be played. More... | |
delegate void | GetPronunciationCallback (Pronunciation pronunciation, string customData) |
This callback is used by the GetPronunciation() function. More... | |
bool | GetPronunciation (GetPronunciationCallback callback, string text, VoiceType?voice=null, string format="ipa", string customization_id=default(string), string customData=default(string)) |
Returns the phonetic pronunciation for the word specified by the text parameter. You can request the pronunciation for a specific format. You can also request the pronunciation for a specific voice to see the default translation for the language of that voice or for a specific custom voice model to see the translation for that voice model. Note: This method is currently a beta release that supports US English only. More... | |
delegate void | GetCustomizationsCallback (Customizations customizations, string customData) |
This callback is used by the GetCustomizations() function. More... | |
bool | GetCustomizations (GetCustomizationsCallback callback, string customData=default(string)) |
Lists metadata such as the name and description for the custom voice models that you own. Use the language query parameter to list the voice models that you own for the specified language only. Omit the parameter to see all voice models that you own for all languages. To see the words in addition to the metadata for a specific voice model, use the GET /v1/customizations/{customization_id} method. Only the owner of a custom voice model can use this method to list information about the model. Note: This method is currently a beta release that supports US English only More... | |
delegate void | CreateCustomizationCallback (CustomizationID customizationID, string customData) |
Thid callback is used by the CreateCustomization() function. More... | |
bool | CreateCustomization (CreateCustomizationCallback callback, string name, string language=default(string), string description=default(string), string customData=default(string)) |
Creates a new empty custom voice model that is owned by the requesting user. Note: This method is currently a beta release that supports US English only. More... | |
delegate void | OnDeleteCustomizationCallback (bool success, string customData) |
This callback is used by the DeleteCustomization() function. More... | |
bool | DeleteCustomization (OnDeleteCustomizationCallback callback, string customizationID, string customData=default(string)) |
Deletes the custom voice model with the specified customization_id . Only the owner of a custom voice model can use this method to delete the model. Note: This method is currently a beta release that supports US English only. More... | |
delegate void | GetCustomizationCallback (Customization customization, string customData) |
This callback is used by the GetCusomization() function. More... | |
bool | GetCustomization (GetCustomizationCallback callback, string customizationID, string customData=default(string)) |
Lists all information about the custom voice model with the specified customization_id . In addition to metadata such as the name and description of the voice model, the output includes the words in the model and their translations as defined in the model. To see just the metadata for a voice model, use the GET /v1/customizations method. Only the owner of a custom voice model can use this method to query information about the model. Note: This method is currently a beta release that supports US English only. More... | |
delegate void | UpdateCustomizationCallback (bool success, string customData) |
This callback is used by the UpdateCustomization() function. More... | |
bool | UpdateCustomization (UpdateCustomizationCallback callback, string customizationID, CustomVoiceUpdate customVoiceUpdate, string customData=default(string)) |
Updates information for the custom voice model with the specified customization_id . You can update the metadata such as the name and description of the voice model. You can also update the words in the model and their translations. A custom model can contain no more than 20,000 entries. Only the owner of a custom voice model can use this method to update the model. Note: This method is currently a beta release that supports US English only. More... | |
delegate void | GetCustomizationWordsCallback (Words words, string customData) |
This callback is used by the GetCusomizationWords() function. More... | |
bool | GetCustomizationWords (GetCustomizationWordsCallback callback, string customizationID, string customData=default(string)) |
Lists all of the words and their translations for the custom voice model with the specified customization_id . The output shows the translations as they are defined in the model. Only the owner of a custom voice model can use this method to query information about the model's words. Note: This method is currently a beta release that supports US English only. More... | |
delegate void | AddCustomizationWordsCallback (bool success, string customData) |
This callback is used by the AddCustomizationWords() function. More... | |
bool | AddCustomizationWords (AddCustomizationWordsCallback callback, string customizationID, Words words, string customData=default(string)) |
Adds one or more words and their translations to the custom voice model with the specified customization_id . A custom model can contain no more than 20,000 entries. Only the owner of a custom voice model can use this method to add words to the model. Note: This method is currently a beta release that supports US English only. More... | |
delegate void | OnDeleteCustomizationWordCallback (bool success, string customData) |
This callback is used by the DeleteCustomizationWord() function. More... | |
bool | DeleteCustomizationWord (OnDeleteCustomizationWordCallback callback, string customizationID, string word, string customData=default(string)) |
Deletes a single word from the custom voice model with the specified customization_id. Only the owner of a custom voice model can use this method to delete a word from the model. Note: This method is currently a beta release that supports US English only. More... | |
delegate void | GetCustomizationWordCallback (Translation translation, string customData) |
This callback is used by the GetCusomizationWord() function. More... | |
bool | GetCustomizationWord (GetCustomizationWordCallback callback, string customizationID, string word, string customData=default(string)) |
Returns the translation for a single word from the custom model with the specified customization_id . The output shows the translation as it is defined in the model. Only the owner of a custom voice model can use this method to query information about a word from the model. Note: This method is currently a beta release that supports US English only. More... | |
delegate void | AddCustomizationWordCallback (bool success, string customData) |
This callback is used by the AddCustomizationWord() function. More... | |
bool | AddCustomizationWord (AddCustomizationWordCallback callback, string customizationID, string word, string translation, string customData=default(string)) |
Adds a single word and its translation to the custom voice model with the specified customization_id . A custom model can contain no more than 20,000 entries. Only the owner of a custom voice model can use this method to add a word to the model. Note: This method is currently a beta release that supports US English only. More... | |
string | GetServiceID () |
<exclude> More... | |
Properties | |
AudioFormatType | AudioFormat [get, set] |
This property allows the user to set the AudioFormat to use. Currently, only WAV is supported. More... | |
VoiceType | Voice [get, set] |
This property allows the user to specify the voice to use. More... | |
string | Url [get, set] |
Gets and sets the endpoint URL for the service. More... | |
Credentials | Credentials [get, set] |
Gets and sets the credentials of the service. Replace the default endpoint if endpoint is defined. More... | |
This class wraps the Text to Speech service. Text to Speech Service
|
inline |
|
inline |
Adds a single word and its translation to the custom voice model with the specified customization_id
. A custom model can contain no more than 20,000 entries. Only the owner of a custom voice model can use this method to add a word to the model. Note: This method is currently a beta release that supports US English only.
callback | The callback. |
customizationID | The identifier of the custom voice model to be updated. |
words | Words object to add to custom voice model. |
customData | Optional custom data. |
delegate void IBM.Watson.DeveloperCloud.Services.TextToSpeech.v1.TextToSpeech.AddCustomizationWordCallback | ( | bool | success, |
string | customData | ||
) |
This callback is used by the AddCustomizationWord() function.
success | Success |
data | Optional custom data. |
|
inline |
Adds one or more words and their translations to the custom voice model with the specified customization_id
. A custom model can contain no more than 20,000 entries. Only the owner of a custom voice model can use this method to add words to the model. Note: This method is currently a beta release that supports US English only.
callback | The callback. |
customizationID | The identifier of the custom voice model to be updated. |
words | Words object to add to custom voice model. |
customData | Optional custom data. |
delegate void IBM.Watson.DeveloperCloud.Services.TextToSpeech.v1.TextToSpeech.AddCustomizationWordsCallback | ( | bool | success, |
string | customData | ||
) |
This callback is used by the AddCustomizationWords() function.
success | Success |
data | Optional custom data. |
|
inline |
Creates a new empty custom voice model that is owned by the requesting user. Note: This method is currently a beta release that supports US English only.
callback | The callback. |
name | Name of the new custom voice model. |
language | Language of the new custom voice model. Omit the parameter to use the default language, en-US. = ['de-DE', 'en-US', 'en-GB', 'es-ES', 'es-US', 'fr-FR', 'it-IT', 'ja-JP', 'pt-BR']. |
description | Description of the new custom voice model. |
customData | Optional custom data. |
delegate void IBM.Watson.DeveloperCloud.Services.TextToSpeech.v1.TextToSpeech.CreateCustomizationCallback | ( | CustomizationID | customizationID, |
string | customData | ||
) |
Thid callback is used by the CreateCustomization() function.
customizationID | The customizationID. |
data | Optional custom data. |
|
inline |
Deletes the custom voice model with the specified customization_id
. Only the owner of a custom voice model can use this method to delete the model. Note: This method is currently a beta release that supports US English only.
callback | The callback. |
customizationID | The voice model to be deleted's identifier. |
customData | Optional custom data. |
|
inline |
Deletes a single word from the custom voice model with the specified customization_id. Only the owner of a custom voice model can use this method to delete a word from the model. Note: This method is currently a beta release that supports US English only.
callback | The callback. |
customizationID | The voice model's identifier. |
word | The word to be deleted. |
customData | Optional custom data. |
|
inline |
Lists all information about the custom voice model with the specified customization_id
. In addition to metadata such as the name and description of the voice model, the output includes the words in the model and their translations as defined in the model. To see just the metadata for a voice model, use the GET /v1/customizations
method. Only the owner of a custom voice model can use this method to query information about the model. Note: This method is currently a beta release that supports US English only.
callback | The callback. |
customizationID | The requested custom voice model's identifier. |
customData | Optional custom data. |
delegate void IBM.Watson.DeveloperCloud.Services.TextToSpeech.v1.TextToSpeech.GetCustomizationCallback | ( | Customization | customization, |
string | customData | ||
) |
This callback is used by the GetCusomization() function.
customization | |
data |
|
inline |
Lists metadata such as the name and description for the custom voice models that you own. Use the language query parameter to list the voice models that you own for the specified language only. Omit the parameter to see all voice models that you own for all languages. To see the words in addition to the metadata for a specific voice model, use the GET /v1/customizations/{customization_id} method. Only the owner of a custom voice model can use this method to list information about the model. Note: This method is currently a beta release that supports US English only
callback | The callback. |
customData | Optional custom data. |
delegate void IBM.Watson.DeveloperCloud.Services.TextToSpeech.v1.TextToSpeech.GetCustomizationsCallback | ( | Customizations | customizations, |
string | customData | ||
) |
This callback is used by the GetCustomizations() function.
customizations | The customizations |
data | Optional custom data. |
|
inline |
Returns the translation for a single word from the custom model with the specified customization_id
. The output shows the translation as it is defined in the model. Only the owner of a custom voice model can use this method to query information about a word from the model. Note: This method is currently a beta release that supports US English only.
callback | The callback. |
customizationID | The requested custom voice model's identifier. |
word | The requested word. |
customData | Optional custom data. |
delegate void IBM.Watson.DeveloperCloud.Services.TextToSpeech.v1.TextToSpeech.GetCustomizationWordCallback | ( | Translation | translation, |
string | customData | ||
) |
This callback is used by the GetCusomizationWord() function.
translation | Translation of the requested word. |
data | optional custom data. |
|
inline |
Lists all of the words and their translations for the custom voice model with the specified customization_id
. The output shows the translations as they are defined in the model. Only the owner of a custom voice model can use this method to query information about the model's words. Note: This method is currently a beta release that supports US English only.
callback | The callback. |
customizationID | The requested custom voice model's identifier. |
customData | Optional custom data. |
delegate void IBM.Watson.DeveloperCloud.Services.TextToSpeech.v1.TextToSpeech.GetCustomizationWordsCallback | ( | Words | words, |
string | customData | ||
) |
This callback is used by the GetCusomizationWords() function.
customization | |
data |
|
inline |
Returns the phonetic pronunciation for the word specified by the text parameter. You can request the pronunciation for a specific format. You can also request the pronunciation for a specific voice to see the default translation for the language of that voice or for a specific custom voice model to see the translation for that voice model. Note: This method is currently a beta release that supports US English only.
callback | The GetPronunciationCallback |
text | The text string to pronounce. |
voice | Specify a voice to obtain the pronunciation for the specified word in the language of that voice. All voices for the same language (for example, en-US) return the same translation. Do not specify both a voice and a customization_id. Retrieve available voices with the GET /v1/voices method. If this is null, TextToSpeech will default to the set voice. |
format | Specify the phoneme set in which to return the pronunciation. Omit the parameter to obtain the pronunciation in the default format. Either ipa or spr. |
customization_id | GUID of a custom voice model for which the pronunciation is to be returned. You must make the request with the service credentials of the model's owner. If the word is not defined in the specified voice model, the service returns the default translation for the model's language. Omit the parameter to see the translation for the specified voice with no customization. Do not specify both a voice and a customization_id. |
delegate void IBM.Watson.DeveloperCloud.Services.TextToSpeech.v1.TextToSpeech.GetPronunciationCallback | ( | Pronunciation | pronunciation, |
string | customData | ||
) |
This callback is used by the GetPronunciation() function.
pronunciation | The pronunciation strting. |
|
inline |
<exclude>
Implements IBM.Watson.DeveloperCloud.Services.IWatsonService.
|
inline |
Return specific voice.
callback | The callback to invoke with the voice. |
voice | The name of the voice you would like to get. If this is null, TextToSpeech will default to the set voice. |
delegate void IBM.Watson.DeveloperCloud.Services.TextToSpeech.v1.TextToSpeech.GetVoiceCallback | ( | Voice | voice, |
string | customData | ||
) |
This callback is used by the GetVoice() function.
voice | The Voice object. |
|
inline |
Returns all available voices that can be used.
callback | The callback to invoke with the list of available voices. |
delegate void IBM.Watson.DeveloperCloud.Services.TextToSpeech.v1.TextToSpeech.GetVoicesCallback | ( | Voices | voices, |
string | customData | ||
) |
This callback is used by the GetVoices() function.
voices | The Voices object. |
delegate void IBM.Watson.DeveloperCloud.Services.TextToSpeech.v1.TextToSpeech.OnDeleteCustomizationCallback | ( | bool | success, |
string | customData | ||
) |
This callback is used by the DeleteCustomization() function.
success | |
data |
delegate void IBM.Watson.DeveloperCloud.Services.TextToSpeech.v1.TextToSpeech.OnDeleteCustomizationWordCallback | ( | bool | success, |
string | customData | ||
) |
This callback is used by the DeleteCustomizationWord() function.
success | |
data |
|
inline |
Converts the given text into an AudioClip that can be played.
text | The text to synthesis into speech. |
callback | The callback to invoke with the AudioClip. |
usePost | If true, then we use post instead of get, this allows for text that exceeds the 5k limit. |
delegate void IBM.Watson.DeveloperCloud.Services.TextToSpeech.v1.TextToSpeech.ToSpeechCallback | ( | AudioClip | clip, |
string | customData | ||
) |
This callback is passed into the ToSpeech() method.
clip | The AudioClip containing the audio to play. |
|
inline |
Updates information for the custom voice model with the specified customization_id
. You can update the metadata such as the name and description of the voice model. You can also update the words in the model and their translations. A custom model can contain no more than 20,000 entries. Only the owner of a custom voice model can use this method to update the model. Note: This method is currently a beta release that supports US English only.
callback | The callback. |
customizationID | The identifier of the custom voice model to be updated. |
customVoiceUpdate | Custom voice model update data. |
customData | Optional custom data. |
delegate void IBM.Watson.DeveloperCloud.Services.TextToSpeech.v1.TextToSpeech.UpdateCustomizationCallback | ( | bool | success, |
string | customData | ||
) |
This callback is used by the UpdateCustomization() function.
success | Success |
data | Optional custom data. |
|
getset |
This property allows the user to set the AudioFormat to use. Currently, only WAV is supported.
|
getset |
Gets and sets the credentials of the service. Replace the default endpoint if endpoint is defined.
|
getset |
Gets and sets the endpoint URL for the service.
|
getset |
This property allows the user to specify the voice to use.