How to record sound in OS X Terminal? [closed]
Asked Answered
B

2

22

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

Banksia answered 7/2, 2013 at 17:55 Comment(1)
You can run applescripts from the command line. That should do it for you.Mcdaniels
B
35

Install brew and then install sox

$ brew install sox

$ sox -d recording.wav
Boride answered 7/2, 2013 at 18:34 Comment(8)
How do you record audio out only, not the microphoneDocilu
does this interfere with skype or any other recording apps?Gabionade
/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: 5Alamo
Did not work for me, no sound there. though volume input is set to 96. Maybe I am missing something.Sanguinary
sox can record to ogg?Columbite
@VitalyZdanevich Yes seems like it, check man soxformatBoride
@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.Protraction
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.Purvis
S
3

As epatel mentioned, but using the port system instead:

$ sudo port install sox
Shoshonean answered 13/3, 2016 at 19:47 Comment(1)
That should be a comment on his question, not a new answer.Excitable

© 2022 - 2024 — McMap. All rights reserved.