/** * Computes the biased autocorrelation of `frame` for lags 0..`order`. * * @remarks * A symmetric Hamming window is applied before computing the autocorrelation * to reduce spectral leakage at frame boundaries. The result is a length-`(order+1)` * array where index `k` corresponds to lag `k`. * * @param frame - Input signal frame. * @param order - LPC predictor order; returned array has length `order + 1`. * @returns Autocorrelation coefficients `r[0..order]`. */ export declare function autocorrelate(frame: Float32Array, order: number): Float32Array; /** * Computes LPC predictor coefficients from an autocorrelation vector using * the Levinson-Durbin recursion. * * @remarks * Returns the predictor coefficients `a[0..order-1]` (0-based index corresponds * to predictor lag 1..`order`) such that the predictor is: * ``` * x̂[n] = a[0]*x[n-1] + a[1]*x[n-2] + ... + a[order-1]*x[n-order] * ``` * Returns a zero vector if the signal is silent (`r[0] < 1e-10`). * * @param r - Autocorrelation array from {@link autocorrelate} (length `order + 1`). * @param order - Number of predictor coefficients to compute. * @returns LPC predictor coefficients `a[0..order-1]`. */ export declare function levinsonDurbin(r: Float32Array, order: number): Float32Array; /** * Applies the LPC analysis (whitening) FIR filter to a signal frame in-place. * * @remarks * Computes the prediction residual: * ``` * e[n] = x[n] − a[0]·x[n−1] − a[1]·x[n−2] − … − a[p−1]·x[n−p] * ``` * The filter state `zi` (length `order`) holds the `order` most recent input * samples (`zi[0]` = x[n−1], `zi[1]` = x[n−2], …) and is updated in-place * so the state carries over across successive calls. * * @param frame - Input signal samples. * @param a - LPC predictor coefficients from {@link levinsonDurbin}. * @param zi - Filter memory (modified in-place). Allocate as `new Float32Array(order)`. * @returns New array containing the whitened residual signal. */ export declare function applyAnalysisFilter(frame: Float32Array, a: Float32Array, zi: Float32Array): Float32Array; /** * Applies the LPC synthesis (coloring) IIR filter to a residual frame. * * @remarks * Reconstructs a colored signal from the residual: * ``` * y[n] = e[n] + a[0]·y[n−1] + a[1]·y[n−2] + … + a[p−1]·y[n−p] * ``` * The filter state `zi` (length `order`) holds the `order` most recent output * samples (`zi[0]` = y[n−1], `zi[1]` = y[n−2], …) and is updated in-place. * * Combined with {@link applyAnalysisFilter} using the same coefficients, * this reconstructs the original signal: `synthesis(analysis(x)) ≈ x`. * * @param frame - Residual signal (output of the analysis filter). * @param a - LPC predictor coefficients from {@link levinsonDurbin}. * @param zi - Filter memory (modified in-place). Allocate as `new Float32Array(order)`. * @returns New array containing the re-colored output signal. */ export declare function applySynthesisFilter(frame: Float32Array, a: Float32Array, zi: Float32Array): Float32Array; //# sourceMappingURL=lpc.d.ts.map