Interface NoiseProfile

Represents the acoustic profile of the environment. This profile is used by other audio components (like VAD) to adjust their sensitivity.

interface NoiseProfile {
    baselineRMS: number;
    peakRMS: number;
    noiseStdDev: number;
    frequencyProfile?: Float32Array<ArrayBufferLike>;
    environmentType: "normal" | "quiet" | "noisy" | "very_noisy";
    confidenceScore: number;
    timestamp: number;
    suggestedSpeechThreshold: number;
    suggestedSilenceThreshold: number;
    framesAnalyzedCount: number;
}

Properties

baselineRMS: number

Root Mean Square of the baseline ambient noise, calculated using a percentile.

peakRMS: number

Peak Root Mean Square detected during an observation window.

noiseStdDev: number

Standard deviation of RMS values, indicating noise floor stability.

frequencyProfile?: Float32Array<ArrayBufferLike>

Optional frequency spectrum analysis (e.g., 32 bands). Populated if enableFrequencyAnalysis is true.

environmentType: "normal" | "quiet" | "noisy" | "very_noisy"

Classified type of the acoustic environment.

confidenceScore: number

Confidence in the profile (0-1), based on data quantity and stability.

timestamp: number

Timestamp (Unix epoch ms) of when this profile was last calculated.

suggestedSpeechThreshold: number

Suggested speech detection threshold (RMS value) based on this profile.

suggestedSilenceThreshold: number

Suggested silence detection threshold (RMS value) based on this profile.

framesAnalyzedCount: number

Number of audio frames/buffers analyzed to generate or update this profile.