1

I want to use a microphone and get input from it to sample it in real time and I don't have a set idea about how to interface it to get the input. Any help will be appreciated.

0

I plugged a usb sound card, one of those £2 eBay ones yesterday.

http://www.instructables.com/id/Use-USB-Sound-Card-in-Raspberry-Pi/

This guide sorted me out. I had it all working in under 30mins.

0

If you have to use the USB as the input, then you should set up an asym plugin (in your .asoundrc file) to allow you to read from the USB card and write to the onboard audio jack on the Pi.

Alternatively, you could purchase a high quality sound card which does both input and output and simply use the one card. The advantages of using the one card is that there will be no clock drift between audio devices. There are other advantages, such as the ability to NOT use plugins and use ALSA more directly.

A short list of available cards (with inputs) is available on eLinux here.

If you would like to use the asym plugin route then setting up the asym plugin has been summarised on stack exchange here. A snippet from that discussion is to setup your .asoundrc file using your devices names, like so (which will playback on device 1, sub device 1 and capture from deivce 0) :

pcm.!default {
    type asym
    playback.pcm "plughw:1,1"
    capture.pcm  "plughw:0"
}
ctl.!default {
        type hw
        card 1
}
  • Thank you for the response, I will be using two USB jack with pyaudio as I want to use two microphone at the same time. Do you know a better alternetive to pyaudio for the use of two microphones simultaneously. – Yash Krishan Sep 19 '17 at 14:59
0

You can attach a very cheap USB "stick-shaped" sound card, e.g. I have something like this (although it was Goobay branded, but I think they have all the same chips). They are class compliant so work out of the box. If you run a professional computer music software to capture the microphone signal, e.g. SuperCollider or Pure Data, you may also want to install QJackCtl as a simple interface in wiring up the sound app and the card.

0

I used this Mini USB 2.0 3D Virtual on my Linux embedded devices running on debian ARM OS and it works just great with any regular microphones.

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.