speechd
is a wrapper around tts systems
festival
is the thing that speaks
sudo apt-get install speech-dispatcher festival -y
See which voices are available:
spd-say --list-synthesis-voices
Say something:
spd-say "I am a computer"
Say something in a scottish accent:
spd-say --synthesis-voice en-scottish "I am scottish"
Chromium should use speechd
when the --enable-speech-dispatcher
flag is used. But it doesn't :-(
If it did work then you should be able to get the list of voices via JS:
speechSynthesis.getVoices()
And speaking like:
speechSynthesis.speak(new SpeechSynthesisUtterance('Am I webscale?'))