-
Notifications
You must be signed in to change notification settings - Fork 215
Proposed 1.0 API
tlhunter edited this page Sep 25, 2014
·
3 revisions
Just some scribbled notes for a new API proposal. Nothing is final.
Platform-independent voice fallback groups
- Male
- Female
- Robot
Probed in this order, can be forced during instantiation
- say
- espeak
- festival
- api
var Say = require('say');
console.log(Say.voices()); // ['Samantha', 'Alex', ...];
console.log(Say.engine()); // 'say' || 'espeak' || 'festival' || 'api'
var robot = new Say({
voice: Say.Voice.Robot
});
var girl = new Say({
voice: ["Samantha", "-ven+m3"],
speed: 1.5
});
var adhoc = new Say();
robot.say("I'm sorry, Dave. I'm afraid I can't do that.", function(err) {
girl.say("What are you talking about, HAL?");
});
adhoc.voice("Cellos").speed(0.75).say("Dun Dun Dunnnnnnnn");
setTimeout(function() {
adhoc.stop();
}, 300);
adhoc
.voice("Bells")
.export("Fin", Say.Export.WAV, "export.wav", function(err, path) {
console.log("Done.");
});
var online = new Say({
engine: 'api'
});