Any way to access SpeechSynthesis inaccessible on Kindle Fire? - android

I release an app for people with disabilities to help them speak when they can't use their voice. I use android.speech.tts.TextToSpeech to generate speech in my app Android (Google and also Amazon), but it looks like Amazon is now blocking access to the speech synthesis engine in its latest version of FireOS (testing on a Kindle Fire 7 2022).
android.speech.tts.TextToSpeech => getVoices
now returns an empty list, where it didn't with prior versions of FireOS. I'd have given up completely, but the eSpeak app (com.reecedunn.espeak) when side-loaded shows the default OS engine ("English (United States.salli)") and can synthesize speech. That app hasn't been updated since 2015 so maybe it's just a legacy quirk, but since Amazon also doesn't seem to allow third-party TTS engines in their AppStore, I'm hitting a bit of a wall and looking for anything. The workaround is to use eSpeak, which is not nearly as good at the voices Amazon already has installed on the device. Has anyone else run into this, or have ideas what to try?

Related

Which Android Version Introduced SpeechRecognizer's Audible Cue onReadyForSpeech?

Android 2.x does not automatically sound an audible cue when ready for speech input.
Android 4.1 does.
What happens in between these versions? i.e. When was this cool feature introduced?
Android 3.0? (Build.VERSION_CODES.HONEYCOMB_MR)
Android 3.1? (Build.VERSION_CODES.HONEYCOMB_MR1)
Android 3.2? (Build.VERSION_CODES.HONEYCOMB_MR2)
Android 4.0? (Build.VERSION_CODES.ICE_CREAM_SANDWICH)
I need this in order to perform a check against Build.VERSION.SDK_INT at runtime.
Do you know of any source that documents this?
That "ready for speech" double-beep to which you are referring is not a feature of the Android OS but rather Google App.
This is very close to Kaarel's answer but the distinction between Voice Search and Google App could be confusing.
What's more confusing is the fact that Google App used to be named Google Search but make no mistake: The identical package name turns itself in... com.google.android.googlequicksearchbox.
I don't know exactly at what point the "no beep Google Search" turned into "cool double-beep Google App", but my limited observation shows that Google Search version 1.3.3 (Android 2.2.1) had no beeps, while Google App version 4.1.24 (Android 4.1.2) has those beeps.
As of today (2015-01-22), Version 1.3.3.247963 of Google Search is latest version available on Google Play for Android 2.2.1 devices.
An Android 4.1.2 device, however, can see a higher version in Google Play and download & install it: 4.1.24.1672412.arm.
Thus, it seems that those beeps are tied to the Android version.
BTW, Google App features what's known as "OK Google". Perhaps that was the reason for introducing those (now famous) beeps.
"OK Google" was first introduced in the Google I/O conference in May 2013, but since it is available for download from Google Play to Android 4.1 devices (which was introduced in July 2012), one cannot assume direct link to the latest release version at that time. There are, in fact, instructions on how to install Google App on Android 4.0 but I doubt that is supported by Google. Thus, to be safe, I would say that if you enabled automatic updates on your smartphone, then the Android version that first introduced "the recognizer beeps" is 4.1.
This might be a feature of Google Voice Search, but Google Voice Search is a regular app and thus external to Android.
onReadyForSpeech is a callback via which an end-user app (e.g. a keyboard app) can have some code executed by the speech recognizer app (e.g. Google Voice Search). Both of these apps can sound the audible cue but neither is part of the core Android.
Maybe relevant:
void startRecording (MediaSyncEvent syncEvent)
was added in API level 16.

Text to Speech not working in Android 4.2 Jelly Bean

We added voice prompts to our app using the Text to Speech API a couple years ago and it has been working well. Recently, we started receiving email from users that upgraded to Android 4.2 Jelly Bean saying that voice prompts are not working and that they are getting a message that the voice data is missing and they need to download it. When they click to download they are given the option of downloading languages other than English.
We implemented text to speech following this post on the Android Developer's Blog. We are invoking the TextToSpeech.Engine.ACTION_CHECK_TTS_DATA intent and if anything other than TextToSpeech.Engine.CHECK_VOICE_DATA_PASS is returned we invoke the TextToSpeech.Engine.ACTION_INSTALL_TTS_DATA intent.
We don't have access to a device running 4.2. I went into a local store today and downloaded the app on a Nexus 7 tablet with 4.2 installed and was able to reproduce the problem. However, when we create an AVD based on the Nexus 7 and run the emulator the voice prompts work fine and we are not able to reproduce the issue.
TTS checking with Android OS4.1 and OS 4.2 is, being polite, different.
OS 4.1 does not correctly handle the intent to install data*
TextToSpeech.Engine.ACTION_INSTALL_TTS_DATA
OS 4.2 does not correctly handle the intent to check for voice data*
TextToSpeech.Engine.ACTION_CHECK_TTS_DATA
* By this I mean that it doesn't return the correct status codes as per the old versions. For example, CHECK_TTS_DATA returns CHECK_VOICE_DATA_MISSING_DATA when it clearly does have voice data installed. It's possible that there is some other intent data that now needs to be passed, but I'm not sure where this is documented.
In my apps I have had to disable these checks for newer OS versions. I suspect Google may have done this because their terms to use Android now mandate TTS (but I can't verify this - I'm sure there's a site out there that describes exactly what must be implemented to be called 'Android')
Update
As I suspected, Android OS 4.1 now mandates Text-to-Speech be included in every Android device, thus the checks are now somewhat redundant. From this link: Android 4.1 Compatibility Definition
3.11 Text-to-Speech
Android 4.1 includes APIs that allow applications to make use of text-to-speech (TTS) services, and allows service providers to provide implementations of TTS services [Resources, 32]. Device implementations MUST meet these requirements related to the Android TTS framework:
Device implementations MUST support the Android TTS framework APIs and SHOULD include a TTS engine supporting the languages available on the device. Note that the upstream Android open source software includes a full-featured TTS engine implementation.
Device implementations MUST support installation of third-party TTS engines.
Device implementations MUST provide a user-accessible interface that allows users to select a TTS engine for use at the system level.

Device Availability, filtering and Google Play

A question on limiting apps for devices. We've licensed software to device makers and we wanted to allow app developers to publish only on those devices (I'll call these "licensed devices"). Apps won't work on other devices("non-licensed devices").
I've found very helpful posts here about Device Availability & Google Play.
Android: Limit supported devices in Android Market
how to filter android app to be downloaded from google play to specific device? among others
With Device Availability, it looks like app developers have to manually select the universe of non-licensed devices from the dynamic list of supported devices and move these to the exclusion list. Seems like a lot of work for app developers, especially if they'd have to keep updating the exclusion list with each new Android device that's released.
I wanted to see if there's a means of doing the converse - making my app available only to a set of licensed devices. Is there a means of doing this with Google Play?
We've licensed software to device makers and we wanted to allow app developers to publish only on those devices (I'll call these "licensed devices"). Apps won't work on other devices("non-licensed devices").
Developers of such custom firmware extensions should do so as an SDK add-on, thereby requiring developers who use those extensions to have a corresponding <uses-library> element in their manifest. The Play Store should then automatically filter the app so that it only shows up on devices that have that SDK add-on. Motorola, HTC, Samsung, and others have created such SDK add-ons.
I wanted to see if there's a means of doing the converse - making my app available only to a set of licensed devices. Is there a means of doing this with Google Play?
No, sorry.
Tomorrow, if Google adds one more device to the list of supported devices then it will be automatically included to my supported devices list which I dont want to happen.
Then do not distribute the app on the Play Store.
Is there a mechanism to get a notification as soon as Google adds a new device to the list of supported devices in Google play console?
No, sorry.
If not, what is the alternate way of handling it.
Refresh your browser continuously, breathlessly waiting for the next update to the device roster.
I am sure many other android developers would have faced the same issue
Hopefully not. The Play Store is designed for distribution to all Android devices. The per-device exclusion list is designed for short-term compatibility issues, while you work out some bug fixes to overcome the issues.
It seems like Google has just released Google Play Private Channel, which could help you with your "licensed device" issue.
As said recently in this blog post: A new way to distribute your internal Android apps
Not natively. You can check the device type and exit if it doesn't match your whitelist, but that can easily be spoofed on rooted devices. If you have a library you can throw a fatal exception when initializing, etc.

Amzon Store Kindle Fire Compatibility

I recently release an app for Kindle Fire. The app was approved by the amazon store, but was rejected for kindle. Following feedback was given :
We have recently evaluated your app’s compatibility with Amazon’s Kindle Fire tablet. This added test process is here to verify that every app available for download on Kindle Fire will provide our customers with a high-quality experience on their devices. Your existing submission of XXXXXXXX has been found to be incompatible with Kindle Fire due to the following:
Upon completion of our compatibility test processes, your app was found to be unresponsive when subjected to testing. To be compatible with Kindle Fire, the app’s core features must be responsive to user commands, and its primary functionality accessible and compliant with device specifications.
Please review these issues and update your submission to address the incompatibility. You may find it helpful to review the Kindle Fire FAQ in the Amazon Appstore Developer Portal.
Has anyone got any pointers on what could be wrong ?
Never developed for amazon, but the text seems to point out that your app freezes the user input in a certain situation.
Maybe there is some data retrieval that is not done in a separate process and freezes the ui?
I just received the same response from them and, I to, have apps they approved for their store, tested on, based on the Flurry analytics I'm using, less powerful devices than the Kindle Fire. It's pretty vague too, wish they offered a developer tablet or some more details. Only thing you can do is maybe guess what is unresponsive and hope it passes next time.
Sounds like you're getting ANRs. Read tips on how to avoid this here: http://developer.android.com/guide/practices/design/responsiveness.html
but most of the time it's caused by doing something long running (usually network calls) on the UI thread. Make sure you spawn another thread being doing a network call.
If you have access to a Motorola Xoom running Honeycomb 3.2 you might want to test your app on that. My app was rejected by Amazon because they experienced blank screens. I've tested it thoroughly on Kindle Fire and have never seen that behavior. It was only when I emphasized that point with the Amazon reviewer that I learned they were not testing on their own device but on Motorola's Xoom running an obsolete OS that I don't want to support. I now have a Xoom and my app runs fine on it under ICS but is quite buggy with Honeycomb.

RecognizerIntent.ACTION_RECOGNIZE_SPEECH on Samsung Galaxy S

I am trying to use speech recognition on a Samsung Galaxy S phone (as I know the emu doesn't have the intent). The Galaxy S has a 2.1 Android ROM. For some reason I get that the package does not exist on the device, which doesn't make sense because other apps (google maps, voice dialer, etc) are clearly using this.
Does anyone have any ideas on how I can get this to work?
The code is more or less the same as google's example (http://developer.android.com/resources/articles/speech-input.html).
As a further note, I found this thread which seems to indicate that the srec library is missing randomly on devices:
http://groups.google.com/group/android-discuss/browse_thread/thread/2a53ec01bdff8e67
Is there a way I can do this manually (i.e. contact Google's SOAP API for speech recognition)? Alternatively, can I just copy the srec source code from somewhere and put it directly into my project?
Thanks.
Not a total expert on this, but I do know the actual recognizer task is performed on remote google servers (the voice feature will be sent out). Speech engine itself requires significant amount of memory and computing power. On the device itself, it is only possible to perform limited grammar tasks (for example, call XXX).
Maybe the device manufactures/operators don't have agreement with google?

Categories

Resources