Skip to content
Version v0.35 ยท supported
[WIP] Pending copyedit and approval.

Audio and microphone

Amri listens through one audio device and speaks its feedback through another. If Amri does not hear you, the first thing to check is which device it is listening to. This page covers how to see the devices on your machine and how to point Amri at the right one.

List your devices

Run Amri with --list-devices to print every audio device it can see and exit:

amri --list-devices

Each line shows a direction, a name, and a description. IN is a microphone or capture device, OUT is a speaker or headset. A * marks the device your system uses by default:

IN  * alsa_input.usb-Blue_Microphones_Yeti-00.analog-stereo   Yeti Stereo Microphone
IN    alsa_input.pci-0000_00_1f.3.analog-stereo               Built-in Audio
OUT * alsa_output.usb-Logitech_PRO_X-00.analog-stereo         PRO X Wireless

The first column of the name (before the two spaces and the description) is the value you put in engine.toml. If nothing is listed, no audio device was found: check that your microphone is plugged in and that the system audio service is running.

Choose the microphone

The device Amri listens to is set by preferred_input_device, a top-level key in engine.toml. Set it to a device name from --list-devices. An empty value (the default) means Amri uses the system default input.

# engine.toml
preferred_input_device = "alsa_input.usb-Blue_Microphones_Yeti-00.analog-stereo"
preferred_output_device = ""

The name is matched as a glob, so * stands in for any run of characters. This is useful when a device name changes between reboots or ports:

preferred_input_device = "*Yeti*"

Empty means system default

Leaving preferred_input_device empty is the right choice for most people: Amri follows whatever microphone the desktop is set to use. Only name a device when the default is the wrong one, or when you have more than one microphone.

Choose the output

preferred_output_device is the matching top-level key for Amri's own audio: spoken feedback and command sounds. It works the same way. An empty value uses the system default output.

# engine.toml
preferred_output_device = "alsa_output.usb-Logitech_PRO_X-00.analog-stereo"

Output tuning

The optional [audio] table configures how Amri's own audio behaves. Every key is optional and every value below is the default.

Accepted, not yet active

Amri reads and stores these keys today, but their audio effect is not wired up in the current release, so setting them has no audible result yet. They are documented here because the configuration is stable. The descriptions below are the intended behaviour.

Key Type Default Intended effect
ducking bool false Lower other audio while Amri speaks, so feedback is audible without you touching the volume.
ducking_level number (0.0-1.0) 0.3 The fraction other audio drops to while Amri speaks. 0.3 means 30 percent.
ducking_fade_ms integer 100 Fade window, in milliseconds, for the volume change, so it is not abrupt.
sidetone bool false Loop your microphone back to the output at a low level, so you hear yourself and can confirm the capture path is live.
sidetone_gain_db number -20.0 Playback level for the looped-back microphone, in decibels. Negative values attenuate.
# engine.toml
[audio]
ducking = true
ducking_level = 0.3
sidetone = true
sidetone_gain_db = -20.0

These settings live only in engine.toml

The [audio] table is engine configuration, not part of a profile. An imported or shared profile cannot change how Amri handles your audio devices.

  • Setup walks through first-run configuration, including audio.
  • Tuning recognition covers confidence and endpointing once the right microphone is selected.