mobium audio
This tool on every surface: CLI · MCP · Python · JavaScript · Go · Java · .NET
Capture what the device plays, and say what it held
audio start begins; audio stop -o capture.wav finishes, saves a WAV and
prints a timeline: when there was sound and when silence, to a tenth of a
second, and each sound's pitch and level. audio alone says whether a
capture is running.
Assert on sound, silence and pitch, not on level: the level follows the device's volume. Everything the device played is in it — with touch sounds on, a tap is a tenth of a second of sound.
The stop also says what interrupted the app — a call muting it, a ringtone, alarm or notification over it — for --app, or the app in front at the start. An Android emulator captures the sound; on an Android phone, which nothing outside it can hear, only the interruptions are recorded.
--expect makes the stop an assertion: the sounds to hear, in order, each a pitch with an optional length in seconds — 440:1.8-2.2 — or 0 for a sound with no one pitch; "silence" for none. Sounds of --ignore-ms or less do not count. Anything else fails, says what was heard, and still saves the WAV.
Usage
mobium audio [start | stop] [flags]
Flags
| Flag | Type | Default | What it does |
|---|---|---|---|
--app | string | On start: the app whose interruptions to report (default: the app in front) | |
--expect | string | On stop: the sounds to hear in order, e.g. 440:1.8-2.2,880, or "silence" | |
--ignore-ms | int | 200 | With --expect: sounds this short or shorter do not count |
--output -o | string | Where to save the WAV on stop (default: ./audio- |
And the global flags.
Examples
Start capturing what an app plays
mobium audio start --app dev.mobium.mobiumapp
Printed on an Android 15 emulator:
capturing audio — stop it with action "stop" and a path
Stop, save the capture, and assert what was heard
mobium audio stop -o heard.wav --expect 440
Printed on an Android 15 emulator:
saved …/heard.wav: 3.746s of audio: 0.0–0.5s silence, 0.5–0.6s sound, no one pitch (-46 dBFS), 0.6–2.6s 440 Hz (-42 dBFS), 2.6–3.7s silence — at media volume 5 of 15
More, from mobium audio --help
mobium audio start
mobium tap testid=play
mobium audio stop -o capture.wav
mobium audio stop -o capture.wav --expect 440:1.8-2.2,880
mobium audio stop -o quiet.wav --expect silence
No screenshot: it captures what the device plays, and answers with a timeline of sound, silence and pitch; nothing on the screen changes.
The tool
audio calls app_audio; its arguments and what every client calls it are there.