OpenJTalk, Japanese text-to-speech engine binding for NodeJS.
MacOSX users do not need to install libiconv because OSX already includes it.
$ npm install node-openjtalk
var fs = ;var Speaker = ;var OpenJTalk = OpenJTalk;// pre-included HTS voice filevar fn_voice = OpenJTalkvoicesmei_normal;// instantiate OpenJTalk with an HTS voicevar open_jtalk = voice: fn_voice;// synthesize a voice buffer from a textopen_jtalk;// synthesize a voice synchronouslyvar buffer = open_jtalk;// flush to node-speakervar speaker =channels: 1bitDepth: 16sampleRate: 48000;speaker;
Instantiates OpenJTalk object.
You must specify HTS voice file path with an option argument.
var OpenJTalk = OpenJTalk;var open_jtalk = voice: "/path/to/HTS voice file";
You can use pre-included voice files.
var OpenJTalk = OpenJTalk;var open_jtalk = voice: OpenJTalkvoicesm001;
The pre-included voice files are:
Synthesizes voice audio asynchronously from a text. The callback takes two arguments, error and buffer object.
The "optionHook" function lets you modify synthesis parameters. For example, following code makes speech speed double.
The available parameters are:
Synthesizes voice audio synchronously from a text. This function returns buffer object.
node-openjtalk currently supports following platforms.
node-openjtalk is licensed under the MIT license. See LICENSE for more details.
Both OpenJTalk and hts_engine API are issued under the Modified BSD license.
HTS Voice "NIT ATR503 M001" and "Mei" are both issued under the Creative Commons Attribution 3.0 license.