new TextToSpeechV1(options)
Watson Text to Speech service
Parameters:
| Name | Type | Description |
|---|---|---|
options |
- Source:
Methods
addWord(params, callback)
Add a word to a custom voice model
Adds a single word and its translation to the specified custom voice model. A custom model can contain no more than 20,000 entries.
An example call could be
myTextToSpeech.addWord({
customization_id: '
Parameters:
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object |
Properties
|
||||||||||||
callback |
function |
- Source:
addWords(params, callback)
Add words to a custom voice model
Adds one or more words and their translations to the specified custom voice model. A custom model can contain no more than 20,000 entries.
An example of params.words could be:
[ {"word":"NCAA", "translation":"N C double A"}, {"word":"iPhone", "translation":"I phone"} ]
Parameters:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object |
Properties
|
|||||||||
callback |
function |
- Source:
createCustomization(params, callback)
Creates a new empty custom voice model
Response looks like:
{ "customization_id": "abc996ea-86ca-482e-b7ec-0f31c34e5ee9" }
Parameters:
| Name | Type | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object |
Properties
|
||||||||||||||||||||
callback |
function |
- Source:
deleteCustomization(params, callback)
Delete a custom voice model
Parameters:
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
params |
Object |
Properties
|
||||||
callback |
function |
- Source:
deleteWord(params, callback)
Deletes a single word from the specified custom voice model.
Parameters:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object |
Properties
|
|||||||||
callback |
function |
- Source:
getCustomization(params, callback)
Get a custom voice model
Lists all information about the specified custom voice model. 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. Only the owner of a custom voice model can use this method to query information about the model.
Example response:
{ "words": [ { "word": "NCAA", "translation": "N C double A" }, { "word": "iPhone", "translation": "I phone" } ], "owner": "53fd7517-af0d-849d-801b-6e042a5d2f22", "created": 1461173032106, "language": "en-US", "last_modified": 1461173033323, "customization_id": "53506a62-6861-41f5-9a44-352047edcf6f", "name": "First cURL Test Update", "description": "First customization test via cURL update" }
Parameters:
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
params |
Object |
Properties
|
||||||
callback |
function |
- Source:
getCustomizations(paramsopt, callback)
List custom voice models
Lists metadata such as the name and description for all custom voice models that you own for all languages. Specify a language to list the voice models that you own for the specified language only.
Example response:
{ "customizations": [ { "owner": "53fd7517-af0d-849d-801b-6e042a5d2f22", "language": "en-US", "created": 1461173032707, "customization_id": "a4df11a9-7cf9-48e8-8319-08fb7c3b1aa8", "name": "Second cURL Test", "description": "Second customization test via cURL", "last_modified": 1461173032707 }, { "owner": "53fd7517-af0d-849d-801b-6e042a5d2f22", "language": "en-US", "created": 1461173032106, "customization_id": "53506a62-6861-41f5-9a44-352047edcf6f", "name": "First cURL Test Update", "description": "First customization test via cURL update", "last_modified": 1461173033323 } ] }
Parameters:
| Name | Type | Attributes | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object |
<optional> |
Properties
|
||||||||
callback |
function |
- Source:
getWord(params, callback)
Get the translation for a single word from the specified custom model.
Example output:
{ "translation": "ackles" }
Parameters:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object |
Properties
|
|||||||||
callback |
function |
- Source:
getWords(params, callback)
List words
Lists all of the words and their translations for the specified custom voice model. The output shows the translations as they are defined in the model.
Example response:
{
"words": [
{
"word": "NCAA",
"translation": "N C double A"
},
{
"word": "iPhone",
"translation": "I phone"
},
{
"word": "EEE",
"translation": "
Parameters:
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
params |
Object |
Properties
|
||||||
callback |
function |
- Source:
pronunciation(params)
Returns the phonetic pronunciation for the specified word.
Parameters:
| Name | Type | Description | |||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object |
Properties
|
- Source:
synthesize(params, callback)
Streaming speech synthesis of the text in a query parameter
Parameters:
| Name | Type | Description | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object |
Properties
|
||||||||||||||||||||||||||||||
callback |
function |
- Source:
updateCustomization(params, callback)
Update voice model
Updates information for the specified custom voice model. 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.
An example of params.words could be:
[ {"word":"NCAA", "translation":"N C double A"}, {"word":"iPhone", "translation":"I phone"} ]
Parameters:
| Name | Type | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object |
Properties
|
||||||||||||||||||||
callback |
function |
- Source:
voice(params)
Retrieves information about the specified voice
Parameters:
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object |
Properties
|
- Source:
voices(params, callback)
Retrieves the voices available for speech synthesis
Parameters:
| Name | Type | Description |
|---|---|---|
params |
Object | |
callback |
function |
- Source: