new TextToSpeechV1(options)
Parameters:
| Name |
Type |
Description |
options |
|
|
- Source:
Methods
createCustomizations()
new customization features
Summary of API calls
API Number Method API URL Description
API-01 POST /api/v1/customizations Create new custom model
API-02 GET /api/v1/customizations?language="en-US" List custom models for a language
API-03 DELETE /api/v1/customizations/{customization_id} Delete custom model
API-04 GET /api/v1/customizations/{customization_id}?
Query contents of custom model (optionally converts IPA to SPR phones)
API-05 POST /api/v1/customizations/{customization_id} Update contents of custom model, including adding one or more words
API-06 PUT /api/v1/customizations/{customization_id}/words/{word} Add a single word to custom model
API-07 POST /api/v1/customizations/{customization_id}/words Add one or more words to custom model
API-08 GET /api/v1/customizations/{customization_id}/words/{word} Query details for a word in custom model
API-09 GET /api/v1/customizations/{customization_id}/words List contents of words in custom model
API-10 DELETE /api/v1/customizations/{customization_id}/words/{word} Delete single word from custom model
API-11 GET /api/v1/pronunciation?text=aword&voice=voiceModel&format=ipa|spr Gets the IPA (or optionally the SPR) pronunciation of a given word for a given voice model (default=en-US_MichaelVoice)
TTS API Implementation
- Source:
pronunciation(params)
Returns the phonetic pronunciation for the specified word.
Parameters:
| Name |
Type |
Description |
params |
Object
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
text |
String
|
|
|
a single word |
format |
String
|
<optional>
|
ipa
|
Supported formats are ipa, spr for US English, or spr for other languages |
voice |
String
|
<optional>
|
|
Defaults to en-US_MichaelVoice unless a customization_id is specified. Do not specify both a voice and a customization_id |
customization_id |
String
|
<optional>
|
|
do not specify both a voice and a customization_id |
|
- Source:
synthesize(params, callback)
Streaming speech synthesis of the text in a query parameter
Parameters:
| Name |
Type |
Description |
params |
Object
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
text |
String
|
|
|
|
voice |
String
|
<optional>
|
en-US_MichaelVoice
|
Call .voices() for a complete list |
accept |
String
|
<optional>
|
audio/ogg;codecs=opus
|
Supported formats are audio/ogg;codecs=opus, audio/wav, audio/flac, audio/l16, audio/basic |
X-Watson-Learning-Opt-Out |
Boolean
|
<optional>
|
|
|
customization_id |
String
|
<optional>
|
|
|
|
callback |
function
|
|
- Source:
voice(params)
Retrieves information about the specified voice
Parameters:
| Name |
Type |
Description |
params |
Object
|
Properties
| Name |
Type |
Attributes |
Description |
voice |
String
|
|
|
customization_id |
String
|
<optional>
|
|
|
- Source:
voices(params, callback)
Retrieves the voices available for speech synthesis
Parameters:
| Name |
Type |
Description |
params |
Object
|
|
callback |
function
|
|
- Source: