mihirsoni / react-native-android-speech

This simple React Native module for Android Text To Speech functionality.
https://www.npmjs.com/package/react-native-android-speech
48 stars 14 forks source link

Add support for language availability check and download #9

Closed yjlim5 closed 7 years ago

yjlim5 commented 7 years ago

Currently, the speak function fails silently if the requested language is not supported on the device. To address this issue, this PR adds:

  1. Error message from speak that requested language is not available
  2. checkLanguageAvailability(language) for checking language support
  3. downloadTTSVoice() for TTS Voice download page

Together these changes will allow developers to easily detect and handle error cases where the language support is unavailable on Android device.

mihirsoni commented 7 years ago

@yjlim5 Thank you so much for the PR, I will review and update it.

yjlim5 commented 7 years ago

@mihirsoni thank you for providing this library and reviewing my PR! We have been using this library extensively as part of our language learning app.

I was surprised to find that the speech part was not working on some of the latest Android devices, like Galaxy S8 - produced by Korea yet no Korean TTS voice installed by default. I hope the changes in this PR will help dealing with missing voice issues.