主要内容

speechInterferenceLevel

R2026b

Measure speech interference level (SIL) from audio signal

Since R2026b

    Description

    SIL = speechInterferenceLevel(audioIn,fs) returns the speech interference level of an audio signal. The SIL is the arithmetic mean of the Z-weighted equivalent continuous sound pressure levels (Leq) in the 500, 1000, 2000, and 4000 Hz octave bands, as defined by the ANSI/ASA S12.2 standard [1].

    example

    SIL = speechInterferenceLevel(___,Name=Value) specifies options using one or more name-value arguments. For example, specify TimeInterval as a positive scalar to calculate SIL as a time-varying metric.

    example

    speechInterferenceLevel(___) without any output arguments plots a bar chart of the SIL and 500–4000 Hz octave-band levels. When you specify TimeInterval as a positive scalar, the function plots SIL over time.

    Examples

    collapse all

    Load a recording of a room with background noise.

    [audioIn, fs] = audioread("office_kitchen_44p1_20s.wav");

    If possible, enter the calibration factor for the microphone used to make the recording or calculate it using calibrateMicrophone. The microphone in this example has an associated reference recording at 1 kHz with an SPL meter reading of 64 dB.

    [audioRef, fsRef] = audioread("1khz_64db_44p1.wav");
    SPLreading = 64;
    calibrationFactor = calibrateMicrophone(audioRef,fsRef,SPLreading)
    calibrationFactor = 
    2.0836
    

    Calculate the SIL of the room recording.

    SIL = speechInterferenceLevel(audioIn,fs,CalibrationFactor=calibrationFactor)
    SIL = 
    38.9369
    

    Plot the SIL to visualize the levels in the 500, 1000, 2000, and 4000 Hz octave bands.

    speechInterferenceLevel(audioIn,fs,CalibrationFactor=calibrationFactor)

    Figure contains an axes object. The axes object with title Speech Interference Level, xlabel Octave-Band Center Frequency (Hz), ylabel Sound Pressure Level (dB) contains 2 objects of type bar.

    Load an audio recording and visualize the SIL.

    [audioIn, fs] = audioread("JetAirplane-16-11p025-mono-16secs.wav");
    speechInterferenceLevel(audioIn,fs)

    Figure contains an axes object. The axes object with title Speech Interference Level, xlabel Octave-Band Center Frequency (Hz), ylabel Sound Pressure Level (dB) contains 2 objects of type bar.

    Specify a time interval of 100 ms to visualize the change in SIL over time.

    speechInterferenceLevel(audioIn,fs,TimeInterval=0.1)

    Figure contains an axes object. The axes object with title Speech Interference Level, xlabel Time (s), ylabel SIL (dB) contains an object of type line.

    Input Arguments

    collapse all

    Audio input signal, specified as a N-by-C real matrix. The function treats each column as a separate channel. N must be at least 2.

    Data Types: single | double

    Sample rate in Hz, specified as a positive scalar equal to or greater than 8000.

    Data Types: single | double

    Name-Value Arguments

    collapse all

    Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

    Example: speechInterferenceLevel(audioIn,fs,TimeInterval=0.1)

    Microphone calibration factor, specified as a positive scalar. audioIn is multiplied by CalibrationFactor before analysis. To compute the calibration factor specific to your system, use the calibrateMicrophone function.

    Data Types: single | double

    Reference pressure for dB calculation in pascals, specified as a positive scalar. The default value, 20 micropascals, is the common value for air.

    Data Types: single | double

    Analysis time interval, specified as "full" or as a positive scalar in seconds. When you specify TimeInterval as "full", the function computes a single SIL value over the entire signal duration. When you set TimeInterval to a numeric value, the function computes SIL at nonoverlapping regular time intervals of the specified duration. The numeric value must not exceed the signal duration, and must be at least 0.001 second.

    Data Types: single | double | string | char

    Output Arguments

    collapse all

    Speech interference level in sound pressure level (SPL), returned as a scalar, 1-by-C vector, or T-by-C matrix. When you specify TimeInterval as "full", SIL is a 1-by-C vector, where C is the number of channels. When you specify TimeInterval as a numeric value, SIL is a T-by-C matrix, where T is the number of time intervals.

    More About

    collapse all

    References

    [1] Acoustical Society of America. Criteria for Evaluating Room Noise. ANSI/ASA S12.2-2019 (R2023). Acoustical Society of America, 2019.

    [2] Acoustical Society of America. American National Standard for Rating Noise with Respect to Speech Interference (R2011). ANSI/ASA S12.65-2006. Acoustical Society of America, 2011.

    Version History

    Introduced in R2026b