You may want to use pyaudio library.
CHUNK = 1024
FORMAT = pyaudio.paInt16
CHANNELS = 2
RATE = 44100
RECORD_SECONDS = 60
p = pyaudio.PyAudio()
stream = p.open(format=FORMAT,
for i in range(0, ...
The USB sound adapter that you refer to seems for headphones, not for input on amplifiers. Depending a bit on the output circuitry of that sound stick, you could provide a typical headphone load, or a voltage divider, or preferably, both. If the stick provides a current-driven output, then adding additional resistors in series would seem counterproductive.
The test pads are wired as follows.
Or in more detail from here:
I'm not sure how directly the 5V from the Pi's power in links to the USB port though - ao the USB device may have power but one of the other lines may have issues (the Pi0 doesn't have a polyfuse etc for current surges)!
Test pad designations can be found here, they apparently are similar to ...
Yes, that converter should be enough to give you good audio - at least it should make the audio sound like what it's supposed to sound like. Of course, you get what you pay for, and if you wanted stunning hd audio, you would have to invest in really good speakers and an even better converter. But for normal applications, that should be fine.
Just note it ...
Turns out an audio jack has to be connected when the python script is running in order for the USB sound card to be working. Strange, but works for what I'm trying to do. When configured to use the internal 3.5 mm minijack port this is not needed.
If the USB connection is dropped across multiple sound cards, make sure the pi has a sufficient power supply. The lack of power could cause the USB sound card to shut down, and reboot due to not drawing too much power in its powered down state. A potential cause of this could be due to the resistance of long cables, or other equipment attached to the pi.
There is an option that the AEC (Acoustic Echo Cancellation) you are trying to use is not capable of handling the echo tail in your system. I suggest to start by measuring the echo tail in your system. The following post will guide you how to measure the echo tail.
I don't have a solid answer for you, but since I know the pi zero has USB-OTG, I figured it might be able to do what you want. So I did some research on using the pi zero to emulate usb devices and found things like this tutorial on setting it up as a usb mass storage device that didn't seem very easy. Then I simply did a web search for "pi zero act as usb ...