Hello, is it possible to implement TTS (text-to-speech) in monaca?
When I put in the Web Speech API, the IDE preview on chrome reads it out, but iOS and Android were not working with debugger and built apps.
The application under development is a word learning application, and although the number of characters read is small, there are thousands of words.<audio>
tag playback on mp3 is also a capacity issue, so we are looking for another way.
Thank you for your cooperation.
monaca cordova
You can use the Cordova Text-to-Speech Plugin.
The first language to read will result in downloading and installing the read audio data.
// Japanese Read Example
// I'm checking on Android.
document.addEventListener('device ready', function(){
document.getElementById("speech").addEventListener('click', function(){
TTS.speak({
text: 'Hello, the world of voices.'
locale: 'ja-JP',
rate —1,
}, function(){
alert('success');
}, function(reason){
alert(reason);
});
});
}, false);
© 2024 OneMinuteCode. All rights reserved.