Audio

In this section you will learn how to get information about detected audio devices or interfaces. Results might differ on different platforms as not everything is available/detectable on each platform:

On Linux, audio devices are read from the PCI bus. If no PCI audio device is found - e.g. on ARM boards like the Raspberry Pi, which have no PCI bus - the sound cards are read from ALSA (/proc/asound) instead.

For function reference and examples we assume, that we imported systeminformation as follows:

const si = require('systeminformation');

Detected Audio Devices

All functions in this section return a promise or can be called with a callback function (parameter cb in the function reference)

Function Result object Linux BSD Mac Win Sun Comments
si.audio(cb) [ { ...}] X X X X audio informatiom
[0].id X X X X internal ID
[0].name X X X X audio name
[0].manufacturer X X X X manufacturer
[0].revision X X revision
[0].driver X X driver
[0].default X is default
[0].channel X X X channel e.g. Build-In, HDMI, USB, ...
[0].type X X X X type e.g. Speaker
[0].in X X is input channel
(Linux: ALSA devices only)
[0].out X X is output channel
(Linux: ALSA devices only)
[0].status X X X status
Example
const si = require('systeminformation');
si.audio().then(data => console.log(data));
[
  {
    id: 0,
    name: 'MacBook Microphone',
    manufacturer: 'Apple Inc.',
    revision: null,
    driver: null,
    default: true,
    channel: 'Built-In',
    type: 'Microphone',
    in: true,
    out: false,
    status: 'online'
  },
  {
    id: 1,
    name: 'MacBook Speaker',
    manufacturer: 'Apple Inc.',
    revision: null,
    driver: null,
    default: true,
    channel: 'Built-In',
    type: 'Speaker',
    in: false,
    out: true,
    status: 'online'
  }
]