JavaScript 语音识别库:JuliusJS
用于Web的语音识别库
在线示例:live demo.
JuliusJS is an opinionated port of Julius to JavaScript.
It actively listens to the user to transcribe what they are saying through a callback.
// bootstrap JuliusJS var julius = new Julius(); julius.onrecognition = function(sentence) { console.log(sentence); }; // say "Hello, world!" // console logs: `> HELLO WORLD`
特性:
- Real-time transcription
- Use the provided grammar, or write your own
- 100% JavaScript implementation
- All recognition is done in-browser through a
Worker
- Familiar event-inspired API
- No external server calls </ul> </li> </ul>
- Grab the latest version with bower
bower install juliusjs --save
- Include
julius.js
in your html<script src="julius.js"></script>
-
Make the scripts available to the client through your server
var express = require('express'), app = express(); app.use(express.static('path/to/dist'));
-
In your main script, bootstrap JuliusJS and register an event listener for recognition events
// bootstrap JuliusJS var julius = new Julius(); // register listener julius.onrecognition = function(sentence, score) { // ... console.log(sentence); };
- Your site now has real-time speech recognition baked in!
Quickstart
Using Express 4.0
- All recognition is done in-browser through a
本文由用户 jopen 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
转载本站原创文章,请注明出处,并保留原始链接、图片水印。
本站是一个以用户分享为主的开源技术平台,欢迎各类分享!