All Projects → hecomi → Node Julius

hecomi / Node Julius

Node.js module for voice recognition using Julius

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Node Julius

Openwhisk Runtime Nodejs
Apache OpenWhisk Runtime NodeJS supports Apache OpenWhisk functions written in JavaScript for NodeJS
Stars: ✭ 43 (-37.68%)
Mutual labels:  node-js
Bugsnag Node
[DEPRECATED] Please upgrade to our Universal JS notifier "@bugsnag/js" • https://github.com/bugsnag/bugsnag-js
Stars: ✭ 48 (-30.43%)
Mutual labels:  node-js
Documentbuilder
ONLYOFFICE Document Builder is powerful text, spreadsheet, presentation and PDF generating tool
Stars: ✭ 61 (-11.59%)
Mutual labels:  node-js
Vaxic
Node HTTP server framework
Stars: ✭ 45 (-34.78%)
Mutual labels:  node-js
Grafana Prometheus Node Js Example
Step-by-step tutorial on creating beautiful dashboards for your Node JS application
Stars: ✭ 47 (-31.88%)
Mutual labels:  node-js
Smorebot
SmoreBot is a fun, lightweight, multipurpose bot packed with features.
Stars: ✭ 51 (-26.09%)
Mutual labels:  node-js
Voicemail
🔈 📧 Voice Based Email for (Blinds?)
Stars: ✭ 40 (-42.03%)
Mutual labels:  voice-recognition
Komada
Komada: Croatian for `pieces`, is a modular bot system including reloading modules and easy to use custom commands.
Stars: ✭ 67 (-2.9%)
Mutual labels:  node-js
The Nodejs Master Class
Code samples for the Node.js Master Class
Stars: ✭ 1,037 (+1402.9%)
Mutual labels:  node-js
Cli Error Notifier
Sends native desktop notifications if CLI apps fail
Stars: ✭ 61 (-11.59%)
Mutual labels:  node-js
Adder
Executing untrusted code with ease.
Stars: ✭ 45 (-34.78%)
Mutual labels:  node-js
Offline invoicing
Desktop invoicing app built with electron. Create Quotes and Invoices. Download PDF or Email directly to your customers.
Stars: ✭ 47 (-31.88%)
Mutual labels:  node-js
Node Typescript Boilerplate
Minimalistic project template to jump start a Node.js back-end application in TypeScript. ESLint, Jest and type definitions included.
Stars: ✭ 1,061 (+1437.68%)
Mutual labels:  node-js
Gitwar
🚀 Gitwar - Compete with Github
Stars: ✭ 44 (-36.23%)
Mutual labels:  node-js
Fhir.js
Node.JS library for serializing/deserializing FHIR resources between JS/JSON and XML using various node.js XML libraries
Stars: ✭ 61 (-11.59%)
Mutual labels:  node-js
System Bot
Moderative and user-friendly discord bot using discord.js
Stars: ✭ 43 (-37.68%)
Mutual labels:  node-js
Influx Crypto Trader
Node js trading bot, let you create trading strategy and run it (backtest/simulation/live)
Stars: ✭ 49 (-28.99%)
Mutual labels:  node-js
Tor Router
A SOCKS, HTTP and DNS proxy for distributing traffic across multiple instances of Tor
Stars: ✭ 69 (+0%)
Mutual labels:  node-js
Clojure News Feed
evaluating various technologies by implementing a news feed micro-service
Stars: ✭ 65 (-5.8%)
Mutual labels:  node-js
Asciichart
Nice-looking lightweight console ASCII line charts ╭┈╯ for NodeJS, browsers and terminal, no dependencies
Stars: ✭ 1,107 (+1504.35%)
Mutual labels:  node-js

Node-Julius : Easy voice recognition library using Julius

これは何?

フリーの大語彙連続音声認識システム Julius を用いて簡単に音声認識を JavaScript で実現するための Node.js モジュールです。

動作環境

Mac OS X 10.8.2 および Ubuntu 10.04 での動作を確認しています。 コンパイルには以下のものが必要です。()内はこちらで動作させたバージョンになります。

  • gcc (4.7 / 4.8)
  • PortAudio (only for Mac OS X)
  • Boost (1.49.0 / 1.50.0)
  • MeCab (0.994)

インストール

$ cd YOUR_NODE_PROJECT_DIR
$ git clone https://github.com/hecomi/node-julius
$ mkdir node_modules
$ mv node-julius node_modules/julius
$ cd node_modules/julius
$ make

使い方

Grammar で音声認識させる言葉を覚えさせ、これをもとに Julius を実行する形式となります。 下記コードで、おはようございます・こんにちは・おやすみなさい、を音声認識することができます。

var Julius  = require('./julius.js')
  , grammar = new Julius.Grammar()
;

// 音声認識させる言葉を覚えさせる
grammar.add('おはようございます');
grammar.add('こんにちは');
grammar.add('おやすみなさい');

// 登録したキーワードをコンパイルして Julius を実行する
grammar.compile(function(err, result) {
	if (err) throw err

	// Julius インスタンスの生成
	var julius = new Julius( grammar.getJconf() );

	// 認識結果のコールバックを追加
	julius.on('result', function(str) {
		console.log(str);
	});

	// 認識の開始
	julius.start();
});

文法の登録には、下記のように正規表現のような記法が可能です。 また、シンボルを定義して時間のような数字のまとまり等を一括で登録することもできます。

// 下記のような正規表現っぽい形式が使えます
grammar.add('(ほげ+|ふが*){2,4}');
grammar.add('ふぅ?');
grammar.add('ばぁ{3}');

// シンボルを定義することもできます
// 下記は「○○時」および「○○時○○分」を認識します。
var hour = [], minute = [];
for (var i = 1; i <= 24; ++i, hour.push(i)) ;
for (var i = 0; i <  60; ++i, minute.push(i)) ;
grammar.addSymbol('HOUR',   hour);
grammar.addSymbol('MINUTE', minute);
grammar.add('<HOUR>時(<MINUTE>分)?');

// 文法のファイル名を指定(省略時は tmp)
grammar.setFileName('test');

// 文法をコンパイル
grammar.compile(function(err, result) {
	if (err) throw err;
	// 文法をテストする
	grammar.test(function(err, result) {
		if (err) throw err;
		console.log(result.stdout);
		// 作成した文法ファイルを削除
		// grammar.deleteFiles();
	});
});

音声認識では、各種イベントを受け取るコールバックを定義することができます。

julius.on('speechReady', function() {
	console.log('onSpeechReady');
});

julius.on('speechStart', function() {
	console.log('onSpeechStart');
});

julius.on('speechStop', function() {
	console.log('onSpeechStop');
});

julius.on('start', function() {
	console.log('onStart');
});

julius.on('pause', function() {
	console.log('onPause');
});

認識の一時停止、開始は start および stop で行います。

setTimeout(function(){
	julius.stop();
	setTimeout(function() {
		julius.start();
	}, 5000);
}, 5000);

詳細

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

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].