#Emic 2
A simple JS API to communicate with the Emic 2. Emic 2 is a module used to perform TTS. This particular version of the API is targeted to Tessel microcontroller.
##Installation
npm install emic2
##Initiating module
var tessel = require('tessel');
var emic2 = require('emic2').use(tessel.port['D']);
emic2.on('ready', function(){
emic2.speak('Hello, this is Tessel, your new friend');
});
##Methods
- speak(txt) The main function that transform text to speech
emic2.speak('Hello there, today is going to be a great day');
- setVoice(int) Change between 9 available voices in Emic2
emic2.setVoice(0);
- setLanguage('es', ['lan']) Set the language used in TTS
emic2.setLanguage('es', 'lan')
.speak('Hola amigos y amigas, esperon que todos esten bien')
.setLanguage('en')
.speak('As you can see, I am able to speak two languages, can you?');
- setVolume(int) Set the volume of the Emic 2
emic2.setVolume(10);
- setRate(int) Set the speaking rate in words per minute from 75 (slowest) to 600 (fastest).
emic2.setRate(500)
.speak('I am speaking kind of fast');
- stop() Immediately stop the currently playing text-to-speech message. This command is only valid while a message is playing.
emic2.speak('This is a really long text........');
emic2.stop();
#License
MIT
Free Software, Hell Yeah!