evancohen / sonus

:speech_balloon: /so.nus/ STT (speech to text) for Node with offline hotword detection
MIT License
619 stars 79 forks source link

Arecord #30

Closed evancohen closed 7 years ago

evancohen commented 7 years ago

Using arecord is way more performant than rec (from sox) on linux machines, especially those that are low powered like the Pi and the CHIP. This PR exposes the recordProgram parameter to allow users to specify the recording program of their choice.

To avoid a breaking change, Sonus defaults to 'rec' - also supports 'arecord' and 'sox'.

Usage:

const sonus = Sonus.init({ hotwords, language, recordProgram: "arecord" }, speech)

Hooray choices! 🚀