TTS (text to speech) for node.js. send text from node.js to your speakers.
npm install say
var say = require'say'// no callback, fire and forgetsayspeak'Alex' 'whats up, dog?';// use default voice in System Preferencessayspeaknull 'Hello!';// no callback, fire and forgetsayspeak'Cellos' 'whats up, dog?';// output some text to the console as the callbacksayspeak'Good News' 'whats up, dog?'console.log'text to speech complete';;// try using translate.js with say.jsvar translate = require'translate';translatetext'Yo quero tacos por favor'sayspeak'Alex' result;;
Linux support involves the use of Festival, which uses decidedly less friendly names for its voices. Voices for
Festival sometimes need to be installed separately - you can check which voices are available by starting up Festival in interactive mode, typing
TAB. Then take the name of the voice you'd like to try, minus the parentheses, and pass it in to say.js.
say.speak() calls are asynchronous, lol ^_^
Mac OS (comes with say) or Linux with Festival