Skip to content

Instantly share code, notes, and snippets.



Created Jul 11, 2019
What would you like to do?
jtalk cli
var fs = require('fs');
var Speaker = require('speaker'); // version 0.3.0
var OpenJTalk = require('node-openjtalk').OpenJTalk;
// pre-included HTS voice file
var fn_voice = OpenJTalk.voices.mei_normal;
// instantiate OpenJTalk with an HTS voice
var open_jtalk = new OpenJTalk({voice: fn_voice});
// synthesize a voice synchronously
var buffer = open_jtalk.synthesizeSync(process.argv[2], function(option) {
return {
speed: option.speed / 1.5
// flush to node-speaker
var speaker = new Speaker({
channels: 1,
bitDepth: 16,
sampleRate: 48000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.