Taos API Reference
    Preparing search index...

    Class Microphone

    Live microphone input. Wraps getUserMedia + a MediaStreamAudioSourceNode and exposes an output node plus a built-in analyser for level metering / visualization. The raw input is not routed to the speakers by default (to avoid feedback); call connect to route it somewhere — a bus input, an effect, or another analyser.

    const mic = await audio.requestMicrophone();
    mic.connect(audio.bus('voice').input); // monitor through the voice bus
    const level = mic.getLevel(); // 0..1 RMS
    Index

    Properties

    stream: MediaStream

    The live media stream.

    output: AudioNode

    Graph node carrying the mic signal; connect this onward.

    analyser: AudioAnalyser

    Built-in analyser tapping the mic (already connected).

    Accessors

    Methods

    • Current input level in [0, 1] (RMS), via the built-in analyser.

      Returns number