All Projects → hecomi → node-openjtalk

hecomi / node-openjtalk

Licence: other
Node.js TTS module using OpenJTalk

Programming Languages

C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language
Makefile
30231 projects
shell
77523 projects

Projects that are alternatives of or similar to node-openjtalk

fortnite-basic-api
Basic Fortnite API for stats with async/await, and basic communicator
Stars: ✭ 46 (-2.13%)
Mutual labels:  node-js
UWO
Unity WebGL x WebSocket MMO demo
Stars: ✭ 49 (+4.26%)
Mutual labels:  node-js
roboserver
Control OpenComputers robots without writing any code!
Stars: ✭ 52 (+10.64%)
Mutual labels:  node-js
react-full-stack-starter
🎈Full-stack React boilerplate using `create-react-app`, Babel, Node.js, and express
Stars: ✭ 22 (-53.19%)
Mutual labels:  node-js
minesweeper-bot
I'm a Discord bot that can generate a random Minesweeper game using spoiler tags, for anyone to play!
Stars: ✭ 27 (-42.55%)
Mutual labels:  node-js
CoffeeAndCode
Weekly Dev Challenges
Stars: ✭ 16 (-65.96%)
Mutual labels:  node-js
rustwasmc
Tool for building Rust functions for Node.js. Combine the performance of Rust, safety and portability of WebAssembly, and ease of use of JavaScript.
Stars: ✭ 97 (+106.38%)
Mutual labels:  node-js
Contemplate
Contemplate: Fast, extendable object-oriented and light-weight Template Engine for PHP, Python, Node.js, Browser and XPCOM/SDK JavaScript
Stars: ✭ 15 (-68.09%)
Mutual labels:  node-js
twgitbot
A node.js bot that checks a github repo changes and tweets it to your Twitter account
Stars: ✭ 10 (-78.72%)
Mutual labels:  node-js
tinder-client
❤️ NodeJS Tinder Client
Stars: ✭ 50 (+6.38%)
Mutual labels:  node-js
node-express-mongo-passport-jwt-typescript
A Node.js back end web application with REST API, user JWT authentication and MongoDB data storage using TypeScript
Stars: ✭ 51 (+8.51%)
Mutual labels:  node-js
DynamicsNode
Create simple scripts to interact with Dynamics CRM using Node.js
Stars: ✭ 27 (-42.55%)
Mutual labels:  node-js
node-rest-api-scaffold
This project is an initial NodeJS Rest API scaffold for developers
Stars: ✭ 24 (-48.94%)
Mutual labels:  node-js
express-mvc-generator
Express' Model View Controller Application Generator.
Stars: ✭ 46 (-2.13%)
Mutual labels:  node-js
Bitcoin-Stealer
Generate random bitcoin wallets, private keys (seeds) and then check if they match a wallet that contains some kind of balance, and then take it. Node.js
Stars: ✭ 61 (+29.79%)
Mutual labels:  node-js
doctr-tfjs-demo
Javascript demo of docTR, powered by TensorFlowJS
Stars: ✭ 21 (-55.32%)
Mutual labels:  node-js
ewd-qoper8
Node.js Message Queue and Multi-Process Manager
Stars: ✭ 23 (-51.06%)
Mutual labels:  node-js
winston-telegram
A Telegram transport for winston
Stars: ✭ 28 (-40.43%)
Mutual labels:  node-js
node-wemo
Belkin 社の WeMo を操作する Node モジュールです
Stars: ✭ 19 (-59.57%)
Mutual labels:  node-js
action-sync-node-meta
GitHub Action that syncs package.json with the repository metadata.
Stars: ✭ 25 (-46.81%)
Mutual labels:  node-js

node-openjtalk : Node.js TTS module using OpenJTalk

これは何?

フリーの日本語音声合成エンジン OpenJTalk を利用する Node.js モジュールです。

動作環境

  • Mac OS X 10.10.1
  • Node.js v0.10.36

インストール

$ npm install openjtalk

テスト

$ npm test

使い方

もっともシンプルなコードは以下になります。

var OpenJTalk = require('openjtalk');
var mei = new OpenJTalk();
mei.talk('こんにちは世界');

.htsvoice のパスと辞書ファイルを含んだディレクトリ、OpenJTalk の設定オプションを引数に渡せます。 引数は省略することもできます。省略した場合は MMDAgent のメイちゃんの声をデフォルトとして喋ります。 音声ファイルを複数用意すれば以下のように喋り分け出来ます。

var OpenJTalk = require('openjtalk');
var mei1 = new OpenJTalk(); // mei_normal を使用
var mei2 = new OpenJTalk({ htsvoice: './voice/mei/mei_angry.htsvoice' });
var mei3 = new OpenJTalk({ htsvoice: './voice/mei/mei_happy.htsvoice' });

mei1.talk('これはテストです'); // コールバックは省略できる
setTimeout(function() {
	mei2.talk('喋り終わり次第コールバックを呼びます', function(err) {
		if (err) console.log('err', err);
		console.log('コールバックを呼ぶ');
		mei3.talk('エラーが発生したらコールバックの引数からチェックできます', function(err) {
			if (err) console.log('err', err);
			else mei1.talk('エラーは発生しませんでした');
		});
	});
}, 2000);

設定値を変える場合は以下のようにします。

var OpenJTalk = require('./openjtalk');
var mei = new OpenJTalk({
	htsvoice        : './voice/mei/mei_normal.htsvoice',
	dic             : './dic/open_jtalk_dic_utf_8-1.08',
	sampling_rate   : 48000,
	pitch           : 220,
	audio_buff_size : 48000,
	alpha           : 0.5,
	beta            : 0.8,
	uv_threshold    : 0.5,
	gv_weight_mgc   : 1.0,
	gv_weight_lf0   : 1.0
});

// 喋る速度を調整することもできます
mei.talk('すっごい速いです', 100, function(err) {
	mei.talk('普通くらいです', 200, function(err) {
		mei.talk('ゆっくり喋るよ', 300);
	});
});

上記がデフォルト値になります。

注意

処理的には、OpenJTalk で wav を生成、それを afplay / aplay で再生、喋り終わったら削除、としているので、しゃべっている途中に中断すると wav ファイルが実行しているディレクトリに残ります。その際は手動で削除して下さい。

詳細

その他詳細は Twitter:@hecomi へご質問いただくか、http://tips.hecomi.com/ をご参照下さい。

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].