1.0.2 • Published 7 years ago
speak-promise v1.0.2
speak-promise
- Demo
- Return
Promisewhen usingspeechSynthesis.speakto speak theSpeechSynthesisUtteranceinstance.
Description
pendingwhen has not actually been spoken.resolvewhen has already been spoken.endevent ofSpeechSynthesisUtterance
rejectwhen error occurs.errorevent ofSpeechSynthesisUtterance
Usage
$ npm install speak-promiseimport speakPromise from 'speak-promise'
let msg = new SpeechSynthesisUtterance('Hello world')
speakPromise(msg).then(/*do something*/) // ES6
await speakPromise(msg) // ES7