Google TTS addon for OH2

I’m sorry for the noob question, i searched but didn’t find the answer.
It is possible to have the same voice as the assistant?

Btw, just today i made some rules for Google home + IFTTT to ask for sensor’s state:awesome!

There are a lot of voices in lots of different languages to choose from. You can also select a number of different voices in the Google Home. I wouldn’t be surprised if at least some of them are the same in the voice API and in the Google Home.

thanks for the reply.
Here in Italy there’s still only one voice for the Assistant! And the closer one, the more similar, to choose in openHab it’s somewhat different. It would be cooler to have the exact same one (especially the default Assistant one, which i find the best).
Thanks anyway!

sorry, i am a liitle bit confused

  1. are we speaking about this add on ?

  1. it’s not supported on raspberry. Please correct me i am wrong


I don’t believe that @gbicskei has merged his version of the plugin, but I could be wrong. You can download the JAR file from a link in my post above.

That is correct, here is a link to the supported platforms

1 Like

I’ve created a PR to remove the native dependencies so the Google TTS addon can be used on any platform :slight_smile: :

If you want to help out testing, here’s a org.openhab.voice.googletts-2.4.0-SNAPSHOT.jar containing the changes.


That’s very cool. Will this require any extra maintenance on the developer side if Google updates the API?


Yes that’s the only downside. But it’s a relatively simple API. If they change the API we might also need to upgrade the library and maybe change how we use it. :wink: So in the end I think it’s worth it also because the bundle size got reduced by 10 MB.

@wborn, thanks i have downloaded the addon but i am still still seeing this error in the log

2018-11-15 10:27:48.714 [INFO ] [.googletts.internal.GoogleTTSService] - Using home folder: /var/lib/openhab2/googletts
2018-11-15 10:27:48.718 [INFO ] [.googletts.internal.GoogleTTSService] - Using cache folder /var/lib/openhab2/cache/org.openhab.voice.googletts
2018-11-15 10:27:48.721 [ERROR] [ce.googletts.internal.GoogleCloudAPI] - The architecture is not x86_64 but ARM_32. Only x86_64 platforms are supported.

Looks like you’re still using the old version because I completely removed the code that checks the architecture. :wink: I think you can fix it by removing the JAR from the addons dir, uninstalling the Google TTS addon using Paper UI and then adding the JAR to the addons dir again.

1 Like

So I hope I don’t get slapped in the face now but:
Is the RPi still not supported? Or have you removed the architecture checks because it is now supported?
I have installed the latest jar on 2.3 stable but get an error when it tries to get the voice list from Google.

Thank you so much for your help and coding :slight_smile:

can you post the error?
I don’t use it on rPi but I recently installed it on my Debian Jessie and maybe I can help to debug

1 Like

Thank you so much! Here is the error:
Seems like it can’t place the http request because of some stuff missing…
My credentials are all set.

2018-11-19 11:09:48.775 [ERROR] [org.openhab.voice.googletts         ] - [org.openhab.voice.googletts.internal.GoogleTTSService(312)] The updateConfig method has thrown an exception
java.lang.NoClassDefFoundError: org/eclipse/smarthome/io/net/http/HttpRequestBuilder
        at org.openhab.voice.googletts.internal.GoogleCloudAPI.listVoices( ~[?:?]
        at org.openhab.voice.googletts.internal.GoogleCloudAPI.initVoices( ~[?:?]
        at org.openhab.voice.googletts.internal.GoogleCloudAPI.setConfig( ~[?:?]
        at org.openhab.voice.googletts.internal.GoogleTTSService.updateConfig( ~[?:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke( ~[?:?]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke( ~[?:?]
        at java.lang.reflect.Method.invoke( ~[?:?]
        at org.apache.felix.scr.impl.inject.BaseMethod.invokeMethod( ~[39:org.apache.felix.scr:2.0.12]
        at org.apache.felix.scr.impl.inject.BaseMethod.access$500( ~[39:org.apache.felix.scr:2.0.12]
        at org.apache.felix.scr.impl.inject.BaseMethod$Resolved.invoke( ~[39:org.apache.felix.scr:2.0.12]
        at org.apache.felix.scr.impl.inject.BaseMethod.invoke( [39:org.apache.felix.scr:2.0.12]
        at org.apache.felix.scr.impl.inject.ActivateMethod.invoke( [39:org.apache.felix.scr:2.0.12]
        at org.apache.felix.scr.impl.inject.ActivateMethod.invoke( [39:org.apache.felix.scr:2.0.12]
        at org.apache.felix.scr.impl.manager.SingleComponentManager.invokeModifiedMethod( [39:org.apache.felix.scr:2.0.12]
        at org.apache.felix.scr.impl.manager.SingleComponentManager.modify( [39:org.apache.felix.scr:2.0.12]
        at org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure( [39:org.apache.felix.scr:2.0.12]
        at org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure( [39:org.apache.felix.scr:2.0.12]
        at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.configurationUpdated( [39:org.apache.felix.scr:2.0.12]
        at org.apache.felix.scr.impl.manager.RegionConfigurationSupport.configurationEvent( [39:org.apache.felix.scr:2.0.12]
        at org.apache.felix.scr.impl.manager.RegionConfigurationSupport$1.configurationEvent( [39:org.apache.felix.scr:2.0.12]
        at$FireConfigurationEvent.sendEvent( [8:org.apache.felix.configadmin:1.8.16]
        at$ [8:org.apache.felix.configadmin:1.8.16]
        at [8:org.apache.felix.configadmin:1.8.16]
        at [8:org.apache.felix.configadmin:1.8.16]
        at [?:?]

hmmm… I am worried that you may have to upgrade to OH 2.4.0 Snapshot to use the testing jar from here: Google TTS addon for OH2

Can you try that?

Unfortunately not, I’m on stable 2.3 and didn’t want to upgrade yet.
But probably that’s the issue so I’ll just leave the google tts aside until I upgrade!

Thank you so much for taking time to have a look!

1 Like

That explains because it depends on the HttpRequestBuilder for creating HTTP requests. The HttpRequestBuilder is only available in 2.4.0-SNAPSHOT. So upgrading to a recent milestone or SNAPSHOT should solve it.


I try install GoogleTTS Addon without platform dependencies and show this errors:

2018-11-25 16:22:11.660 [ERROR] [org.openhab.voice.googletts         ] - bundle org.openhab.voice.googletts: (279)[org.openhab.voice.googletts.internal.GoogleTTSService(28)] : The activate method has thrown an exception

    java.lang.NullPointerException: null
    2018-11-25 16:22:11.699 [WARN ] [org.openhab.voice.googletts         ] - FrameworkEvent WARNING - org.openhab.voice.googletts

    org.osgi.framework.ServiceException: org.apache.felix.scr.impl.manager.SingleComponentManager.getService() returned a null service object

Thanks for help
I have: openHAB 2.4.0~20181119183855-1

did you use the testing jar in your addons folder and uninstalled the one from PaperUI?

Please post full logging and stack traces so we can see when and what code throws the NullPointerException.

Yes, i uninstall Google TTS from PaperUI and install this addon