audiorouter-0.1.5 is not a library.
audiorouter

A cross-platform command-line audio router. Reads a TOML configuration file, opens named audio devices, remaps and mixes audio channels in real time, and writes the result into virtual or physical output devices.
Features
- Real-time channel remapping and mixing (many-to-one, one-to-many, mono-to-stereo)
- Per-route gain (dB) and mute
- Optional per-output peak limiter
- Terminal UI with live VU meters and route graph
- Config file watching with live reload
- Shell completion generation (Bash, Fish, Zsh, …)
- XDG config path with platform-native fallback
Installation
Quick Start
Find your device names:
Create a config file at the default path:
[]
= 48000
= 256
[[]]
= "mic"
= "MacBook Pro Microphone"
[[]]
= "out"
= "BlackHole 2ch"
= true
[[]]
= "mic"
= "out"
= [1, 1] # mono → stereo
= [1, 2]
= -6.0
Validate the config, then run:
Usage
Usage: audiorouter [OPTIONS] [COMMAND]
Commands:
run Start audio routing (default)
check Validate config and device availability, then exit
list-devices List available audio input/output devices
config-path Print the resolved configuration path
completions Generate a shell completion script
Options:
-c, --config <FILE> TOML configuration file to read
-q, --quiet Suppress non-error output
-v, --verbose Print extra diagnostics (-vv for trace level)
-h, --help Print help
-V, --version Print version
Shell completions
# Write to stdout and source immediately (fish example)
|
# Write to a file
Configuration
Configuration Path
Resolution order:
$XDG_CONFIG_HOME/audiorouter/config.toml— ifXDG_CONFIG_HOMEis set~/.config/audiorouter/config.toml— if the file already exists there- Platform-native:
- Linux/BSD
~/.config/audiorouter/config.toml - macOS
~/Library/Application Support/audiorouter/config.toml - Windows
%APPDATA%\audiorouter\config.toml
- Linux/BSD
Print the resolved path for your system:
Config Reference
[engine]
| Key | Default | Description |
|---|---|---|
sample_rate |
48000 |
Sample rate in Hz |
buffer_size |
256 |
Buffer size in frames |
[[devices]]
| Key | Required | Description |
|---|---|---|
device |
yes | Exact device name as reported by list-devices |
name |
no | Alias used in routes (defaults to device) |
limiter |
no | Enable peak limiter on output (default false) |
[[routes]]
| Key | Required | Description |
|---|---|---|
from |
yes | Source device alias |
to |
yes | Destination device alias |
from_channels |
yes | 1-based source channel list |
to_channels |
yes | 1-based destination channel list |
gain_db |
no | Gain in dB (default 0.0) |
mute |
no | Mute this route (default false) |
from_channels and to_channels must have the same length. Repeat a channel index to duplicate it (e.g. mono-to-stereo: from_channels = [1, 1], to_channels = [1, 2]).
License
Apache License 2.0 — see LICENSE.