26

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?

Ghanima
  • 15,855
  • 15
  • 61
  • 119
Piotr Kula
  • 17,307
  • 6
  • 65
  • 104
  • 1
    Here is how to record with microphones: http://www.instructables.com/id/How-to-Record-Voice-With-USB-Microphone-Then-Play-/ – Bay Mar 08 '16 at 20:54

3 Answers3

16

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.

Piotr Kula
  • 17,307
  • 6
  • 65
  • 104
Krzysztof Adamski
  • 9,615
  • 1
  • 37
  • 53
  • 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 07: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 http://www.amazon.com/gp/aw/d/B001MSS6CS and a 3.5mm mic http://www.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
5

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.

1

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).

Matt

Matt
  • 966
  • 6
  • 10