Studio microphones are typically defined as mics that adhere to ‘AES42’. Published by the Audio Engineering Society, AES42 is a standard for connecting microphones to digital recording equipment. In a nutshell, an XLR cable (the three pin variant is the most common) sends audio to your computer (analog-to-digital converter) and power to the microphone. Oh. Power. Chances are you going to run into the phrase ‘phantom power’. Your microphone needs power, and your audio interface is what usually supplies it. So phantom power is just the electricity that your microphone needs. Make sure the voltage requirements of your microphone matches the audio interface (There are three variants of phantom power, 12, 24 and 48 volts).

To connect a studio microphone to your Raspberry Pi, you will need the following:

Wiring this up is straight forward. The only catch to keep in mind is that you need an external powered USB hub to provide enough power to the audio interface and microphone.

Photo of how to wire a studio microphone to scarlett solo audio interface and Raspberry Pi.

The following configuration tweaks make the Scarlett audio interface detected in Raspbian.

  • Change the line options snd-usb-audio index=-2 in /lib/modprobe.d/aliases.conf to options snd-usb-audio index=0 this will make the USB audio interface the default sound source.
  • Add the line dwc_otg.fiq_fsm_enable=0 to /boot/cmdline.txt. This will allow the scarlett audio interface to be correctly detected.
  • Reboot.

You are now all ready to record audio to your Raspberry Pi. From the command line:

	$ arecord --duration=10 -D plughw:1 -c 2 -f S32_LE foo.wav

Or, the PortAudio library can access audio data from your own software.

	$ sudo apt-get install libasound2-dev
	$ wget http://www.portaudio.com/archives/pa_stable_v19_20140130.tgz
	$ tar -xvzf pa_stable_v19_20140130.tgz
	$ cd portaudio
	$ ./configure
	$ make
	$ sudo make install