@yoda/tts

Synthesizes speech from text for immediate playback.

Classes

TtsRequest
TtsProxy

Methods

(inner) createTts(options) → {module:@yoda/tts~TtsProxy}

Create a TTS instance by the given config.

Parameters:
Name Type Description
options object

the Rokid cloud options

Name Type Description
key string

the key

secret string

the secret

deviceId string

the device id

deviceTypeId string

the device type id

Fires:
Returns:
Type:
module:@yoda/tts~TtsProxy
Example
var tts = require('@yoda/tts').createTts({ ... })
tts.speak('hello yoda!', () => {
  console.log('tts is complete')
})