Align Wave

バージョン 1.1 (2.97 KB) 作成者: Wei-Rong Chen
Time-align two wave signals by shifting wav2 to be aligned with wav1, using cross correlation.
ダウンロード: 359
更新 2021/3/16

ライセンスの表示

% Time-align two wave signals by shifting wav2 to be aligned with wav1, using cross correlation.
% The inputs 'wav1' and 'wav2' can be either a string of filename or a
% struct in a format such that : 'wav1.s' contains the wave signal in a nSample x 1 vector and 'wav1.sr' is the sampling rate.
%
% All channels in input wav1, wav2 will be averaged before cross correlation comparison.
% The output 'y', 'sr' are modified signals for time-aligned wav2.
% The time of wav1 is alway preserved.
% 'delayT': "Delay" of wav2 with respect to wav1, which means wav2 was "sampled later" (i.e., signals of interest appear "earlier") than wav1 in 'delayT' sec,
% or earlier (if delayT is negative. i.e., signals of interest appear "later") than wav1 in '- delayT' sec.
% 'ifplot': if you want to plot the aligned results. Default = 0.
% 'SaveAsFName' : save the time-aligned wav2 to a specified file. Set to 0 if you don't want to save a file.
% 'resampleSR' : resampling the signals to a common resampling rate. Set to 0 to use the lower sampling rate in wav1 and wav2. Default = 8000;
% 'StartCompareTimeInWav1' : time point (sec.) in wav1 at which the CC comparison starts. {default = 0 sec.}
% 'corr_coeffs' : correlation coefficients.
%
% DEMO:
% StartCompareTimeInWav1 =1.9; % comparing starts from 1.9 sec in wav1;
% [y, sr, delayT] = AlignWave('1.wav', '2.wav', 1, 'alignedwav2.wav', [], StartCompareTimeInWav1);
%
% Weirong Chen 03-23-2014
% Modified Feb-23-2017

引用

Wei-Rong Chen (2024). Align Wave (https://www.mathworks.com/matlabcentral/fileexchange/50473-align-wave), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2012a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersCorrelation and Convolution についてさらに検索
タグ タグを追加

Community Treasure Hunt

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

Start Hunting!
バージョン 公開済み リリース ノート
1.1

Update

1.0.0.0