JavaScript 语音识别库:JuliusJS

jopen 9年前

用于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
    </li>
  • 100% JavaScript implementation
    • All recognition is done in-browser through a Worker
    • Familiar event-inspired API
    • No external server calls
    • </ul> </li> </ul>

      Quickstart

      Using Express 4.0
      1. Grab the latest version with bower
        • bower install juliusjs --save
      2. Include julius.js in your html
        • <script src="julius.js"></script>
      3. Make the scripts available to the client through your server

        var express = require('express'),      app     = express();    app.use(express.static('path/to/dist'));
      4. 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!

      项目主页:http://www.open-open.com/lib/view/home/1412597629562