An offline (non cloud-based) TTS that sounds quite good

I found an offline TTS solution that sounds quite good: opentts. I can play it on Google nest speakers quite easily.

Example (make sure to try coqui-tts-ljspeech): OpenTTS Voice Samples

To use it, I set up a docker container for opentts using docker-compose:

    image: synesthesiam/opentts:en
    container_name: opentts
    command: --cache --no-espeak
      - 5500:5500

To use it in my rules: (example in jruby):

require 'cgi'

# This overrides the jruby library's `say` method that calls OpenHAB's TTS Voice.say
def say(msg, voice: 'coqui-tts:en_ljspeech')
  msg = CGI.escape(msg)
  url = "{voice}&text=#{msg}"

say "Hello, I'm your new offline TTS voice"

It would be great if coqui-tts can be added to openhab as a TTS engine

1 Like