Mathematica doesn't recognize USB mic (Raspberry Pi / Linux)

  • Thread starter Thread starter Swamp Thing
  • Start date Start date
  • Tags Tags
    Usb
Click For Summary

Discussion Overview

The discussion revolves around the issue of a USB microphone not being recognized by Wolfram Mathematica on a Raspberry Pi running Linux. Participants explore potential solutions, experiences with similar hardware, and alternative approaches to audio input within Mathematica.

Discussion Character

  • Technical explanation, Debate/contested, Experimental/applied

Main Points Raised

  • One participant notes that the USB microphone is recognized by PulseAudio and works with other applications like Audacity and arecord, but Mathematica does not list it as an audio input device.
  • Another participant suggests checking the Wolfram site for support or existing tickets related to the issue, providing links to external resources for troubleshooting.
  • A participant shares their experience with lapel microphones on Raspberry Pi, indicating that issues arose from multiple mics sharing the same USB address, leading them to switch manufacturers for their project.
  • One participant describes the challenges of beamforming audio with Raspberry Pi, mentioning an echo effect due to processing delays when combining microphone inputs.
  • A participant mentions a workaround by using a shell command to record audio with arecord, allowing Mathematica to access the recorded file, while expressing a desire for a more integrated solution.

Areas of Agreement / Disagreement

Participants do not reach a consensus on a solution to the original problem, with multiple approaches and experiences shared but no definitive resolution offered.

Contextual Notes

Limitations include potential dependencies on specific hardware configurations, software versions, and the need for further exploration of Mathematica's compatibility with audio input devices on Linux.

Who May Find This Useful

Users of Raspberry Pi and Linux interested in audio processing with Mathematica, as well as those troubleshooting USB microphone recognition issues in similar environments.

Swamp Thing
Insights Author
Messages
1,047
Reaction score
786
Raspberry Pi / Linux...

My USB mic shows up in the PulseAudio volume control, and also works OK with Audacity and arecord.

However, it doesn't show up in Wolfram Mathematica -- $AudioInputDevices returns a null list.

Anything I can do to get the mic working in Mathematica?
 
Technology news on Phys.org
I had some issues with lapel mics on Raspberry PI Linux. The problem was due to the mics having the same USB address with no way to change them. The company didn't think someone might want to do stereo recording with their lapel mics.

In our case, we switched to another mic manufacturer. Our project was to make a headset for hearing impaired speakers who could pick out an audience member asking a question by simply looking in their direction and the two mics acted as directional mics beamforming the audio where you pointed your head.
 
  • Like
Likes   Reactions: Swamp Thing
I forgot to add that we beamformed in the PI, and the one noticeable flaw was the time it took to reach your ears. It was enough to make it sound like an echo.

You'd hear the person speaking and then the beamformed audio stream of them speaking slightly behind them. This was due to the speed at which the PI could process the mic input, add them together, and then push the result to the headset.
 
Is it hard to get a good beam shape over an acceptable range of audio frequencies?

And re my original question, my use case works ok if I run a shell command from Wolfram, where I run "arecord". Then Mathematica can open the recorded file and get to the audio samples. But I will keep looking for a more elegant way.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
706
  • · Replies 2 ·
Replies
2
Views
659
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 23 ·
Replies
23
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K