https://github.com/ak1394/react-native-tts#readme
yarn add react-native-tts
cd ios/ && pod install && cd ..
componentDidMount() {
Tts.speak('Hello, world!');
Tts.speak('Hello, world!', {
iosVoiceId: 'com.apple.ttsbundle.Moira-compact',
rate: 0.5,
});
}
Tts.setDefaultLanguage('zh-TW');
Tts.speak('發文發文發文發文發文發文發文發文!', {
language: 'zh-TW', quality: 300 ,
id: 'com.apple.ttsbundle.Samantha-compact', name: 'Samantha',
rate: 0.5,
});