control-freak-ide/server/nodejs/testSay.js
plastic-hub-dev-node-saturn 538369cff7 latest
2021-05-12 18:35:18 +02:00

30 lines
756 B
JavaScript

var say = require('say');
// Use default system voice and speed
say.speak('Shitt, it is too loud, mother fucker! Come and fuck with me!');
/*
// Stop the text currently being spoken
say.stop();
// More complex example (with an OS X voice) and slow speed
//say.speak('whats up, dog?', 'Alex', 0.5);
// Fire a callback once the text has completed being spoken
say.speak('whats up, dog?', 'Good News', 1.0, function(err) {
if (err) {
return console.error(err);
}
console.log('Text has been spoken.');
});
// Export spoken audio to a WAV file
say.export("I'm sorry, Dave.", 'Cellos', 0.75, 'hal.wav', function(err) {
if (err) {
return console.error(err);
}
console.log('Text has been saved to hal.wav.');
});
*/