matlab - Normalize energy of two audio signals -


i have different audio signals , want ensure of them have same energy. goal sound equal (same volume) when play them. tried following method (explained above) when play them sound different. also, if compute energy after normalization apply, different. doing wrong?

what is: 1) calculate energy each audio signal using envelope hilbert transform,

% calculate envelope envelope = abs(hilbert(wave));  % calculate energy in sound energyinsound=sum(envelope.^2) 

2) ensure have same energy,

for channel=1:2         regwave(:,channel) =  1000.* wave(:,channel)./energyinsound(channel); end 


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -