My 2 cents on the topic, command line one-liners:
-
on Win using
PowerShell.exePowerShell -Command "Add-Type –AssemblyName System.Speech; (New-Object System.Speech.Synthesis.SpeechSynthesizer).Speak('hello');" -
on Win using
mshta.exemshta vbscript:Execute("CreateObject(""SAPI.SpVoice"").Speak(""Hello"")(window.close)") -
on OSX using
saysay "hello" -
Ubuntu Desktop (>=2015) using native
spd-sayspd-say "hello" -
on any other Linux
- refer to How to text-to-speech output using command-line?
- commandline function using google TTS (wget to mp3->mplayer)
- command using google with mplayer directly:
/usr/bin/mplayer -ao alsa -really-quiet -noconsolecontrols "http://translate.google.com/translate_tts?ie=UTF-8&client=tw-ob&q=Hello%20World&tl=en";
-
on Raspberry Pi, Win, OSX (or any remote) using Node-Red
npm i node-red-contrib-sysmessage