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

Hello @JimT ,

I was looking for a solution like this, thanks. Could this be implemented in rules dsl, or jyhron as well?

Thanks again for your help.

Best regards.

You could call Audio.playStream in any supported language.

Alternatively check out mimic tts (although I couldn’t make it work myself)

Hello again,

Thank you very much for your input.

I am going to give it a go.

Best regards.