How to calculate Time stamp
4 views (last 30 days)
Show older comments
Hi All, I have audio file i.e .wav. I have read this file using wavread...After that plotted a graph between time and amplitude. Now, I have to calculate the time stamp at which the amplitude changes first (i.e. where the vocal response starts fist). This audio file contains more than vocal responses. Difficulty is how to find best way to calculate the occurrence of first voice in each case. Can you please suggest me code.
2 Comments
Answers (1)
Image Analyst
on 2 Nov 2012
Edited: Image Analyst
on 2 Nov 2012
From the help:
"[y, Fs] = wavread(filename) returns the sample rate (Fs) in Hertz used to encode the data in the file."
So can't you do something like this
firstLoudElement = find(y > thresholdValue, 1, 'first');
itsTime = firstLoudElement / Fs;
I'm not sure because I don't deal with sound signals very often. Of course you would have to define thresholdValue based on your signal and what you consider to be louder (a signal with higher amplitude) than the background sound. Of course if you have loud background sounds, like music, and want to find just where the voices start, ignoring the music, then you will have to get a signal where you have just voices first, like using frequency filtering, or something fancier and more effective like ICA:
0 Comments
See Also
Categories
Find more on Simulation, Tuning, and Visualization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!