I need to access my microphone data in 3 ways, how do I:

  1. dump the raw data stream generated by microphone into terminal
  2. play/listen to the real-time audio captured, using the gui or terminal.
  3. record the audio into wave files using the terminal.

Also if possible I would like to be able to do number 1 and 3 at the same time.

Thank you for your time.

OS: Ubuntu 14.04 Mic: Logitech G930


You need to work with Audio Linux Sound Architecture - ALSA . The main How-To is found here.

With above How-To you can:

  1. get List of sound devices and select one which has IRQ.
  2. record sound into .wav with arecord -d 10 /tmp/test-mic.wav
  3. and play that file with aplay /tmp/test-mic.wav.

But if you need to dump raw data stream and work with that you should go deeper and refer to AlsaProject. You'll find several good links on how to do that. For example ALSA Programming HOWTO.

| improve this answer | |

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.