baidu-speech-synthesizer
Play sound from text in browser using Baidu TTS Service
Usage
let bss = let speaker = bss speaker
Quick Start
API
new BDSSpeechSynthesizer()
Creates a new BDSSpeechSynthesizer
instance.
.speak(text[, speechOptions[, playerOptions]])
Play the sound of text, return the speaker.
- text:
String
text to be speak. - speechOptions:
Object
optional
Speech synthesizer Config. - playerOptions:
Object
optional
Player Config.- autoplay:
boolean
Play the sound right now, Defaultstrue
.
- autoplay:
.stop()
Stop the player of this instance.