We have moved at community.getvera.com

Author Topic: [FIXED] Google TTS engine is no more working  (Read 40644 times)

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Google TTS is now protected against robot and automation systems
« Reply #30 on: July 30, 2015, 10:12:19 am »
Ivona is using chunked data to provide the audio file.It is apparently not compatible with wget that we use until now to get the audio file. So implementing the use of this new engine would probably be more difficult and require more lua code.

Offline michelhamelin

  • Full Member
  • ***
  • Posts: 162
  • Karma: +3/-1
Re: Google TTS is now protected against robot and automation systems
« Reply #31 on: July 30, 2015, 10:42:26 pm »
Thanks to this, I've installed MaryTTS (http://mary.dfki.de/) on my Raspberry PI (that was only running the Hue Server for the Amazon ECHO Workaround). This is for those that don't have a 24/7 Mac server running. Hopefully it helps :D

Here's what I did (Full Steps).

1. SSH into Raspberry PI

$ cd Downloads
$ wget https://github.com/marytts/marytts/releases/download/v5.1/marytts-5.1.zip
Unzip the application to the /usr/bin directory

$ sudo unzip marytts-5.1.zip -d /opt
At this point it will not run unless the you have already installed Java 1.7 you can determine the current version of Java by executing:

$ java -version
Install the required version of Java (also add openjdk-7-jdk if you intend to do any java development):

$ sudo apt-get install openjdk-7-jre
After installing the new java runtime (jre) it will still not be the default. To set the new jre to your default use:

$ sudo update-alternatives --config java

Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java 1061 auto mode
1 /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java 1061 manual mode
2 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 1051 manual mode

Press enter to keep the current choice
  • , or type selection number: 2

Having selected option 2 the java version should return something similar to:

$ java -version
java version "1.7.0_65"
OpenJDK Runtime Environment (IcedTea 2.5.1) (7u65-2.5.1-5~deb7u1)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)
The runtime package delivers the scripts necessary to run the MaryTTS Server, which can be used via a browser of the client to synthesize speech. The server can be launched with:

$ /opt/marytts-5.1/bin/marytts-server.sh
This can then be used either through a browser or via the MaryTTS Client. The browser address will be:

http://(RaspPI_IP):59125
The MaryTTS Client, which is a Java GUI can be launched with:

$ /opt/marytts-5.1/bin/marytts-client.server
Launch the Server

2. Edit L_SonosTTS.LUA (Download Apps -> Develop Apps -> Luup files)

- edit the SAY_EXECUTE variable, replace the 5th line with the Google URL to:

http://(RaspPI_IP):59125/process?INPUT_TYPE=TEXT&OUTPUT_TYPE=AUDIO&FAKE=%s&INPUT_TEXT=%s&LOCALE=en_US&AUDIO=WAVE_FILE

* Please replace the (RaspPI_IP) with your device IP and make sure to put them inside the quotes.

- Upload, replace, restart LUUP.

3. Test and enjoy! Congrats, you're done. No more relying on other TTS servers.


Please Can you Post  L_SonosTTS.LUA  corrected put the correction in capital letters
Thanks

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Google TTS is now protected against robot and automation systems
« Reply #32 on: July 31, 2015, 01:52:15 am »
MaryTTS and Microsoft Translator should be available very soon, I am working on it since yesterday.
Maybe today  or tomorrow...

Offline RHINESEL

  • Sr. Member
  • ****
  • Posts: 359
  • Karma: +25/-10
Re: Google TTS is now protected against robot and automation systems
« Reply #33 on: July 31, 2015, 08:12:48 am »
Thank you!  I actually miss Vera talking to me. #firstworldproblems

Offline JS007

  • Sr. Member
  • ****
  • Posts: 319
  • Karma: +1/-3
Re: Google TTS is now protected against robot and automation systems
« Reply #34 on: July 31, 2015, 04:56:49 pm »
https://support.google.com/websearch/answer/86640?hl=en

hmmm, sounds like they did this to block Hola traffic and inadvertently blocked this site too

glad this thread was here, save me from researching and thinking new vera release broke my system

who knows google may fix on their end too, as sure many apps blind people use are also effected

« Last Edit: July 31, 2015, 05:17:17 pm by JS007 »

Offline JS007

  • Sr. Member
  • ****
  • Posts: 319
  • Karma: +1/-3
« Last Edit: August 01, 2015, 01:34:48 am by JS007 »

Offline JuniorJedi

  • Full Member
  • ***
  • Posts: 112
  • Karma: +3/-1
Re: Google TTS is now protected against robot and automation systems
« Reply #36 on: August 01, 2015, 04:24:54 am »
+1



