Skip to content

Instantly share code, notes, and snippets.

@alitaso345
Created July 15, 2014 14:59
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 alitaso345/4c5a1f9e43d86c41d27f to your computer and use it in GitHub Desktop.
Save alitaso345/4c5a1f9e43d86c41d27f to your computer and use it in GitHub Desktop.
VoiceTextAPI test
fs = require('fs');
VoiceText = require('voicetext');
voice = new VoiceText('your api key');
voice
.speaker(voice.SPEAKER.HIKARI)
.emotion(voice.EMOTION.HAPPINESS)
.emotion_level(voice.EMOTION_LEVEL.HIGH)
.volume(200)
.speak('きょうもいちにちがんばるぞい', function(e, buf){
if(e){
console.error(e);
return;
}
fs.writeFile('./test.wav', buf, 'binary', function(e){
if(e){
console.error(e);
return;
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment