simpletss
A basic tss manager, based on Microsoft Speech API or espeak for others OS
Installation
$ npm install simpletss
Espeak (if not SAPI)
$ apt-get install espeak
http://espeak.sourceforge.net/download.html
Features
Doc
static getTTSSystem() : return string
'sapi' or 'espeak'static setDefaultVoice(object) : return void
static getVoices() : return Promise instance
{ string name, string gender }
static read(string) : return Promise instance
static read(object options) : return Promise instance
{
string text,
object voice | string voiceName,
integer volume,
integer speed
}
Examples
const simpletts = require('simpletts');
simpletts.getVoices().then((voices) => {
console.log(voices[0].name);
console.log(voices[0].gender);
}).catch((err) => {
console.log(err);
});
simpletts.read({ text: "this is a test", volume: 75, speed: 60 }).then(() => {
console.log('Ok');
}).catch((err) => {
console.log(err);
});
simpletts.read("this is a test").then(() => {
console.log('Ok');
}).catch((err) => {
console.log(err);
});
Tests
$ mocha tests/tests.js
License
ISC