iOS 7+ Windows Phone 8 Android 4.0.3+ (API Level 15+)
Installation
cordova plugin add cordova-plugin-tts
Usage
// make sure your the code gets executed only after `deviceready`.document.addEventListener('deviceready', function () {
// basic usageTTS
.speak('hello, world!', function () {
alert('success');
}, function (reason) {
alert(reason);
});
// or with more optionsTTS
.speak({
text:'hello, world!',
locale:'en-GB',
rate:0.75
}, function () {
alert('success');
}, function (reason) {
alert(reason);
});
}, false);