I am looking for command-line utility that monitors the microphone, and if you start to speak, writes the file. Recording period should be adjusted.

Solution is:

   sox -t alsa default recording.wav silence 1 0.1 5% 1 1.0 5%

1 Answer 1


From http://dabase.com/u/record_wav/

arecord -vv -fdat stackoverflow.wav
  • 1
    this command writes output file constantly with silence. Тhis is not something that I need
    – kirill
    Feb 1, 2012 at 7:16
  • 1
    Does your Mic work with Skype testing? Is it enabled via alsamixer?
    – hendry
    Feb 1, 2012 at 7:24
  • Yes Mic working with skype, enabled
    – kirill
    Feb 1, 2012 at 11:12
  • I tried it and it is working > arecord -vv -fdat stackoverflow.wav I think the problem is that you are not selecting microphone in the settings, you have analog input instead change that and it should work
    – Robin
    Apr 7, 2015 at 20:01
  • 2
    @hendry: Did you even read the question. The asker wants something that only triggers when a sound is heard, and then records for a specific period of time. Mar 29, 2017 at 8:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.