0% found this document useful (0 votes)
59 views1 page

Correlation

Uploaded by

api-381840243
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views1 page

Correlation

Uploaded by

api-381840243
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

12/11/2017 Correlation

Contents
MatchingNoiseandSpeech
Method1finddelay
Method2MovieSlateWay

MatchingNoiseandSpeech

clc;close all; clear all;

% Read audio files


[input,ifs] = audioread('Real_Input_Final.m4a');
input = (input(:,1)+input(:,2))/2;
[noise,fs] = audioread('Realnoise.m4a');
noise = resample(noise,ifs,fs);

Method1finddelay

% Find how many delays


D = finddelay(noise,input);

% Trim signals before delay time


input_1 = input(D:end,1);

% Make the length of noise same as the length of speech


noise_1 = noise(1:length(input_1),1);

% Run adaptive filters here

Method2MovieSlateWay

% Find the max inpluse signal and its index


[M_n,I_n] = max(noise);
[M_i,I_i] = max(input);

% Trim signals before the impulse signal


noise_2 = noise(I_n:end,1);
input_2 = input(I_i:end,1);

% Make the length of noise same as the length of speech


noise_2 = noise_2(1:length(input_2),1);

% Run adaptive filter here

PublishedwithMATLABR2017a

le:///Users/Y/Desktop/Google%20%E4%BA%91%E7%AB%AF%E7%A1%AC%E7%9B%98/EECS%20351/EECS351%20Project/Final/Code_TO_SUBMIT_V3/h 1/2

You might also like