Closed crumplecat closed 7 years ago
c4941f25e0cb326d8377d9ce40dacc0f8bbb55ac changes the default behavior to read RAW audio from stdin. PCM WAV has headers but RAW forgoes them; the script should be able to work on PCM WAV but might exhibit strange behavior as it reads the header.
Performance is improved by about an order of magnitude but some testing is required. In particular, I'm not sure whether the input is buffered so I'm not sure what happens with high system load when the script can't keep up with incoming data.
Example usage:
arecord -D hw:1,0 -f S16_LE -r 44100 -t raw | python sonolumo-main.py
or
python sonolumo-main.py < prerecordedaudio.wav
Here's a very long recording from yesterday. Recorded using arecord (16 bit signed integer, little endian, 44.1 KHz sampling rate) and the USB mic inside a foam ball. Audacity should be able to open it.
And here's a 60 s snippet from that file that includes specific noise types:
It starts out with the low pitched whistling noise from the mic being in the Loc-Line. Starting at 39.5 s there's some sound from gentle manipulation of the mic. Starting at 58 s you can hear three strikes of the same xylophone key.
Loc-Line noise is pretty loud. Not sure we can filter it out easily. I believe the USB mic by default uses an auto-gain adjustment so if the noise is consistently louder than everything else it may just get clipped (so we could just ignore samples with max values in them).
Add line of code to store mic data from the pi. @nwayt001 @alfredyu
Lets try to have this on board by the end of the week (2/10/2017?) or by Monday 2/13/2017.