diff --git a/src/plugins/tts.js b/src/plugins/tts.js new file mode 100644 index 00000000..337d72f0 --- /dev/null +++ b/src/plugins/tts.js @@ -0,0 +1,13 @@ +// install : cordova plugin add cordova-plugin-tts +// link : https://github.com/smcpjames/cordova-plugin-tts + +/* globals TTS: true */ +angular.module('ngCordova.plugins.tts', []) + +.factory('$cordovaTTS', function () { + return { + speak: function (text, onfulfilled, onrejected) { + return TTS.speak(text, onfulfilled, onrejected); + } + }; +}); \ No newline at end of file