主要内容

stipaExcitation

Generate STI and STIPA test signals

Since R2026a

    Description

    testSignal = stipaExcitation(fs) generates a speech transmission index for public address (STIPA) test signal according to IEC 60268-16:2020 [1].

    example

    testSignal = stipaExcitation(fs,Name=Value) specifies options using one or more name-value arguments.

    example

    Examples

    collapse all

    Simulate the impulse response of a room using acousticRoomResponse.

    fs = 48e3;
    roomDimensions = [50,80,15];
    tx = [25,2,5];
    rx = [25,4,2];
    ir = acousticRoomResponse(roomDimensions,tx,rx,...
        SampleRate=fs,ImageSourceOrder=6,...
        MaxNumRayReflections=50,NumStochasticRays=4000);

    Generate the speech transmission index for public address (STIPA) excitation signal using stipaExcitation.

    x = stipaExcitation(fs);

    Model a real-world measurement by filtering the excitation signal through the impulse response.

    y = fftfilt(ir',x);

    Calculate STIPA using speechTransmissionIndex.

    sti = speechTransmissionIndex(y,x,fs)
    sti = 
    0.6179
    

    Simulate the impulse response of a room using acousticRoomResponse.

    fs = 48e3;
    roomDimensions = [50,80,15];
    tx = [25,2,5];
    rx = [25,4,2];
    ir = acousticRoomResponse(roomDimensions,tx,rx,...
        SampleRate=fs,ImageSourceOrder=6,...
        MaxNumRayReflections=50,NumStochasticRays=4000);

    Generate the full speech transmission index (STI) excitation signal.

    x = stipaExcitation(fs,Type="Direct Full STI");

    Reshape the excitation into a matrix so it can be filtered through the simulated impulse response.

    size(x)
    ans = 1×3
    
          480000          14           7
    
    
    xr = reshape(x,size(x,1),[]);
    size(xr)
    ans = 1×2
    
          480000          98
    
    

    Model a real-world measurement by filtering the reshaped excitation signal through the impulse response.

    y = fftfilt(ir,xr);

    Reshape y to match the original dimensions of x.

    y = reshape(y,size(x));

    Calculate STI using speechTransmissionIndex.

    sti = speechTransmissionIndex(y,x,fs)
    sti = 
    0.6213
    

    Input Arguments

    collapse all

    Sample rate in Hz, specified as a scalar equal to or greater than 16 kHz. IEC 60268-16:2020 prescribes a sample rate of at least 48 kHz.

    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: testSignal = stipaExcitation(fs,Type="Direct Full STI")

    Duration of test signals in seconds, specified as a scalar equal to or greater than 1. The default duration depends on Type:

    • "Direct STIPA" (default) — 18 seconds

    • "Direct Full STI" — 10 seconds

    Data Types: single | double

    Type of test signal to generate, specified as a character vector or scalar string:

    • "Direct STIPA" (default) — Generates a single test signal that combines a selection of the full STI modulation frequencies per octave band. The output is a column vector of length fs × Duration.

    • "Direct Full STI" — Generates the full 98 test signals consisting of the combination of all octave band carriers and modulation frequencies.

    Data Types: char | string

    Output Arguments

    collapse all

    Test signals, returned as arrays with dimensions depending on Type:

    • "Direct STIPA" (default) — N-by-1, where N corresponds to the duration of the signal.

    • "Direct Full STI"N-by-14-by-7, where N corresponds to the duration of the signals, 14 corresponds to the modulation frequencies (0.63, 0.8, 1, 1.25, 1.6, 2, 2.5, 3.15, 4, 5, 6.3, 8, 10, 12.5 Hz) and 7 corresponds to the octave band carriers with centers 125, 250, 500, 1000, 2000, 4000, 8000 Hz. The modulation depth is 1.

    References

    [1] IEC 60268-16:2020. "Sound system equipment - Part 16: Objective rating of speech intelligibility by speech transmission index." International Electrotechnical Commission.

    Extended Capabilities

    expand all

    C/C++ Code Generation
    Generate C and C++ code using MATLAB® Coder™.

    Version History

    Introduced in R2026a