react-native-tts
react-native-tts copied to clipboard
Tts engine cannot be found on Android
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.
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 It should be added in
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
@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.
it is useful for me, thanks!