Open duyv opened 5 years ago
I was having this same error, so it seems that in order to support Android 4.x you should pass the KEY_PARAM_STREAM
value explicitly to the speak()
method
Tts.speak(text, { androidParams: { KEY_PARAM_STREAM: 'STREAM_MUSIC' } });
You can see all the supported values for KEY_PARAM_STREAM
on the README file https://github.com/ak1394/react-native-tts#speaking
Hope it works.
It's working fine in android 5.x and above but crash in android 4.x. I was use android studio logcat and this show me the error log. I think it maybe not support for android 4.x.