How to calculate Time stamp
4 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Image Analyst
2012-11-2
编辑:Image Analyst
2012-11-2
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulation, Tuning, and Visualization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!