hiddentao/google-tts

Determine usefulness of this library

Closed this issue · 8 comments

The main downside to this library is that it can't be used to add text-to-speech capability to any arbitrary site because Google's server checks the referrer header when requests are made and presumably only returns an audio file when requests are made from browsers visiting its own sites (e.g. translate.google.com).

This library is useful for browser extensions and possible Cordova/Phonegap projects but I'm not sure there's an elegant way get it working on a remotely-hosted site.

Perhaps this needs to be made clear in the documentation and the library need to be tested in the above mentioned scenarios to make sure that it actually does work there.

Hello,

In my case, i'm working on a "JARVIS" assistant, and want to add a webchat with the AI by websocket. Actually the webchat works but only with text.
I added the x-speech input, and now I have a speech to text support on the webchat.
My goal is to play the content returned on my websocket playing with google tts. Actually I did a quick and dirty hack to use google tts, but your library seems more sexy than my crappy piece of code.
So for each answer, the browser speaking with websocket do a query to google tts, and didn't had problem with tts by now.

So you're running this from localhost or local file url? As in, is it
working when accessed from a remotely hosted server?
On Apr 24, 2013 4:06 PM, "Julien Syx" notifications@github.com wrote:

Hello,

In my case, i'm working on a "JARVIS" assistant, and want to add a webchat
with the AI by websocket. Actually the webchat works but only with text.
I added the x-speech input, and now I have a speech to text support on the
webchat.
My goal is to play the content returned on my websocket playing with
google tts. Actually I did a quick and dirty hack to use google tts, but
your library seems more sexy than my crappy piece of code.
So for each answer, the browser speaking with websocket do a query to
google tts, and didn't had problem with tts by now.


Reply to this email directly or view it on GitHubhttps://github.com//issues/8#issuecomment-16913086
.

I ran it from localhost (twistd server), from localfile and from a nginx server (http://www.lettresauxcons.com/google-tts/) and works great for me.

I tried your link and it worked for me, at least in Safari. That's really great because it means we might be able to use this on any website. I need to investigate some more.

Nope, live demo not working anymore. Google server cancels the request.

Your example link doesn't work anymore either. I'm not sure what's up. When I take call the generated URL directly it works - so as expected Google's server ignores/cancels the request if it can see the URL referrer and thus know that the request is not from a Google service.

For now I think this lib is useful if you're building browser plugins which will run locally and/or if you're building Phonegap apps.