Last active
June 22, 2016 04:08
-
-
Save zlargon/4d5def142e6521184fd9bfa57c40d316 to your computer and use it in GitHub Desktop.
the example of https://github.com/zlargon/voc
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
var voc = require('voc-cli'); | |
/* voc | |
* | |
* @param {String} word | |
* @param {String} directory the location for download | |
* @param {String!} service | |
* @return Promise(audioPath: String) | |
*/ | |
var word = 'Hello World'; | |
var path = '.'; // current directory | |
var service = 'google'; // Dictionary => 'webster', 'collins', 'yahoo' | |
// Text-To-Speech => 'ispeech', 'voicerss', 'google' | |
voc(word, path, service) | |
.then(function (audioPath) { | |
console.log('Download to ' + audioPath); | |
}) | |
.catch(function (err) { | |
console.log(err); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment