Module: watson-speech/text-to-speech/synthesize

(require("watson-speech/text-to-speech/synthesize"))(options) → {Audio}

Synthesize and play the supplied text over the computers speakers.

Creates and returns a HTML5 <audio> element

Parameters:
Name Type Description
options Object
Properties
Name Type Attributes Default Description
token String

auth token

text String

text to speak

voice String <optional>
en-US_MichaelVoice

what voice to use - call getVoices() for a complete list.

X-WDC-PL-OPT-OUT Number <optional>
0

set to 1 to opt-out of allowing Watson to use this request to improve it's services

autoPlay Boolean <optional>
true

automatically play the audio

element DOMAudioElement <optional>

Source:
See:
Returns:
Type
Audio