25
我正在使用文本到我的android应用程序中的语音。它与Google TTs和espeak工作良好,但是当我与三星TTS一起使用时,它给出以下异常。IllegalArgumentException:无效int:“操作系统”与三星tts
java.lang.IllegalArgumentException: Invalid int: "OS"
at android.os.Parcel.readException(Parcel.java:1429)
at android.os.Parcel.readException(Parcel.java:1379)
at android.speech.tts.ITextToSpeechService$Stub$Proxy.isLanguageAvailable(ITextToSpeechService.java:482)
at android.speech.tts.TextToSpeech$10.run(TextToSpeech.java:1084)
at android.speech.tts.TextToSpeech$10.run(TextToSpeech.java:1081)
at android.speech.tts.TextToSpeech$Connection.runAction(TextToSpeech.java:1329)
at android.speech.tts.TextToSpeech.runAction(TextToSpeech.java:570)
at android.speech.tts.TextToSpeech.runAction(TextToSpeech.java:561)
at android.speech.tts.TextToSpeech.isLanguageAvailable(TextToSpeech.java:1081)
对我来说,三星的设备返回true上isLanguageAvailable但在后来失败,正是这种例外setLanguage() – 2017-02-20 07:17:25
@MartinVysny找到解决方法的任何运气?我遇到了与setLanguage(...)相同的问题。 – Dogcat 2017-04-16 17:26:18
不好意思,对不起。我所想到的只是向用户传播,以便向三星发送垃圾邮件来解决这个问题;) – 2017-04-18 06:04:50