22

I need to record voice from built-in microphone using only Terminal.app in Mac OS X. Is there any way?

roboslone
  • 2,847
  • 3
  • 20
  • 28

2 Answers2

35

Install brew and then install sox

$ brew install sox

$ sox -d recording.wav
epatel
  • 45,805
  • 17
  • 110
  • 144
  • 1
    How do you record audio out only, not the microphone – mika Aug 23 '14 at 14:48
  • does this interfere with skype or any other recording apps? – oortcloud_domicile Sep 30 '14 at 13:29
  • /tmp bemmu$ sox -d recording.wav dyld: Symbol not found: _lame_close Referenced from: /usr/local/Cellar/sox/14.4.1_1/lib/libsox.2.dylib Expected in: flat namespace in /usr/local/Cellar/sox/14.4.1_1/lib/libsox.2.dylib Trace/BPT trap: 5 – Bemmu Feb 25 '15 at 05:29
  • Did not work for me, no sound there. though volume input is set to 96. Maybe I am missing something. – polym Aug 13 '15 at 11:19
  • `sox` can record to ogg? – Vitaly Zdanevich Jun 29 '16 at 06:26
  • @VitalyZdanevich Yes seems like it, check `man soxformat` – epatel Jun 29 '16 at 10:44
  • 3
    @VitalyZdanevich If you're using Homebrew, you will need to install sox with `brew install sox --with-libvorbis` to record with ogg. (If sox is already installed, you will need to `brew remove sox` first.) Then you can do `sox -d recording.ogg`. – bonh May 24 '17 at 12:16
  • how to end the recording? At the moment I'm using your instruction of `sox -d recording.wav`, but am having to end using `ctrl + c`, the resulting file has no sound, although it has size (it's not an empty file). I don't know if this is a result of me using `ctrl+c` or what. – baxx Jul 12 '20 at 12:51
3

As epatel mentioned, but using the port system instead:

$ sudo port install sox
Community
  • 1
  • 1
Terry
  • 199
  • 3
  • 8