openhab-addons/bundles/org.openhab.voice.pipertts
Wouter Born 8672ed0208
Start license headers with /* instead of /** (#18061)
Prevents JavaDoc tooling issues because these tools check comments starting with `/**`.

Signed-off-by: Wouter Born <github@maindrain.net>
2025-01-07 22:33:03 +01:00
..
src/main Start license headers with /* instead of /** (#18061) 2025-01-07 22:33:03 +01:00
NOTICE
pom.xml [pipertts] Fix library load on windows (#17993) 2024-12-28 17:04:31 +01:00
README.md [pipertts] Fix library load on windows (#17993) 2024-12-28 17:04:31 +01:00

Piper Text-to-Speech

This voice service allows you to use the open source library Piper as your TTS service in openHAB. Piper is a fast, local neural text to speech system that sounds great and is optimized for the Raspberry Pi 4.

Supported platforms

The add-on is compatible with the following platforms:

  • linux (armv7l, aarch64, x86_64, min GLIBC version 2.31)
  • macOS (x86_64 min version 11.0, aarch64 min version 13.0)
  • win64 (x86_64 min version Windows 10).

Configuration

Setting up dependencies

The add-on will download the required dependencies at first activation.

If your openHAB installation does not have access to the Internet, you need to download the piper-jni jar file and place it at '<OPENHAB_USERDATA>/piper/'.

Downloading Voice Model Files

You can find the link to the available voices at the Piper README.

Each voice model is composed of two files an onnx runtime model file with extension '.onnx' and a model config file with extension '.onnx.json'. For the add-on to load your voices you need both to be named equal (obviously excluding their extensions).

You should place both voice files at '<OPENHAB_USERDATA>/piper/'. After that the UI should display your available voices at 'Settings / System Settings / Voice'.

Multi Speaker Voices

Models that support multiples speakers are shown as multiple voices in openHAB.

Text to Speech Configuration

Use your favorite configuration UI to edit Settings / Other Services - Piper Text-to-Speech:

  • Preload model - Keep last voice model used loaded in memory, these way it can be reused on next execution if the voice option matches.

Configuration via a text file

In case you would like to setup the service via a text file, create a new file in $OPENHAB_ROOT/conf/services named pipertts.cfg

Its contents should look similar to:

org.openhab.voice.pipertts:preloadModel=true

Default Text-to-Speech Configuration

You can setup your preferred default Speech-to-Text in the UI:

  • Go to Settings.
  • Edit System Services - Voice.
  • Set Piper as Text-to-Speech.
  • Set your Default Voice.

In case you would like to set up these settings via a text file, you can edit the file runtime.cfg in $OPENHAB_ROOT/conf/services and set the following entries:

org.openhab.voice:defaultTTS=pipertts