Effacer les filtres
Effacer les filtres

how to calculate sound level (spL) audio file (*.wav) ?

39 vues (au cours des 30 derniers jours)
ngoc quy hoang ngoc quy
ngoc quy hoang ngoc quy le 27 Fév 2021
Commenté : ranavind le 31 Jan 2023
calculate sound level

Réponses (1)

jibrahim
jibrahim le 4 Mar 2021
Hi ngoc,
You can use splMeter from Audio Toolbox.
% EXAMPLE: Calculate sound pressure level of signal
audFileName = 'FunkyDrums-44p1-stereo-25secs.mp3';
scope = timescope('SampleRate',Fs,...
'TimeSpanSource','property',...
'YLimits',[20 110], 'AxesScaling','auto',...
'ChannelNames',...
{'LAF', 'LAeq', 'LApeak', 'LAmax'});
sm = splMeter('TimeWeighting', 'Fast',...
'FrequencyWeighting', 'A-weighting',...
'SampleRate', Fs, ...
'TimeInterval',2,...
'CalibrationFactor',1);
x = audioread(audFileName);
[LAF,LAeq,LApeak,LAmax] = sm(x(:,1));
scope([LAF,LAeq,LApeak,LAmax])
  12 commentaires
Justin
Justin le 29 Oct 2022
Hi, any idea how to obtain the L10, L50 and L90 sound level from an audioread() file?
ranavind
ranavind le 31 Jan 2023
Any Idea, How to use this code in another application like .Net or Python

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by