Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I'm a new programmer and I'm looking for some help.

Here is my problem. I need to detect peaks in a live audio from a pickup microphone and output the exact time to milliseconds or preferably nanoseconds of the peak in a .txt file.

I have been looking at two possible solutions. The first one was to set up a shell script in linux to record audio increments of 5 seconds via the nohup function and then analyze them in matlab, but the problem here is that the endings and the beginnings of the recorded files are not exactly 5 seconds apart. There is a delay of 50-150 milliseconds when a new file starts recording.

The second option was to do something similar to what they use for clap light switches, but I have no idea how I would extract the exact time from that. And I also don't know if that would work with a pickup microphone or does it just work with a sound sensor (for Arduino...) like it is shown here.http://en.code-bude.net/2014/12/08/how-to-build-a-clap-switch-using-arduino/

I want to know if there is a better solution out there. Can I do this in C++ or java, perhaps? Remember, I need to output the exact time in milli- or nanoseconds.

Thank you guys, much help is appreciated.
Posted
Updated 21-Dec-17 6:15am
v2

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900