pub struct DenoiseFeatures {
    pub x: [Complex32; 481],
    pub p: [Complex32; 481],
    pub ex: [f32; 22],
    pub ep: [f32; 22],
    pub exp: [f32; 22],
    /* private fields */
}
Expand description

Contains the necessary state to compute the features of audio input and synthesize the output.

This is quite a large struct and should probably be kept behind some kind of pointer.

Fields§

§x: [Complex32; 481]

The Fourier transform of the most recent frame of input.

§p: [Complex32; 481]

The Fourier transform of a pitch-period-shifted window of input.

§ex: [f32; 22]

The band energies of x (the signal).

§ep: [f32; 22]

The band energies of p (the signal, lagged by one pitch period).

§exp: [f32; 22]

The band correlations between x (the signal) and p (the pitch-period-lagged signal).

Implementations§

Creates a new, empty, DenoiseFeatures.

Returns the computed features.

Shifts our input buffer and adds the new input to it. This is mainly used when generating training data: when running the noise reduction we use DenoiseFeatures::shift_and_filter_input instead.

Shifts our input buffer and adds the new input to it, while running the input through a high-pass filter.

Computes the features of the current frame.

The return value is true if the input was pretty much silent.

Applies a filter to the audio, attenuating pitches that have poor correlation with the pitch-lagged signal.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.