I have searched for this online, but am still a bit confused (as I'm sure others will be if they think of something like this). I'd like to preface by saying that this is not for homework and/or profit.
I wanted to create an app that could listen to your microwave as you prepare popcorn. It would work by sounding an alarm when there's a certain time interval between pops (say 5-6 seconds). Again, this is simply a project to keep me occupied - not for a class.
Either way, I'm having trouble trying to figure out how to analyze the audio intake in real-time. That is, I need a way to log the time when a "pop" occurs. So that you guys don't think I didn't do any research into the matter, I've checked out this SO question and have extensively searched the AudioRecord function list.
I'm thinking that I will probably have to do something with one of the versions of read() and then compare the recorded audio every 2 seconds or so to the recorded audio of a "pop" (i.e. if 70% or more of the byte[] audioData array is the same as that of a popping sound, then log the time). Can anyone with Android audio input experience let me know if I'm at least on the right track? This is not a question of me wanting you to code anything for me, but a question as to whether I'm on the correct track, and, if not, which direction I should head instead.
Advanced FFT Spectrum Analyzer is a real-time ( RTA ) powerful audio tool to visualize and analyze signals from android device microphone in frequency domain.
The SpectrumView app can be used to measure the highest tones you can sing, obtain visual feedback of the frequencies in your speech, identify an annoying sound, calibrating musical instruments, or generally for all sorts of acoustic analysis.
A spectrum analyzer is a measurement tool that displays real-time frequency analysis of incoming audio signals. Spectrum analyzers display the results in a graph. The horizontal axis shows frequency and pitch measured in Hertz. The vertical axis shows the amplitude of those frequencies measured in decibels.
I think I have an easier way.
You could use the MediaRecorder 's getMaxAmplitude method.
Anytime your recorder detects a big jump in amplitude, you have detected a corn pop!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With