【发布时间】:2014-12-31 01:03:46
【问题描述】:
我在我的 android 应用程序中使用文本到语音。它与 Google TT 和 espeak 一起工作正常,但是当我与三星 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)
【问题讨论】:
-
对我来说,三星设备在 isLanguageAvailable 上返回 true,但稍后在 setLanguage() 期间失败并出现此异常
-
@MartinVysny 运气好能找到解决方法吗?我对 setLanguage(...) 有同样的问题。
-
不走运,抱歉。我只想向用户宣讲,向三星发送垃圾邮件以解决此问题;)
-
当您将默认引擎更改为 google tts 时是否解决了问题?
标签: android exception text-to-speech