sreuter / node-speakable

A continuous speech recognition module for node.js
283 stars 50 forks source link

sox never quits, and therefore never posts #3

Open WeeJeWel opened 10 years ago

WeeJeWel commented 10 years ago

I am not sure if this is expected behavior or not, but it seems to me that sox never stops recording. As the data is only posted on the close event, this never happens (only when I do it manually, which works).

sreuter commented 10 years ago

Hi there. It seems like your microphone input is to high. Sox quits automatically after a certain time of silence. You may want to adjust the parameters given to sox.

WeeJeWel commented 10 years ago

I see, thank you! Maybe it's better to mimic Google Chrome's behavior, and send the audio regardless of the volume? This makes speech recognition impossible when playing music, for example.

sreuter commented 10 years ago

True. If you find a way to achieve this using sox (or maybe something else), I'm keen to learn about it!

Glavin001 commented 10 years ago

Any progress on this, @sreuter ? I am interested in using node-speakable instead of my own project Leopold, and building on top of it for a more polished automation cloud product.

sreuter commented 10 years ago

@Glavin001 Nope, if you have any ideas on how to achieve this using sox, please let me know!

ejferg commented 9 years ago

Not sure but may be Audacity would work better (not knowing how flexible the command tools are). ffmpeg would probably be just as bad at noise canceling.

Glavin001 commented 9 years ago

I switched to using Wit.ai for my speech recognition and natural language processing needs. I added support to node-wit for recording audio with sox. It can be stopped manually / programmatically, or because the audio goes silent.