主要内容

mnru

Modulated noise reference unit (MNRU)

Since R2026a

    Description

    audioOut = mnru(audioIn,Fs) returns the audio signal audioOut with noise added according to the algorithms defined in the ITU-T Recommendation P.810 (03/2023) standard [1]. audioIn is the real-valued input audio signal, and fs is the sampling rate in hertz. The function assumes a signal-to-modulated-noise ratio of 15 dB by default.

    audioOut = mnru(___,Name=Value) specifies options using one or more name-value arguments.

    [audioOut,audioPT] = mnru(___) additionally outputs the filtered signal without noise (pass-through signal), audioPT.

    [audioOut,audioPT,noiseSig] = mnru(___) also outputs the noise signal, noiseSig.

    example

    mnru(___) opens the Audio Viewer app for signal playback and visualization.

    Examples

    collapse all

    Define a signal-to-modulated-noise ratio of 10 dB and an ITU-recommended reference level of –26.15 dBov.

    QdB = 10;
    refLevel = -26.15;

    Read the audio file and generate the MNRU of the audio file according to the signal-to-modulated-noise ratio and the reference level.

    [x,fs] = audioread("SpeechDFT-16-8-mono-5secs.wav");
    [y,xf] = mnru(x,fs,NoiseRatio=QdB,ReferenceLevel=refLevel);

    Listen to the clean reference signal, followed by the MNRU signal.

    as = audiostreamer(SampleRate=fs);
    play(as,xf)
    play(as,y)

    Input Arguments

    collapse all

    Input signal, specified as a real-valued 2-D matrix. The function treats the columns of the matrix as audio channels.

    Data Types: single | double

    Sample rate of the input signal, specified as a positive scalar equal to or greater than 8000. Units are in Hz.

    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: mnru(X,FS,NoiseRatio=5,DCFilter=true,NoiseFilter=false,OutputFilter=true,ReferenceLevel=-26.15);

    Signal-to-modulated-noise ratio, specified as a real-valued scalar. Typical values are 5, 15, 25, and 35. Units are in dB.

    Example: 5

    Data Types: single | double

    Reference level, specified as a nonpositive scalar. The mnru function normalizes the output signals so that the level of the pass-through signal, audioPT, matches this reference level. Units are in dBov. The ITU-T standard recommends a reference level of –26.15 dBov to avoid clipping. If unspecified, the function does not normalize the output signal.

    Example: -26.15

    Data Types: single | double

    Option to enable a DC blocking filter to input signal, specified as true or false. This filter removes DC components in the input audio signal and prevents the addition of extra noise to the output signal. If you do not specify this argument, the function applies the filter only if the Fs input argument is equal to or smaller than 16 kHz.

    Data Types: logical

    Option to enable a lowpass filter to output signal, specified as true or false. If you do not specify this argument, the function applies the filter only if the Fs input argument is equal to or smaller than 16 kHz.

    Data Types: logical

    Option to enable a long-term average speech spectrum (LTASS) filter to the Gaussian noise source, specified as true or false. This filter is compliant with ITU-T Recommendation P.50. If unspecified, the filter is applied only if the Fs input argument is greater than 16 kHz.

    Data Types: logical

    Output Arguments

    collapse all

    Output signal with added noise, returned as a real-valued 2-D matrix. The size of this matrix matches the size of the audioIn input argument.

    Data Types: single | double

    Filtered signal without added noise (pass through), returned as a real-valued 2-D matrix. The size of this matrix matches the size of the audioIn input argument.

    Data Types: single | double

    Noise signal, returned as a real-valued 2-D matrix. The size of this matrix matches the size of the audioIn input argument.

    Data Types: single | double

    Algorithms

    collapse all

    References

    [1] International Telecommunication Union. Modulated noise reference unit (MNRU). ITU-T Recommendation P.810. March, 2003.

    Extended Capabilities

    expand all

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

    Version History

    Introduced in R2026a