How to get raspberry pi 4 to read a line-in input from a sound card - python-3.x

I want my Raspberry pi to read the audio off of my main computer and then make some adafruit neopixel lights that I have connected change brightness in correlation to how loud the audio is. The coding (probably) will not be an issue, but I can not figure out how to get the Raspberry pi to read my sound card with a line-in input correctly. For reference, I am using a raspberry pi 4 and the sound card I am using is a ICUSBAUDIO7D.

Related

Raspberry Pi to SIM8200EA-M2_5G_HAT with audio jack

I am trying to make python based phone calls, using a raspberry pi (4) and a waveshare SIM8200EA-M2_5G_HAT.
The first part was easy: find the AT commands to send over serial interface to start/stop the call.
Next step was supposed to be playing an audio file. Python to play an audio file was easy peasy. Sound came out to the audio jack of the pie. Before I think about the final solution to wire pi to HAT, I used the same earphone (phones and mic) to directly connect to the HAT. A started call (using minicom) did not provide any sound. Neither could I use the microphone nor did I hear anything from the call.
Is anyone familiar with this setup - or at least the HAT - and know about the pain to make the audio jack working?

Changing volume of Radio, depending on “music” or "speaking" with Raspberry Pi and Librosa?

My problem :
I’m listening to info-radio, where the information is important, not the music.
In Belgium, the music is always louder than the speaking.

How to debug a Linux I2S audio input issue

I am trying, and failing, to connect an I2S microphone (Invensense ICS43432) to my Raspberry Pi (B+) running Arch Linux. I have asked for specific advice in the relevant Arch Linux ARM forum but my question is really more general than that: how does one go about debugging Linux audio input issues?
I have verified with a logic analyser that the I2S microphone is sending sensible data in the correct channel (left) and the correct pin of the Raspberry Pi. The I2S microphone appears under ALSA as a "sound card". arecord is perfectly happy to record from that device and I have boosted the gain of that device using alsamixer by 30 dB. Yet all the data bytes of the recorded file are zero.
How does one go about checking the flow of audio data, the operation of DMA, under Linux?
I had the same problem trying to record in stereo, using 2 Adafruit I2S MEMS breakout mics: arecord worked fine, but zeros when using ALSA to write to a bin file. Choosing a 32 bit word format (Little Endian 32 bits, Signed) made it work. Only I end up with 64 bit stereo Frames.

Getting Input from electret microphone max4466

I want to get input from an electret microphone on the raspberry pi 3 in python 3. The electret microphone is max4466 from Adafriut. VCC is plugged into 5.ou, GND is plugged into GND, and OUT is plugged into GPIO 11. I have GPIO 11 set for input, but all I get are 0's. What should I do to get input?
The MAX4466 is an amplifier with analog outputs, not digital ones and zeroes. The GPIO pins are purely digital and can't accept an analog input. In order to digitize the output from a microphone, you need to hook it up to an analog-to-digital converter (ADC). Adafruit sells little ADC boards to help you do this. The ADC digital output would hook up to your GPIO on the Raspberry Pi.
Here's a link to learn about ADCs from Adafruit:
https://learn.adafruit.com/raspberry-pi-analog-to-digital-converters/overview

How do you get input from a USB microphone in Python 3?

How do you get input from a USB microphone in Python 3? I want to use a raspberry pi 3 model b and a USB microphone. The USB microphone has the automatic gain off. I want to get the decibel level of the sound the USB microphone is picking up, and I want to use that information as a variable to be used in the Python 3 program. I DO NOT WANT to record sound from the USB microphone, save it as a wave file, and use the wave file in the program. I want the program to be working with real time sound.

Resources