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

    Records unprocessed microphone audio through an AudioWorklet.

    Opens the microphone with the SDK's capture profile constraints (instrument by default: no echo cancellation, noise suppression or automatic gain), reads back what the browser actually applied, and collects raw samples stamped with their audio-context frame so they line up with the take clock.

    const audio = new AudioCapture({ onLevel: (level) => meter.set(level) });
    const settings = await audio.start(audioContext, clock);
    // … perform …
    const result = await audio.stop();
    const wav = encodeWav(result.channels, result.sampleRate);
    Index

    Constructors

    Accessors

    Methods

    • Stop recording, release the microphone, and return the captured audio. The chunks held while recording are let go once the take is assembled, so a take costs its length once over from here, not twice.

      Returns Promise<AudioCaptureResult>

    • true when the browser can open a microphone and run an AudioWorklet

      Returns boolean