There's no voice like home

Hello,

surly one thing that makes us individuals is our unique voice. So in order to make your smart home really your smart home, why not give it a one-in-a-million voice? With the added benefit of an offline solution whithout need of an internet connection (not to mention extra points for enhanced privacy…)?
Sounds good? Then you should first follow this great tutorial for installing a local TTS Service: https://github.com/openhab/openhab1-addons/wiki/Use-local-TTS-with-squeezebox
Under Ubuntu, this took me roughly 30 Minutes. Finished? “Yes, now I have offline and privacy friendly local TTS…but where is the unique voice? This solution gives me just one voice that all installs share!”, you might ask. Well spotted, and here is the twist:
Now you only need to install three additional packages:

  • espeak
  • mbrola
  • any mbrola voice you fancy(and there are lots of them)
    You can do this by typing:
    sudo apt-get install espeak
    sudo apt-get install mbrola
    sudo apt-get install -insert name of mbrola voice- (sudo apt-cache search mbrola lists all)

Finally you need to change one line in the tts.php script from the tutorial:

// espeak
exec('/usr/bin/espeak -v mb-de4 -s xxx -p xx -w ' . $filewav . ' "' . $msg . '"');
//pico2wave
//exec('/usr/bin/pico2wave -l=' . $lng . ' -w=' . $filewav . ' "' . $msg . '"');

Fiddeling with the parameters, you can individualise the used voice to your taste:
-v : name of mbrola voice to use (german voice de4 in my case)
-s: speed (words per minute) of voice
-p: pitch (from helium squirrel to troll king) of voice

To test the different voices and the effects of the parameters(hours of fun), i installed gespeaker.
I hope you will find this little enhancement usefull.
Best regards,
-OLI

3 Likes

Having just upgraded to OH2 I’m afraid this will not work in OH2!
There seems no way to Link your local TTS as an Voice Engine.
Maybe sometime Google TTS will be included so it can be “hijacked” again.
But until then…

…or until insomnia gets useful: