フィルターのクリア

Matlab & Analysing audio signals

4 ビュー (過去 30 日間)
Roger
Roger 2012 年 3 月 14 日
Hi there, i'm new to matlab and would like to plot a wave of an audio segment against a larger audio clip.
So for example if a the audio segment is a re-recorded part of the main audio clip, it could hilight the section it best fits against. (some kind of match algorithm)
the clips can be of the same sample rate and little to none variation from the larger file (depending on how difficult it is to implement!)
I've looked at a few examples using STFT and FFT to find correlations between audio clips of the same length on a spectrogram, but would appreciate any advise on how i could go about doing this!
Cheers.

回答 (2 件)

Paul
Paul 2012 年 3 月 20 日
I don't see the need for doing this calulation in frequency domain. I think you could just use the xcorr command and find the index with the highest value. Is there any difference between this and the classic radar problem. You match filter your transmitted signal with the refelcted one. If you don't even need to filter you can just cross-correlate which is equivalent to match filtering.

Image Analyst
Image Analyst 2012 年 3 月 21 日
I could be wrong but I can see situations where xcorr() won't find the right location. That's why they invented normalized cross correlation. For example if the test signal is high in some spot (more than 1.0 and more than your "template" values) then the correlation would be high there, after all it's just multiplying and adding so big numbers give a big signal regardless of whether they "match" each other. If anything I think you'd want to look for 1.0 rather than the highest output signal, like it says: " xcorr produces correlations identically equal to 1.0 at zero lag only when you perform an autocorrelation and only when you set the 'coeff' option. " I think you'd be better off trying normxcorr2() - it's in the Image Processing Toolbox - because it takes that into account. For educational purposes, try both, but you might not notice the difference unless you had the right kind of signal.

カテゴリ

Help Center および File ExchangeCorrelation and Convolution についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by