I am trying to get the googletts bundle working. On my first try, I have been redirected to the google /sorry/ page, so I tried the new URL “client=openhab”-parameter mentioned in this post. https://groups.google.com/forum/#!topic/openhab/Sb8CuHDDCBk
It seems to work now, since I can’t see the redirect anymore. However, there is still an error which I can’t explain:
[WARN ] [.i.m.i.tts.TTSServiceGoogleTTS] - Error while connecting to Google translate service
java.io.IOException: Server returned HTTP response code: 503 for URL: http://translate.google.com/translate_tts?tl=de&q=Test&client=openHAB
Opening the URL in the browser works fine. I am using a raspberry pi 2 and I got the speaker connected via audio cable. Openhab is installed in Version 1.7.1 and the system is up to date.
Any ideas on this?
I’m seeing the same behavior. Have not confirmed this is absolutely true, but if I disable the service for a day or so, the error goes away for 10-20 more TTS commands…
A good news, I found a service that can substitue the google one : http://www.voicerss.org/api/ as this service is returning a voice file by calling an url with some parameters it has the same behaviour as the google tts. Here is the parameters that worked for me:
1- create your API key by registering to the site
2-enter the following parameters into your openhab.cfg
googletts:language=fr-fr
googletts:translateUrl=https://api.voicerss.org/?key=YOUR API KEY HERE&hl=%s&src=%s
3- enjoy
Don’t forget to have the google TTS binding installed
This is a great find @1technophile - I am going to update the Squeezebox action binding to allow the option to use this service since the Google TTS service is next to useless these days.
Thats great news Ben! I have been waiting for the Squeezebox action to get fixed again. Can it be set to have a line in the openhab.cfg file, something like squeeze:speak.url=https://api.voicerss.org/?key=XXXXXXXXXX&hl=%s&src=%s
so that the actions binding doesn’t need to be fixed whenever a TTS service quits working.
Yep - that is exactly how I intend to implement it. I have got a test version running now which I will test for a few days before submitting a PR for this change.
I haven’t got much time at the moment unfortunately. I have knocked up a temp version of the Squeezebox action binding using the new VoiceRSS service and it is working pretty good.
It is not as quick as Google was with generating the translations, so there is a delay of a second or two, but the voice is reasonably natural sounding and it seems to be handling the simple cases I am throwing at it.
I am away this weekend again but hopefully should have something ready for committing in a week or so. Apologies for the delay, life has gotten very busy all of a sudden!
also looking forward to be able to configure the TTS URL in the binding … I’ve also looked into alternatives to be less dependent on 3rd party services like google TTS (or any other). Also did some of the users mention they do not like to transmit data to the web for text to speech.
It’s in an early stage and only works on windows …
Once we can configure the URL in the binding I’ll give it a test with the squeezebox action - currently I only experimented with the browser (http://127.0.0.1:8089/Service/TTS?text=).
@Nicola_Reina This looks pretty interesting. to my mind having a local TTS engine seems like a good idea.
Do you have any details of how you handled the integration with Openhab. i.e. did you somehow configure it to read urls and return a wav like the google TTS service, or did you do it some other way.
BTW I Stumbled across some info about installing on Jessie and that these packages are now available:
I completely agree - a local TTS service makes a lot more sense. VoiceRSS is working ok in my test setup (sorry it is a very busy time of year I haven’t had a chance to code it up properly yet) but the delay is noticeable, especially when announcing long sentences that have to handled in two requests (VoiceRSS only allows up to 100 chars per request).
I am going to look into a ttspico and see if I can get that working. Would love to be free of these online services!
Hi I installed it locally using the instructions at the link .
I have not yet integrated it but in the end it could just be a matter of using exec binding…
I mean you do not have to have any wav file you just pass the sentence to speak to the command and… it speaks
I spent some time today playing around with pico2wave and building a simple PHP script to replicate what the Google TTS service does. Had some reasonable success, instructions below.
You should be able to run this on a local server (using apache or the like) and then point your Google TTS binding to this URL. It expects two parameters in the URL - language (e.g. en-GB) and message to translate.
Installation
install the necessary dependencies (pico2wave, lame)
I am using this in my hacked Squeezebox speak action (which I have hardcoded to call this URL) and it is nice and quick and the GB voice is quite fluid and sounds really good IMO.