gotev / android-speech

Android speech recognition and text to speech made easy
http://gotev.github.io/android-speech/
Apache License 2.0
473 stars 156 forks source link

Synthesis request paramter streamType containst value with invalid type #48

Closed zhou880220 closed 3 years ago

zhou880220 commented 3 years ago

code: Speech.getInstance().say("hello") log: Synthesis request paramter streamType containst value with invalid type. Should be an Integer or a Long

Please help me solve this problem.

yuripourre commented 3 years ago

Hello @zhou880220, your log has a typo: containst could you please post the exact log you are getting?

zhou880220 commented 3 years ago

could you please post the exact log you are getting?

03-23 09:28:23.795 4713-4713/com.tianyi.story I/TtsActivity: onSpeakClick: start 03-23 09:28:23.795 4713-4713/com.tianyi.story W/TextToSpeech: Synthesis request paramter streamType containst value with invalid type. Should be an Integer or a Long 03-23 09:28:23.805 4713-4713/com.tianyi.story I/TtsActivity: onSpeakClick: end

gotev commented 3 years ago

@zhou880220 A bunch of questions to understand the issue and have some meaningful data:

zhou880220 commented 3 years ago

@zhou880220 A bunch of questions to understand the issue and have some meaningful data:

  • Which library version are you using?
  • On which Android version does it happen and from which vendor?
  • Which language do you have on the device and which language are you trying to use for TTS?
  • Do you have a demo app which replicates this problem (or at least an executable snippet)?
  • Does it happen on a single device or on many devices (specify which)?
  • Have you tried the Speech Demo App on the same device on which you are getting this error? What are the outcomes?

my test phone sdk is 28, phone language is chinese and tts is useful; I try https://github.com/mapzen/speakerbox.git can running .

gotev commented 3 years ago

@zhou880220 ok! Have you tried the Speech Demo App on the same device on which you are getting this error? What are the outcomes?

zhou880220 commented 3 years ago

@zhou880220 ok! Have you tried the Speech Demo App on the same device on which you are getting this error? What are the outcomes?

This is probably a Chinese phone, some flaws in Google TTS support, I tried other brands as well.

gotev commented 3 years ago

From the report got so far, the problem doesn't seem something related to the library, but more about Google TTS support for Chinese and some device specific issues. The library is simply a wrapper of android native capabilities. No action to take here.