say.js
say.js copied to clipboard
Callback doesn't execute
This issue was reported by @ErickWendel.
Apparently, on macOS, the callback doesn't fire when the message is done being spoken. Or, perhaps it runs immediately instead of waiting for the speech to finish.
I can confirm this on Windows, callback runs immediately as the speech starts with following example...
var q = async.queue(function(message, cb) {
say.speak(message, null, null, (err)=>{
if (err) {
return console.error(err)
}
cb();
});
}, 1);
q.push('The birch canoe slid on the smooth planks.');
q.push('The birch canoe slid on the smooth planks.');
q.push('The birch canoe slid on the smooth planks.');
In my case, it works perfectly on windows @krlicmuhamed