ALSA

ALSA

Device Compatibility

Overview

Requires you to have the MATRIX Kernel Modules installed.

The following sections below will go over how to retrieve microphone input through ALSA.

Import Statement

const matrix = require("@matrix-io/matrix-lite");

.mic

This function will allow you to configure your MATRIX microphone settings. Default values will be used if no configuration was given.

  • config: object
    • rate: Any number from 0 to 15.
    • debug: true or false.
    • exitOnSilence: number of seconds.
    • channels: Any number from 1 to 8.
var mic = matrix.alsa.mic();
// or
var mic = matrix.alsa.mic({
  rate: '16000',
  debug: true,
  exitOnSilence: 6,
  channels: '1'
});

Once the microphone is setup, visit npm mic page to see what functions & event listeners are available. This package is included in MATRIX Lite.