speak-promise
v1.0.2
Published
Promisify `speechSynthesis.speak`
Downloads
16
Maintainers
Readme
speak-promise
- Demo
- Return
Promise
when usingspeechSynthesis.speak
to speak theSpeechSynthesisUtterance
instance.
Description
pending
when has not actually been spoken.resolve
when has already been spoken.end
event ofSpeechSynthesisUtterance
reject
when error occurs.error
event ofSpeechSynthesisUtterance
Usage
$ npm install speak-promise
import speakPromise from 'speak-promise'
let msg = new SpeechSynthesisUtterance('Hello world')
speakPromise(msg).then(/*do something*/) // ES6
await speakPromise(msg) // ES7