Skip to content

Instantly share code, notes, and snippets.

@tkon99
Created April 27, 2015 08:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tkon99/a0c55f8c75f548d20190 to your computer and use it in GitHub Desktop.
Save tkon99/a0c55f8c75f548d20190 to your computer and use it in GitHub Desktop.
High quality TTS
var request = require("request");
var open = require('open');
function say(text, callback){
request.post({url:'http://www.acapela-group.com/demo-tts/DemoHTML5Form_V2.php', form: {
MyLanguages:"sonid9",
MySelectedVoice:"Graham",
MyTextForTTS: text,
t:"1",
SendToVaaS:""
}}, function(err, httpResponse, body){
var patt = /\'(http:\/\/(?:\w|\.|\/|-)+\.mp3)\'/;
var res = body.match(patt);
var url = res[1];
callback(url);
});
}
say("Hello sir! What can I do for you?", function(url){
console.log(url);
open(url);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment