cordova-plugin-tts icon indicating copy to clipboard operation
cordova-plugin-tts copied to clipboard

crash galaxy note4 - android 6.0

Open ozexpert opened this issue 7 years ago • 7 comments

error on galaxy note4

java.lang.IllegalArgumentException: Invalid int: "OS"
	at android.os.Parcel.readException(Parcel.java:1624)
	at android.os.Parcel.readException(Parcel.java:1573)
	at android.speech.tts.ITextToSpeechService$Stub$Proxy.getVoices(ITextToSpeechService.java:796)
	at android.speech.tts.TextToSpeech.getVoice(TextToSpeech.java:1769)
	at android.speech.tts.TextToSpeech.access$1100(TextToSpeech.java:59)
	at android.speech.tts.TextToSpeech$12.run(TextToSpeech.java:1581)
	at android.speech.tts.TextToSpeech$12.run(TextToSpeech.java:1531)
	at android.speech.tts.TextToSpeech$Connection.runAction(TextToSpeech.java:2337)
	at android.speech.tts.TextToSpeech.runAction(TextToSpeech.java:747)
	at android.speech.tts.TextToSpeech.runAction(TextToSpeech.java:737)
	at android.speech.tts.TextToSpeech.setLanguage(TextToSpeech.java:1531)
	at com.wordsbaking.cordova.tts.TTS.onInit(TTS.java:86)
	at android.speech.tts.TextToSpeech.dispatchOnInit(TextToSpeech.java:820)
	at android.speech.tts.TextToSpeech.access$1900(TextToSpeech.java:59)
	at android.speech.tts.TextToSpeech$Connection$SetupConnectionAsyncTask.onPostExecute(TextToSpeech.java:2251)
	at android.speech.tts.TextToSpeech$Connection$SetupConnectionAsyncTask.onPostExecute(TextToSpeech.java:2206)
	at android.os.AsyncTask.finish(AsyncTask.java:651)
	at android.os.AsyncTask.access$500(AsyncTask.java:180)
	at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:668)
	at android.os.Handler.dispatchMessage(Handler.java:102)
	at android.os.Looper.loop(Looper.java:158)
	at android.app.ActivityThread.main(ActivityThread.java:7225)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

ozexpert avatar Dec 10 '16 07:12 ozexpert

update your android sdk and use this $$(document).on('deviceready', function() {

window.TTS.speak({ text: "Hello World" locale: 'en-GB', rate: 1.3 }, function () { // Do Something after success }, function (reason) { // Handle the error case }); });

deangelo200 avatar Dec 10 '16 23:12 deangelo200

Am totally confused ..where is the audio output? Inside success function?? I want to know the result structure, so that I can extract audio from it.

Or am I missing something here?

technotip avatar Dec 20 '16 18:12 technotip

@technotip it won't give you the audio, it will just play ;-) success callback is called when tts starts playing

ozexpert avatar Dec 21 '16 02:12 ozexpert

Ya got it. Thanks ..

technotip avatar Dec 21 '16 08:12 technotip

I have this problem as well; unfortunately, it's from a customer and I cannot replicate it on any of my Android devices.

The docs show


iOS 7+
Windows Phone 8
Android 4.0.3+ (API Level 15+)

My PGB config is:

<preference name="android-minSdkVersion" value="9" />
<preference name="android-targetSdkVersion" value="16" />

The SDK version is higher than the docs show. I could raise it to 21, but I'm unsure if this would even solve the issue.

Any insight?

Edit: The customer has Android 6.0.

caleb87 avatar Jan 24 '17 00:01 caleb87

Any update guys. I saw this happen with Samsung devices running android 6 only. Happens when I try to speak using a non available locale.

baskin avatar Nov 14 '17 08:11 baskin

This is still happening, only on "Samsung Galaxy S5" devices running Android 6.0.1

com.wordsbaking.cordova.tts.TTS.onInit

The crash happens on launch of the app, the tts speech plugin is not even called.

image

canadaka avatar Jan 10 '18 23:01 canadaka