Downloads · 30 days
0
resoajoe/room-audio-event-nano
room-audio-event-nano is a audio classification model from resoajoe. Use it for the audio classification task on the model card, and read the license before you ship it in a product. The card lists the license as cc-by-4.0.
A 47,159-parameter CNN on 1-second log-mel spectrograms that labels seven room sound events: cough, speech, alarm/beep, mechanical, door/footsteps, other vocalisation (laughter, crying), and open-set other. ONNX, 188…
Downloads · 30 days
0
Access
Public
Updated Sep 4, 2026
Repo size
391 KB
Likes
0
Public
Click a slice to open those files.
.pt198 KB · 49%
From the Hugging Face model README
A 47,159-parameter CNN on 1-second log-mel spectrograms that labels seven room sound events: cough, speech, alarm/beep, mechanical, door/footsteps, other vocalisation (laughter, crying), and open-set other. ONNX, 188 KB, ~0.4 ms per clip on a CPU thread. Built for always-on edge monitoring where sending audio anywhere is not acceptable.
Domain measured / deployment domain tested: measured on FSD50K (Freesound uploads; trained on the dev split, tested on the eval split, which FSD50K separates BY UPLOADER so no contributor appears on both sides). Deployment domain: no hospital, ward or room-microphone recording has been tested. Studio-to-room transfer costs published models ~22 points on ESC-50 under reverberation; that cost is unmeasured here. If you point this at a room, you are running an experiment.
v1 of this model trained speech on LibriSpeech alone and alarms on a single IEC 60601-1-8 synthesiser. It scored 0.995 AP on speech and 0.962 on alarms in cross-validation, and 0.415 and 0.401 when tested on real Freesound uploads. It had learned "is this an audiobook" and "is this my own synthesiser". Nothing about the architecture or the front-end changed between that model and this one. Only the number of independent sources did.
The control makes this checkable: cough was already drawn from 112 independent uploads in v1 and gained just +0.046 here, while every previously single-source class gained +0.18 to +0.39.
| class | n | prevalence | model AP | best scalar AP | lift | v1 AP (same test set) |
|---|---|---|---|---|---|---|
alarm | 315 | 0.125 | 0.714 | 0.260 | +0.454 | 0.401 |
vocal_other | 304 | 0.121 | 0.702 | 0.178 | +0.524 | 0.311 |
cough | 302 | 0.120 | 0.676 | 0.246 | +0.431 | 0.630 |
door_steps | 400 | 0.159 | 0.675 | 0.302 | +0.373 | 0.486 |
mechanical | 400 | 0.159 | 0.608 | 0.346 | +0.263 | 0.260 |
speech | 400 | 0.159 | 0.598 | 0.147 | +0.450 | 0.415 |
other | 400 | 0.159 | 0.333 | 0.163 | +0.170 | 0.189 |
Average precision, one-vs-rest. Baseline + margin: the best single cheap statistic per class (temporal variance, spectral centroid, flatness or level), thresholds fitted on train and applied unchanged to test. The model beats it by +0.17 to +0.52 on every class.
The synthetic alarms are now redundant. Retraining with the 300 IEC 60601-1-8 synthetic alarm clips removed changes alarm AP by only +0.023 (0.714 -> 0.691). They remain in the shipped training set as augmentation, but the model does not depend on recognising its own synthesiser.
Named failures and their rates.
other (the open-set negative) is the weakest head at AP 0.333. Anything
unlike the six named classes is poorly modelled; treat a low-confidence result as unknown,
not as other.speech reaches 0.598, not the 0.80 predicted before the run. Real speech
clips are short, overlapped and noisy. This model detects that speech is present. It does
not transcribe, identify speakers, or infer content, and must not be used to.cough false positives are dominated by laughter and throat-clearing in the literature, which
is why vocal_other is a separate class rather than pooled into the negatives.Refusal. Report unknown rather than a class when the clip's RMS is below the room noise
floor + 6 dB, or when the top softmax margin is under 0.30. Both thresholds are conventions from
the front-end, not tuned on the test set.
Scope. Operations, not diagnosis. Detecting that a cough occurred is an observation; inferring illness from it is not something this model can do. Not a medical device. Not a substitute for a clinical alarm system: never place it where a missed detection causes harm.
Provenance. FSD50K (Fonseca et al., TASLP 2022), CC-BY, dev/eval split by uploader. Clips
carrying labels from two target groups were dropped rather than assigned. 300 IEC 60601-1-8
alarm clips synthesised with per-clip random parameters (train only, never in eval). Scripts
audio_v2_prep.py, audio_v2_train.py, audio_v2_ship.py in the loglens repo.
import numpy as np, onnxruntime as ort, json
from audio_frontend import logmel, to16k, loudest_second # bundled
cfg = json.load(open("preproc.json"))
x = to16k(wav, sr) # mono float, any sample rate
mel = logmel(loudest_second(x))[None, None] # (1, 1, 40, 98)
mel = (mel - cfg["mean"]) / cfg["std"]
logits = ort.InferenceSession("model.onnx").run(None, {"logmel": mel.astype(np.float32)})[0][0]
p = np.exp(logits - logits.max()); p /= p.sum()
order = np.argsort(-p)
print("unknown" if p[order[0]] - p[order[1]] < 0.30 else cfg["classes"][order[0]])
Trained 2026-09-04 on a Jetson AGX Orin. Part of the loglens nano family; the four-gate verdict
behind this card is in resoajoe/nanolab.