Skip to content


Folders and files

Last commit message
Last commit date

Latest commit



52 Commits

Repository files navigation

Looking for a new maintainer. Please contact me when interested.


This plugin provides Text-to-Speech (TTS) functionality to Pimatic


  • Provides a rule action allowing Pimatic to speak text over connected speakers
  • Currently supports the cloud based Google TTS API and Pico2Wave on Linux for offline TTS
  • Device approach holding the config allows for shorter action definitions, as most config will always be the same. You can configure several devices each holding a different output config.
  • Device approach also allows for greater flexibility from a development perspective
  • Plugin has been created to easily plugin other TTS platforms in future, as well as audio output devices
  • Audio output to connected audio devices is achieved by streaming PCM audio to the ALSA backend on Debian/Ubuntu

Rule syntax and examples:


Say "text with $pimatic-variables" using TTSDevice

  • TTSDevice - determines the Text-to-Speech device to use for speech synthesis.


  • when trigger: $activity is "wakeup" then Say "Goodmorning everyone! I have set the home for waking up comfortably." using google-tts-device

Installation and Configuration:

Install prerequisites as needed for your system:

  • ALSA

  • Alsa.h (Needed for compiling modules on which pimatic-tts depends)

  • mpg321

  • lame

  • Pico2Wave (For using offline Text-To-Speech)

    sudo apt-get install libttspico0 libttspico-utils libttspico-data alsa-utils

Raspbian / Debian example to install prerequisites: Google TTS : sudo apt-get install alsa-utils mpg123 lame libasound2-dev Pico2Wave: sudo apt-get install libttspico0 libttspico-utils libttspico-data alsa-utils


  • Install Pimatic-tts via the Pimatic frontend (preferred), activate the plugin and restart Pimatic
  • Alternatively add it to the Plugin section of your config.json (be sure to stop Pimatic before making modifications!):
  "plugin": "tts",
  "active": true


Known issues:

  • Google cloud limits the length of a TTS text string to 200 characters (should be sufficient for most use cases)
  • Pimatic-tts (Google TTS API) requires an internet connection (which likely is the case already as you want to install the plugin)


  • V0.0.1 - Initial version providing speech synthesis using the Google TTS API


  • Implement an offline voice synthesizer next to the existing Google API
  • Implement the ability to deliver speech through network connected devices (We should dream, shouldn't we)