Just came across this question while trying to connect a webcam. If the webcam encapsulated audio that is fine. But what if I want to attach a microphone in another location / locations.

Question: How can I record audio using a microphone?

| improve this question | | | | |

There is no microphone input in the Raspberry Pi. Raspberry Pi's sound chip only supports audio output, not input. If you want to record some audio using RPi you will have to use some external microphone device, like USB microphone. Some USB webcameras also have build in microphones so you could use it.

| improve this answer | | | | |
  • 1
    Note that there's some kind of bug in the USB firmware that prevents it from recording without glitches/overruns for more than about 20 seconds. – scruss Aug 10 '12 at 13:35
  • Are there non-USB options? – Aleksandr Levchuk Mar 15 '15 at 7:30
  • 1
    @AleksandrLevchuk: Sure there are but they are not that easy to use and/or cheap. You can buy dedicated sound card for RaspberryPI (of which there are few now) - I know at least one which is based on wolfson chipset which has microphone input. The one I'm thinking about also has two built-in microphones. But it costs almost as much as RaspberryPi itself. Another option is to use some microphone (for example electret one) directly (you will need an amplified, though, but you can buy a module with integrated one) but since RaspberryPi does not have ADC, you will also need one. – Krzysztof Adamski Mar 15 '15 at 22:09
  • 2
    Krzysztof, thank you. For Pi2, I ended up using a USB sound card amazon.com/gp/aw/d/B001MSS6CS and a 3.5mm mic amazon.com/gp/aw/d/B005DJOIPQ, it had some sound glitches at first (soft pops every 2 to 5 second), but then they suddenly stopped and I have clear sound recordings now. Sound is very clear and highly sensitive. The only concern I have now is that the USB sound card will draw a lot of power however I have not verified that hypothesis. – Aleksandr Levchuk Mar 21 '15 at 16:31

You can plug Sony Singstar usb microphones into the RPi and record using Audacity. The sound quality is not the best, but it's not too bad and it does work.

P.S. I've found the Sony Eye-Toy usb camera with a mic doesn't work well like this.

| improve this answer | | | | |

You can either use a USB sound card or a GPIO header based sound card, such as the ones mentioned here.

By location, if you mean a different sound card, try using audacity and it will allow you to select the recording input device.

If you want to record in different locations (with different Pis), perhaps you can stream them over the network ? Using something like the rtp from ffmpeg (avconv).


| improve this answer | | | | |
  • Could you please include some specific detail in your answer, link only answers are generally discouraged. – Darth Vader Sep 3 '16 at 8:36
  • Thanks for the comment Darth, I have added more information regarding audacity. – Matt Sep 4 '16 at 9:39

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