24

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%
kirill
  • 351
  • 1
  • 2
  • 9

1 Answers1

19

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

arecord -vv -fdat stackoverflow.wav
hendry
  • 1,804
  • 4
  • 17
  • 18
  • 1
    this command writes output file constantly with silence. Тhis is not something that I need –  Feb 01 '12 at 07:16
  • 1
    Does your Mic work with Skype testing? Is it enabled via `alsamixer`? – hendry Feb 01 '12 at 07:24
  • Yes Mic working with skype, enabled –  Feb 01 '12 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 07 '15 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. – Bjarke Freund-Hansen Mar 29 '17 at 08:02
  • @BjarkeFreund-Hansen lol I only noticed that this fact when I have find this solution great to me. The author failed to address what he wanted clearly in the **title**, and even Google "didn't even read the question" and led me here! – user26742873 May 05 '21 at 08:39