Hiyve Components - v1.0.0
    Preparing search index...

    Interface AudioCaptureOptions

    Options for AudioCapture.

    interface AudioCaptureOptions {
        chunkFrames?: number;
        deviceId?: string;
        onChunk?: (
            channels: Float32Array<ArrayBufferLike>[],
            frame: number,
        ) => void;
        onError?: (error: Error) => void;
        onLevel?: (rms: number) => void;
        profile?: AudioProfile;
    }
    Index

    Properties

    chunkFrames?: number

    Frames accumulated per chunk before they are handed to the main thread

    deviceId?: string

    Microphone to use; omit for the browser's default

    onChunk?: (channels: Float32Array<ArrayBufferLike>[], frame: number) => void

    Called with every captured chunk as it arrives — one Float32Array per channel and the audio-context frame of its first sample — for analysis while recording (see LiveSession)

    onError?: (error: Error) => void

    Called when capture fails

    onLevel?: (rms: number) => void

    Called with the RMS level (0–1) of each captured chunk, for a meter

    profile?: AudioProfile

    How the microphone is opened. instrument (the default) asks for unprocessed audio — no echo cancellation, noise suppression or automatic gain — which is what analysis needs.