Closed introlinux closed 8 years ago
Does this only happen when reading from a file? Have you tried passing a string to the script directly (e.g. simple_google_tts en "hello world"
)
If none of that works edit the script and remove the following expression in line 240:
> /dev/null 2>&1
If speak.pl produces any error messages you will be able to see them thereafter.
Ok, it is a Google problem. This is the out of speak.pl:
line: hola qué tal
sentence[0]: hola qué tal
URL: http://translate.google.com/translate_tts?tl=es&q=+hola+qué+tal&total=1&idx=0&client=t
Wide character in print at /usr/local/bin/speak.pl line 386,
I can use the script once a day. It's a shame, because it worked very well and I was using for a child who can not learn to read. I will use pico option, although it sounds worse :-/
Thanks for making me aware of the problem. I've run a few tests and I think I think I might've found a solution (53f0217aa3dd44bca3da8645a69e96be3b9b69ca). Please give the latest version a try and see if it works for you.
Nevermind, please disregard my last message. I thought I had fixed the problem, but it turns out my router just performed a random IP reset while I was working on the script (thus lifting the rate limitation for a brief moment). It looks like this one won't be easy to solve. I'll be keeping a look-out for a possible solution, but at the moment I can't promise I'll be able to find one. I wonder if this also affects all the other projects that are based on Google translate. In theory it should, but maybe it's worth giving these a try anyway?
Would it be possible to add an exception and if Google rejects the translation automatically jump to pico tts?
Probably, but I don't think it would be worth the effort. With current limitations in place the script can perform 3 or 4 requests at most before it gets timed out by Google. That's about 1 or 2 sentences.
For the time being I think I'll just update the README with a recommendation to use the pico back-end while I figure something out about the issue with Google translate.
Ok, please give the latest version a try. I think I might have found a solution (be4f187c5382c34fc38ef2d110e97639bfec26b5). Seems to work fine for me so far (though I haven't performed any extensive tests, yet).
It seems to work ok even with long texts, many many thanks. :-)
Awesome, great to hear that. I'll mark this issue as closed now.
It stopped working suddenly, this is the output: simple_google_tts es /tmp/file.txt Reading from text file. Using Google for TTS synthesis. Synthesizing virtual speech. Processing 1 out of 2 paragraphs
And that's all, no more messages and no sounds and continues running indefinitely.