An open API service indexing awesome lists of open source software.

https://github.com/t-mullen/speech-to-text-stream

Simple streaming speech recognition for Chrome.
https://github.com/t-mullen/speech-to-text-stream

Last synced: about 2 months ago
JSON representation

Simple streaming speech recognition for Chrome.

Awesome Lists containing this project

README

        

# speech-to-text-stream

[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

Simple text-stream wrapper around the WebSpeech SpeechRecognizer API for Google Chrome.

Also see [text-to-speech-stream](https://github.com/RationalCoding/text-to-speech-stream).

## Usage

```javascript
var recognizer = new SpeechToTextStream()

button.onclick = function () {
recognizer.start() // Can only be started by user interaction
}

recognizer.on('data', function (token) {
// token is one spoken word
})

recognizer.on('speechstart', function (token) {
// speech has been recognized
})

recognizer.on('speechend', function (token) {
// speech has stopped or paused
})
```