react-native-tts icon indicating copy to clipboard operation
react-native-tts copied to clipboard

Tts engine cannot be found on Android

Open Doodidan opened this issue 4 years ago • 4 comments

I try to integrate this library to an app. The code:

import tts from 'react-native-tts';

tts
  .getInitStatus()
  .then(() => {
    tts.speak('Hello world!');
  })
  .catch((err) => {
    if (err.code === 'no_engine') {
      tts.requestInstallEngine();
    }
  });

First time the error (No TTS engine installed) appear so I install suggested Google TTS engine from market and relaunch the app as suggested in readmy file. But nothing changes: the same error appear and the same app is suggested to install but it's already installed.

I don't know where a solution can be.

Doodidan avatar Jun 19 '20 22:06 Doodidan

I searched for a solution. Just add some codes in the AndroidManifest.xml file:

<queries>
    <intent>
       <action android:name="android.intent.action.TTS_SERVICE" />
    </intent>
</queries>

For me,it's useful. This seems to only happen on Android 11. https://developer.android.google.cn/reference/android/speech/tts/TextToSpeech

yoursinger avatar Aug 25 '21 15:08 yoursinger

@yoursinger It should be added in or where it should be added

Still facing this issue

I searched for a solution. Just add some codes in the AndroidManifest.xml file:

<queries>
    <intent>
       <action android:name="android.intent.action.TTS_SERVICE" />
    </intent>
</queries>

For me,it's useful. This seems to only happen on Android 11. https://developer.android.google.cn/reference/android/speech/tts/TextToSpeech

shafqatbari avatar Feb 10 '23 12:02 shafqatbari

@yoursinger It should be added in or where it should be added

Still facing this issue

I searched for a solution. Just add some codes in the AndroidManifest.xml file:

<queries>
    <intent>
       <action android:name="android.intent.action.TTS_SERVICE" />
    </intent>
</queries>

For me,it's useful. This seems to only happen on Android 11. https://developer.android.google.cn/reference/android/speech/tts/TextToSpeech

For me the same, nothing change.

paulo101977 avatar Dec 20 '23 00:12 paulo101977

it is useful for me, thanks!

frinder6 avatar Feb 21 '24 08:02 frinder6