Quote


Please Can you Post  L_SonosTTS.LUA  corrected put the correction in capital letters
Thanks

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Google TTS is now protected against robot and automation systems
« Reply #37 on: August 01, 2015, 05:57:46 am »
I just committed changes. You can now use 2 new engines. Please switch to the 2 new topics.

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Google TTS is now protected against robot and automation systems
« Reply #38 on: August 01, 2015, 06:07:03 am »
not sure if this helps anyone with a fix

but someone posted this online

https://github.com/zaf/asterisk-googletts/commit/ee23da1863a47733bef6a2aa57d3947787ca9985

got the link from this article

https://mojolingo.com/blog/2015/importance-of-vendor-relationships-in-apis/

I will take a look. Maybe just changing the user agent in the request header could help...


The most important is that a good alternative (Microsoft) is now vailable. 8) So solving Google problem is less urgent.

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Google TTS is now protected against robot and automation systems
« Reply #39 on: August 01, 2015, 07:18:46 am »
The result of the wget command run by the plugin is:

wget: server returned error: HTTP/1.1 503 Service Unavailable

Offline lakewoodjazz

  • Jr. Member
  • **
  • Posts: 53
  • Karma: +1/-0
Re: Google TTS is now protected against robot and automation systems
« Reply #40 on: August 01, 2015, 09:11:22 am »
I posted an FYI  in another thread but perhaps this is a better location.
Sonos tech support said their new update requires any sonos file to have a bandwidth of 16k minimum. He felt that is why Vera says "success" to a Google tts scene yet silence interrupts any streaming music. The say mp3 we are sending may be at a bandwidth of 16k or below.  I hope this helps because I miss my talking house. As a newbie to the forum I want to thank everyone for all the info you share so graciously.

Offline BOFH

  • Sr. Hero Member
  • ******
  • Posts: 2409
  • Karma: +112/-140
Re: Google TTS is now protected against robot and automation systems
« Reply #41 on: August 01, 2015, 09:54:54 am »
Thanks Lolodomo. Next time I see a sale on Sonos I'll have to get me one. Trying to avoid using Google as much as possible as they have enough on me already. :)
Vera3 UI5 UI7 Edge Plus
Trane TZEMT400AB32 | Schlage BE369 FE599 | GE 45601 45602 45603 45604 45606 45609 45631 | Intermatic HA01C HA03C HA05C HA07C CA600 CA3000 | Aeon DSC06106 | Telguard GDC1 | Foscam FI8910W FI8905W FI9821W | D-Link 930L | Wanscam JW0011 | ZModo ZPIBH13W

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Google TTS is now protected against robot and automation systems
« Reply #42 on: August 01, 2015, 02:50:55 pm »
not sure if this helps anyone with a fix

but someone posted this online

https://github.com/zaf/asterisk-googletts/commit/ee23da1863a47733bef6a2aa57d3947787ca9985

got the link from this article

https://mojolingo.com/blog/2015/importance-of-vendor-relationships-in-apis/

You are the best.

I have found in this code that several parameters were added in the HTTP request. And believe me, it works again 8)
I just need now to understand the meaning of these parameters "total", "idx", "client", ...

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: [FIXED] Google TTS engine is no more working
« Reply #43 on: August 02, 2015, 06:00:35 am »
I finally fixed the problem with Google API by just adding "&client=Vera" in the request !
Google TTS is back.

You have to update from this link: http://code.mios.com/trac/mios_sonos-wireless-music-systems/browser/trunk
You have to upload 4 files: I_Sonos1.xml + J_Sonos1.js + L_SonosTTS.lua + S_Sonos1.xml. Take them from the ZIP file.

As a bonus, you will discover that now you have languages per country in the UI, for example British Englsh and American English.
That is available for Google TTS, Microsoft Translator TTS and MaryTTS.
In scenes, use for example en-US or fr-CA. Of course you can continue using fr or en.
« Last Edit: August 02, 2015, 04:30:09 pm by lolodomo »

Offline wezley69

  • Sr. Member
  • ****
  • Posts: 289
  • Karma: +6/-6
Re: [FIXED] Google TTS engine is no more working
« Reply #44 on: August 02, 2015, 12:51:00 pm »
I restored my system back to a few days before Google translation broke.  I then uploaded the new files you listed.  I checked the settings on the device and all looked fine.  From the TTS page I can't get the test to work.  Attached is the log.

Edit:  Working now.  Removed entire plugin, located latest zip 221.
« Last Edit: August 02, 2015, 07:12:33 pm by wezley69 »