google-text-to-speech

targetSdkVersion 26 giving exception in crash reports

╄→гoц情女王★ 提交于 2019-12-02 13:59:10
问题 As per the requirement to update targeted SDK version to 26 by November 2018, I tried to update my gradle file a few months ago and released a new version of my app, after updating both target sdk and compile sdk versions to 26 (from 23) . Within a day, I started observing crashes in my app on my Firebase console. The reason was I was using TTS service in my app, and when targeting to version 26, it looks like it required a new implementation for the TTS service, because of the fatal run-time

How to Predict Failure of Google Text-to-Speech?

南笙酒味 提交于 2019-12-01 08:13:39
On Android, when using a TextToSpeech instance that uses the Google text to speech engine, it seems as though the method isLanguageAvailable() is unreliable. I say this because there are many instances where this method will return "success" (0,1,or 2), but subsequent speak() commands only results in silence. The case I am testing is a Samsung S5 with API 23. It is in airplane mode (no network). I'm assuming that the reason is at least partly because there is no network and therefore it can neither download and install new voices, nor use cloud-based voices. But then shouldn't

Android TTS doesn't speak

风格不统一 提交于 2019-11-30 20:05:27
I am trying to implement text to speech technology of android in my Activity but I face a strange error. I can't hear any sound, from my code. The speak method works only if I place it in onInit method, else it doesn't speak. My code is as follows : public class GameOverActivity extends Activity implements OnInitListener { private TextToSpeech talker; .... talker = new TextToSpeech(this, this); say("Something",false); ... public void onInit(int status) { if (status == TextToSpeech.SUCCESS) { talker.setLanguage(Locale.US); } else if (status == TextToSpeech.ERROR) { Toast.makeText(this,"Error

Android TTS fails to speak large amount of text

南楼画角 提交于 2019-11-29 18:52:51
问题 I am trying to speak out large amount of text using Android Text To Speech. I using default Google speech engine. Below is my code. public class Talk extends Activity implements TextToSpeech.OnInitListener { private ImageView playBtn; private EditText textField; private TextToSpeech tts; private boolean isSpeaking = false; private String finalText; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_talk); /

Using Google Text-To-Speech in Javascript

社会主义新天地 提交于 2019-11-28 15:18:10
I need to play Google text-to-speech in JavaScript. The idea is to use the web service: http://translate.google.com/translate_tts?tl=en&q=This%20is%20just%20a%20test And play it on a certian action, e.g. a button click. But it seems that it is not like loading a normal wav/mp3 file: <audio id="audiotag1" src="audio/example.wav" preload="auto"></audio> <script type="text/javascript"> function play() { document.getElementById('audiotag1').play(); } </script> How can I do this? Another option now may be HTML5 text to speech , which is in Chrome 33+ and many others . Here is a sample: var msg =

Using Google Text-To-Speech in Javascript

一曲冷凌霜 提交于 2019-11-27 19:44:07
问题 I need to play Google text-to-speech in JavaScript. The idea is to use the web service: http://translate.google.com/translate_tts?tl=en&q=This%20is%20just%20a%20test And play it on a certian action, e.g. a button click. But it seems that it is not like loading a normal wav/mp3 file: <audio id="audiotag1" src="audio/example.wav" preload="auto"></audio> <script type="text/javascript"> function play() { document.getElementById('audiotag1').play(); } </script> How can I do this? 回答1: Another

Google Translate TTS API blocked

不羁的心 提交于 2019-11-27 07:17:37
Google implemented a captcha to block people from accessing the TTS translate API https://translate.google.com/translate_tts?ie=UTF-8&q=test&tl=zh-TW . I was using it in my mobile application. Now, it is not returning anything. How do I get around the captcha? Add the qualifier '&client=tw-ob' to the end of your query. https://translate.google.com/translate_tts?ie=UTF-8&q=test&tl=zh-TW&client=tw-ob This answer no longer works consistently. Your ip address will be blocked by google temporarily if you abuse this too much. there are 3 main issues: you must include "client" in your query string

Initialising the TextToSpeech object on a worker thread

自古美人都是妖i 提交于 2019-11-26 21:37:12
问题 For years (literally), my application has suffered woes from poorly performing text to speech engines, in particular, the initialisation time when calling: tts = new TextToSpeech(context, myOnInitListener); The above can cause the UI to lag and if you search for 'Text to Speech initialization slow' on SO, you'll find many posts. The embedded high quality IVONA voices used to be the worst culprit, but the Google TTS engine has now taken the prize. Their most recent APK update, causes major lag

Google Text-To-Speech API

天大地大妈咪最大 提交于 2019-11-26 18:07:22
I want to know how can I use Google Text-to-Speech API in my .NET project. I think I need to call a URL to use the web service, but the idea for me is not clear. Can anyone help? Old answer: Try using this URL: http://translate.google.com/translate_tts?tl=en&q=Hello%20World It will automatically generate a wav file which you can easily get with an HTTP request through any .net programming. Edit: Ohh Google, you thought you could prevent people from using your wonderful service with flimsy http header verification. Here is a solution to get a response in multiple languages (I'll try to add more

Google Translate TTS API blocked

那年仲夏 提交于 2019-11-26 17:38:57
问题 Google implemented a captcha to block people from accessing the TTS translate API https://translate.google.com/translate_tts?ie=UTF-8&q=test&tl=zh-TW. I was using it in my mobile application. Now, it is not returning anything. How do I get around the captcha? 回答1: Add the qualifier '&client=tw-ob' to the end of your query. https://translate.google.com/translate_tts?ie=UTF-8&q=test&tl=zh-TW&client=tw-ob This answer no longer works consistently. Your ip address will be blocked by google