Processing audio signal in sensor
Afnan last edited by
I'm trying to do target recognition using the target acoustic signal. I tested my code in matlab, however, i'm trying to simulate that in C to test it in tinyOS using sensor simulator.
In matlab, i used wav records (16 bits per sample, 44.1 sample rate), so for example, i have a record for a certain object, lets say cat sound which of 0:01 duration, in matlab that will give me a total of 36864 samples of type int16 ,and size 73728 bytes.
In sensor, if i have [Mica2 sensor: 10 bits ADC (but i'll use 8 bits ADC), 8 MHz microprocessor, and 4 Kb RAM. This means that when i detect an object, i'll fill the buffer with 4000 samples of type uint8_t (if i used 8 KHz sample rate and 8 bits ADC).
So, my question is that:
In matlab i used a large number of samples to represent the target audio signal(36864 samples), but in the sensor i'm limited to only 4000 samples, would that be enough to record the whole target sound?
Thank you very much, highly appreciate your advice
Welcome to the MySensors community.
While this is an interesting question, I don't think youl'll find many audio analysis experts in this forum. We're mainly focused on home automation.
What results did you get when you tried in Matlab with the lower sample rate and shorter duration?
Will the mcu be able to perform the required calculations quick enough?
How much ram will the calculations require?
Will the required libraries fit in the flash on the mcu?
Linking to your question on Stack Overflow so people don't waste time answering here if there already has been posted an answer there: https://stackoverflow.com/questions/44609083/processing-audio-signals-in-matlab-vs-sensor