반응형
https://github.com/vilic/cordova-plugin-tts
error issue : https://forum.ionicframework.com/t/problems-with-text-to-speech/31927
Cordova Text-to-Speech Plugin
Platforms
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 usage
TTS
.speak('hello, world!', function () {
alert('success');
}, function (reason) {
alert(reason);
});
// or with more options
TTS
.speak({
text: 'hello, world!',
locale: 'en-GB',
rate: 0.75
}, function () {
alert('success');
}, function (reason) {
alert(reason);
});
}, false);
Tips: speak
an empty string to interrupt.
반응형
'프로그래밍 > App' 카테고리의 다른 글
How to create a custom app icon/splash screen in Ionic2 (0) | 2017.04.13 |
---|---|
[APP] cordova ionic install 중 권한에러 발생시 (0) | 2017.04.07 |
[APP] IONIC framework - Angular.js, CLI tool, Android studio (0) | 2017.04.07 |
Hybrid app 하이브리드 앱 (0) | 2017.04.03 |
[APP] Cordova 개발 환경 구축 (0) | 2017.03.22 |