Skip to content

Audio Config

Controls alert tones, volume, playback from PCM files, and microphone recording. All audio is 16‑bit PCM at 8 kHz.

Key path: devcfg.audioout, devcfg.audioin

{
"devcfg": {
"audioout": {
"alert": "id",
"durMS": 1000,
"vol": 100,
"ref": "id"
},
"audioin": {
"ref": "id",
"durS": 10,
"vad": false
}
}
}

Important To play a sound immediately, send an action — do not use devcfg. See Beep action. Setting alert and ref here only changes the default alert tone and playback file used the next time an alert fires; it does not play anything itself.

Audio code or ID of the tone/beep to play when an alert is active.

Configuration variables

  • Type: string
  • Default: none
CodeTypeDescription
AT1Tone1 kHz continuous
AT2Tone2 kHz continuous
AT5Tone500 Hz continuous
ABSBeepSlow beeps
ABFBeepFast beeps
ABEBeepExtremely fast beeps
{ "devcfg": { "audioout": { "alert": "AT2" } } }

Maximum duration in milliseconds for an alert tone or file playback. The actual sound may stop earlier if the file is shorter.

Configuration variables

  • Type: integer
  • Default: 1000
{ "devcfg": { "audioout": { "durMS": 2000 } } }

Volume level as a percentage of the nominal gain. 0 = silent, 100 = nominal, 200 = 2× gain.

Configuration variables

  • Type: integer (0‑200)
  • Default: 100
{ "devcfg": { "audioout": { "vol": 150 } } }

File ID of a raw PCM file to play. The device looks for /audio/<id>.pcm or /audio_rec/<id>.pcm.
The file must be 16‑bit, 8 kHz mono.

Configuration variables

  • Type: string
  • Default: none
{ "devcfg": { "audioout": { "ref": "my_tune" } } }

song (piezo tunes) is only available on piezo hardware; not implemented on speaker‑based devices.

File ID where the recording will be stored. The file is written to /audio_rec/<id>.pcm.

Configuration variables

  • Type: string
  • Default: none
{ "devcfg": { "audioin": { "ref": "rec1" } } }

Maximum recording time in seconds.

Configuration variables

  • Type: integer
  • Default: 10
{ "devcfg": { "audioin": { "durS": 30 } } }

If true, the voice activity detector is enabled. Recording only starts when voice is detected, but the total timeout (durS) still applies.

Configuration variables

  • Type: boolean
  • Default: false
{ "devcfg": { "audioin": { "vad": true } } }