Page 1 of 2
Speech Output Network synthesis problem with new Google TTS
Posted: 09 Mar 2019 02:59
by vnk
After updating to the latest version of Google Text-to-Speech app (5 March 2019), the action Speech Output is unable to produce any sound most of time time. This only happens when Systhesis type is set to Network (Embedded type still works normally). The behaviour is as below:
- Rarely there is speech output as normal
- Most of the time, there is no sound when the Speech Output action is executing, and there is no error in the log
- Sometimes there is no sound but there is the error message in the log:
Bundle: unavailableVoicesunavailableVoices=, ], availableVoicesavailableVoices=tur-tur, availableVoices=sun-idn, availableVoices=vie-vnm, availableVoices=kan-ind, availableVoices=ita-ita, availableVoices=jpn-jpn, availableVoices=deu-deu, availableVoices=nob-nor, availableVoices=por-bra, availableVoices=swe-swe, availableVoices=ell-grc, availableVoices=tel-ind, availableVoices=mar-ind, availableVoices=eng-aus, availableVoices=zho-twn, availableVoices=ces-cze, availableVoices=spa-esp, availableVoices=spa-usa, availableVoices=fra-can, availableVoices=nld-nld, availableVoices=nep-npl, availableVoices=est-est, availableVoices=por-prt, availableVoices=tha-tha, availableVoices=eng-ind, availableVoices=ben-ind, availableVoices=zho-chn, availableVoices=fil-phl, availableVoices=eng-gbr, availableVoices=fin-fin, availableVoices=hin-ind, availableVoices=ukr-ukr, availableVoices=ron-rou, availableVoices=rus-rus, availableVoices=kor-kor, availableVoices=eng-usa, availableVoices=khm-khm, availableVoices=tam-ind, availableVoices=ben-bgd, availableVoices=yue-hkg, availableVoices=hun-hun, availableVoices=pol-pol, availableVoices=jav-idn, availableVoices=urd-pak, availableVoices=fra-fra, availableVoices=sin-lka, availableVoices=guj-ind, availableVoices=dan-dnk, availableVoices=mal-ind, availableVoices=slk-svk, availableVoices=ind-idn, ] resultCode: 1
After uninstalling the update of Google Text-to-Speech (revert to original version 3.15.18.200023596 bundled in ROM), everything works normally. Maybe some newer versions also can work.
Xiaomi Mi A2, Android 9, 5Dec18 security patch
Re: Speech Output doesn't work with latest Google Text-to-Sp
Posted: 09 Mar 2019 14:40
by Martin
Hi,
I can reproduce the problem on my device. It looks like the TTS network feature does not work reliably at the moment.
I see following error in the system log of the device:
2019-03-09 15:21:46.455 13134-13857/? E/TTS.NetworkSynthesizer: ExecutionException during NetworkFetchTask
java.util.concurrent.ExecutionException: clx: RESOURCE_EXHAUSTED: Quota exceeded for quota metric 's3-sessions' and limit 's3-session-limit' of service 'speechs3proto2-pa.googleapis.com' for consumer 'project_number:529030122437'.
at java.util.concurrent.FutureTask.report(FutureTask.java:123)
...
This is a Google internal project so I assume that Google will increase the limitation when the operation guys notice the problem.
You could try to check option 'Embedded' which will likely not use the network and should therefore work more reliably.
Maybe the old version of the TTS engine does not support the network mode yet which would explain why it works.
Regards,
Martin
Re: Speech Output doesn't work with latest Google Text-to-Sp
Posted: 09 Mar 2019 14:59
by vnk
Martin wrote:Hi,
I can reproduce the problem on my device. It looks like the TTS network feature does not work reliably at the moment.
I see following error in the system log of the device:
2019-03-09 15:21:46.455 13134-13857/? E/TTS.NetworkSynthesizer: ExecutionException during NetworkFetchTask
java.util.concurrent.ExecutionException: clx: RESOURCE_EXHAUSTED: Quota exceeded for quota metric 's3-sessions' and limit 's3-session-limit' of service 'speechs3proto2-pa.googleapis.com' for consumer 'project_number:529030122437'.
at java.util.concurrent.FutureTask.report(FutureTask.java:123)
...
This is a Google internal project so I assume that Google will increase the limitation when the operation guys notice the problem.
You could try to check option 'Embedded' which will likely not use the network and should therefore work more reliably.
Maybe the old version of the TTS engine does not support the network mode yet which would explain why it works.
Regards,
Martin
Thanks for the fast response.
Your suggestion to fall back to embedded synthesis is working for both old and new version of Google TTS, but I feel that the intonation is a bit machine-like, so I will stick with the old version of Google TTS and use Network synthesis option (hopefully they will not block the old version). I'm not sure if the old version of Google TTS really supports network mode or not, but there is noticeable difference between network and embedded mode.
Please help me to edit the misleading title of the thread; I cannot add more words to it due to the character limit.
Re: Speech Output doesn't work with latest Google Text-to-Sp
Posted: 09 Mar 2019 15:45
by Martin
Maybe Google already supported the network mode in the old TTS versions but changed the implementation in one of the latest TTS releases and now runs into the S3 session limit.
I'll improve the error handling so that such errors will not go unnoticed in the future. The API does not provide the error reason to the app but now at least allows the app to know that something went wrong.
How would you like to change the title?
Re: Speech Output doesn't work with latest Google Text-to-Sp
Posted: 09 Mar 2019 15:59
by vnk
how about "Speech Output Network synthesis doesn't work with latest Google Text-to-Speech"
Re: Speech Output Network synthesis problem with new Google
Posted: 11 Mar 2019 14:42
by Desmanto
Maybe the new version now reflect the new quotas here :
https://cloud.google.com/text-to-speech/quotas
There is limit 5000 chars per request, max 300 requests per minute and 150.000 chars per minute. Whenever any one of these is reached, error raised. The limitation can still change from time to time.
I personally use vocalizerEx2 for long time already (offline). You can download it from xda, follow the instruction from OP to download and install the voices.
https://forum.xda-developers.com/showth ... st76941998
The voice is much better than google TTS, but of course now have been surpassed by google Wavenet. Google wavenet now is still more expensive. Hopefully someone will make the offline version of the wavenet in the future.
Re: Speech Output Network synthesis problem with new Google
Posted: 11 Mar 2019 15:24
by vnk
Thanks for pointing out the limit.
After a quick glance I see that the limit applies to the API key given to the app developer instead of the IP address of each end user, maybe that's why the limit is reached quickly. Also I see that there is a link to request for rasing the quota/limit, it may worth a try.
Or probably it's much better that each end user can opt to input his own API key to use this feature.
I've just installed VocalizerEx2, let me try it for a few days, thanks for your suggestion.
It's a bit off topic, but which voice is the best in your opinion?
Re: Speech Output Network synthesis problem with new Google
Posted: 11 Mar 2019 20:46
by Martin
The API key used in the TTS app is the one from Google TTS and is not related to Automagic so the developers of the Google TTS app have to raise the limit.
It seems that other apps are encountering the same issue so I assume that a solution will become available soon.
Re: Speech Output Network synthesis problem with new Google
Posted: 12 Mar 2019 01:31
by vnk
Thanks for the clarification. I'll check Google TTS once in a while and update when it returns to normal.
Re: Speech Output Network synthesis problem with new Google
Posted: 12 Mar 2019 15:51
by Desmanto
For now, Google wavenet is the best, but there is no offline version yet and the cloud API is very expensive and not practical for our flow building. Then comes the nuance vocalizer and ivona TTS. I prefer nuance because it has more variety for other languages outside Europe. I can use Indonesian, Japanese, Korean, Chinese and many more.
Just download it from
https://vocalizer-nvda.com/downloads, pick the premium high version. It is bigger in size, but it is more expressive when reading out paragraph. The difference between the plus and premium high is plus seems to read word by word, but premium high read the whole sentence. You can test it and hear the difference.