Anna’s Status Update for 11/7

Anna’s Status Update for 11/7

The plan laid out last week about using multiple I2C mics and a much simpler acoustic location algorithm was scrapped. I actually decided to abandon I2C mics altogether, since the sampling rate was simply too garbage. Instead, I resolved to find other higher-sampling mics and spent the first couple days of the week researching. I found some mini USB mics on Amazon that could sample at 44100 Hz — which is significantly better than the previous I2C mics, by two orders of magnitude — and ordered them right away. In the short time that I waited for them to arrive, I learned a lot about arecord (a command line soundfile recorder), the pyaudio module, and how to configure the USB microphones. By the time the mics arrived, I was ready to immediately hop on the coding. I first did some testing with the mics, of course, and they are unfortunately not of the best quality. I tried using them on a call with Heather and Edward, and apparently my voice sounded incredibly muffled. When I hooked them up to the Jetson, I tried recording with arecord and found that the mics really don’t pick up voices unless they’re right up against your mouth. However, they seem to pick up the sound of a clap decently, within about five feet. They’re  a little finicky, though, and one mic in particular doesn’t seem to pick up sound as well as the others. Obviously, these mics will not be good enough for our final project, but for the sake of demo, they’ll do.

After testing the mics and playing with them a bit, I coded up the acoustic location module, which took a solid amount of time. What I ultimately ended up implementing was a peak detector for two mics, such that if two mics experience amplitude peaks close to each other in time, then the program spits out a print statement saying “Mic x detected first by ### microseconds.” 

I ran into some trouble along the way, particularly with the Jetson recognizing the devices (mics). I figured out that that was because the program is an infinite while loop, which I quit with Ctrl+Z, but killing the process doesn’t properly “close” the device and prevents the Jetson from recognizing it again after.

I also found that the different mics and USB connectors (and different combinations of the two) yielded different delays between them, but I was able to determine these delays and hardcode them into the program. (There was also some difficulty here, because I did not understand the datetime module as well as I thought I did… whoops)

I have the program working relatively well between two mics now, which I hope will be enough for demo. I plan to get the third mic incorporated later this week, and I will also be looking into better microphones that can pick up voices better.

Leave a Reply

Your email address will not be published. Required fields are marked *