Awesome
rhasspy-IBMWatson
Simple shell script to use Watson (IBM's cloud TTS service) in Rhasspy
Based on the jarvis_says.sh script from tschmidty69's Home Assistant config (his was for Snips and used Amazon Polly TTS) with help from this thread on the Rhasspy forums
Nortonko made an adaptation to this script for Microsoft's Azure Speech service : rhasspy-MSAzure
Runs only on Rhasspy 2.5.11 or later
Preparation
- Create an account on IBM Cloud and register for the TTS lite plan here: https://cloud.ibm.com/catalog/services/text-to-speech
- Use the closest location
- You can change the service name
- Keep the defaults otherwise
The lite (free) plan includes 10 000 characters/month which is plenty for personal home use. However, there is a 30 day inactivity limit so simply make sure to request some different commands (text to be spoken) once every so often
- In your dashboard find your service (Menu in top left corner -> Ressource list -> Services and software -> Text to speech)
- Note your APIKEY and URL
Easy Installation
- Run
wget https://raw.githubusercontent.com/Rayz224/rhasspy-IBMWatson/main/install.sh
- Make the install script executable:
chmod a+x install.sh
- Run the script with sudo
sudo ./install.sh
Theses commands can be dangerous because they executes a script from the internet with sudo (root access) so make sure to always check the script before executing them. In this case, the script that is install.sh, I suggest you verify it before running the command. If you do not trust the installation script, follow the manual installation below
- Follow the instructions in the installation script
- For a complete list of the voices availables see https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-voices#listVoices
- Update the Rhasspy TTS settings to Local Command and set Say Program to:
Installation | Say program path |
---|---|
Docker | /profiles/en/rhasspy_watson_says.sh |
Non-docker | /home/${USER}/.config/rhasspy/profiles/en/rhasspy_watson_says.sh |
Manual Installation
- Copy the rhasspy_watson_says.sh file inside your rhasspy profile folder (rhasspy/profiles/en/)
- Update the apikey, url, voice and cache variables
- apikey = Your IBM apikey
- url = Your IBM url
- voice = The IBM voice to use (see https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-voices#listVoices for a complete list) (Example:
en-GB_JamesV3Voice
) - cache = the path to the cache folder:
Installation | Cache path |
---|---|
Docker | /profiles/en/tts/cache/ |
Non-docker | /home/${USER}/.config/rhasspy/profiles/en/tts/cache/ |
- Make the script executable:
chmod a+x /home/${USER}/.config/rhasspy/profiles/en/rhasspy_watson_says.sh
(you might have to run with sudo) - Update the Rhasspy TTS settings to Local Command and set Say Program to:
Installation | Say program path |
---|---|
Docker | /profiles/en/rhasspy_watson_says.sh |
Non-docker | /home/${USER}/.config/rhasspy/profiles/en/rhasspy_watson_says.sh |