Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Speak To Me - Mozilla Speech Recognition API

Version License

Node.js module for SpeakToMe, Mozilla's Speech-to-text REST API.

Supports recording of audio on local system, encoding and sending the recording to Mozilla's service for processing, and retrieval of results.

Installation

Support for recording from system or USB mics is through the mic package, which depends on installation of OS-specific recording utilities:

Windows and macOS require SOX and Linux requires ALSA tools.

  • Windows: Download and install SOX from the website
  • Linux: sudo apt-get install alsa-base alsa-utils
  • macOS: brew install sox

Install via npm:

npm install speaktome-node

Usage

const speech = require('speaktome-node');

speech.record().then(results => {

  // Results is an array of objects containing
  // `text` and `confidence` properties:
  //
  // [
  //   { confidence: "0.8090", text: "TEST" }
  // ]
  console.log(results);

}).catch(console.error);

Development Notes

Install opus-tools for command line utilities to test Opus encoding/decoding/playback.

brew intall opus-tools

Command for encoding raw sound files recorded from system microphone to Opus:

opusenc --raw --raw-rate 16000 --raw-chan 1 recording.raw recording.opus

About

Module for using Mozilla's speech-to-text API from Node.js

Resources

License

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.