Created
October 21, 2014 01:52
-
-
Save Resseguie/1c30f525aaad22e4d584 to your computer and use it in GitHub Desktop.
Iterates over all say.js voices
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
'use strict' | |
var say = require('say'), | |
toSay = process.argv[2] || "Hello World", | |
voices = [ | |
"Agnes", | |
"Kathy", | |
"Princess", | |
"Vicki", | |
"Victoria", | |
"Albert", | |
"Alex", | |
"Bruce", | |
"Fred", | |
"Junior", | |
"Ralph", | |
"Bad News", | |
"Bahh", | |
"Bells", | |
"Boing", | |
"Bubbles", | |
"Cellos", | |
"Deranged", | |
"Good News", | |
"Hysterical", | |
"Pipe Organ", | |
"Trinoids", | |
"Whisper", | |
"Zarvox" | |
]; | |
sayIt(0); | |
function sayIt(voice) { | |
console.log(voices[voice]); | |
say.speak(voices[voice], toSay, function () { | |
voice++; | |
if(voice >= voices.length) { | |
process.exit(0); | |
} | |
sayIt(voice); | |
}); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment