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

65 ビュー (過去 30 日間)
ngoc quy hoang ngoc quy
ngoc quy hoang ngoc quy 2021 年 2 月 27 日
コメント済み: ranavind 2023 年 1 月 31 日
calculate sound level

回答 (1 件)

jibrahim
jibrahim 2021 年 3 月 4 日
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 件のコメント
Justin
Justin 2022 年 10 月 29 日
Hi, any idea how to obtain the L10, L50 and L90 sound level from an audioread() file?
ranavind
ranavind 2023 年 1 月 31 日
Any Idea, How to use this code in another application like .Net or Python

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeAudio and Video Data についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by