evancohen / sonus

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

Arecord helper #94

Closed evancohen closed 5 years ago

evancohen commented 5 years ago

Fixes the age old problem of #68 (alternative solution to #93). Turns out arecord doesn't pipe audio after a given file formats max file size. So you can't record indefinitely, which is the whole point of Sonus 😂. This change keeps track of the number of bytes streamed and restarts the recording process silently (hooray).

The only downside is that it's not a totally seamless transition from one stream to another. If you're mid-utterance when the change happens, the remainder of the utterance will not be streamed to the cloud detector. But that's better than it stopping completely, so I'll take it 👌

sdetweil commented 5 years ago

closes issue #68