Skip to content

MQTT service for text to speech with external program using the Hermes protocol

License

Notifications You must be signed in to change notification settings

DanielWe2/rhasspy-tts-cli-hermes

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rhasspy TTS Hermes MQTT Service

Continous Integration GitHub license

Implements hermes/tts functionality from Hermes protocol using any of the following command-line text to speech systems:

  • eSpeak
    • espeak --stdout
  • flite
    • flite -o /dev/stdout -t
  • PicoTTS
    • pico2wave.sh (in bin)
  • MaryTTS
    • marytts.sh 'http://localhost:59125/process' {lang} (in bin)

Use --play-command aplay to play speech locally instead of using hermes/audioServer<siteId>/playBytes.

Running With Docker

docker run -it rhasspy/rhasspy-tts-cli-hermes:<VERSION> <ARGS>

Building From Source

Clone the repository and create the virtual environment:

git clone https://github.com/rhasspy/rhasspy-tts-cli-hermes.git
cd rhasspy-tts-cli-hermes
make venv

Run the bin/rhasspy-tts-cli-hermes script to access the command-line interface:

bin/rhasspy-tts-cli-hermes --help

Building the Debian Package

Follow the instructions to build from source, then run:

source .venv/bin/activate
make debian

If successful, you'll find a .deb file in the dist directory that can be installed with apt.

Building the Docker Image

Follow the instructions to build from source, then run:

source .venv/bin/activate
make docker

This will create a Docker image tagged rhasspy/rhasspy-tts-cli-hermes:<VERSION> where VERSION comes from the file of the same name in the source root directory.

NOTE: If you add things to the Docker image, make sure to whitelist them in .dockerignore.

Command-Line Options

usage: rhasspy-tts-cli-hermes [-h] --tts-command TTS_COMMAND
                              [--play-command PLAY_COMMAND] [--host HOST]
                              [--port PORT] [--siteId SITEID] [--debug]

optional arguments:
  -h, --help            show this help message and exit
  --tts-command TTS_COMMAND
                        Text to speech command to execute with text as an
                        argument
  --play-command PLAY_COMMAND
                        Command to play WAV data from stdin (default: publish
                        playBytes)
  --host HOST           MQTT host (default: localhost)
  --port PORT           MQTT port (default: 1883)
  --siteId SITEID       Hermes siteId of this server
  --debug               Print DEBUG messages to the console

About

MQTT service for text to speech with external program using the Hermes protocol

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 50.7%
  • Shell 32.6%
  • Makefile 14.3%
  • Dockerfile 2.4%