/ Модель

Характеристики

Лицензия
CC BY-NC-SA 4.0
Архитектура
sed-cnn-transformer · dense
Библиотека
pytorch
Опубликована
8 окт 2026

surround-sound

Классификация аудиоАудио → label

Surround Sound обнаруживает невербальные голосовые и фоновые звуки в аудиозаписях и выдаёт их метки с временными границами для обогащения транскриптов и анализа аудио.

49скачиваний за 30 дней0лайковвеса обновлены9 окт 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Surround Sound — небольшая модель theboringai-work для обнаружения звуковых событий в аудиозаписях. Она сочетает CNN и Transformer, содержит 5,8 млн параметров и распознаёт 54 класса невербальных голосовых звуков и окружающих шумов: например, дыхание, кашель, смех, музыку, гудки, лай и сирены. Модель обрабатывает аудио окнами по 8 секунд и выдаёт для событий метки, вероятности и временные границы; оценки обновляются с шагом 40 мс. Доступен код для объединения событий с транскриптом Whisper.

Модель предназначена для обогащения транскриптов, анализа аудиокорпусов, фильтрации данных и помощи в разметке с последующей проверкой человеком. Указаны английский, китайский, хинди и бенгальский языки; обучение также использовало речь из разных регионов Индии. Для обработки входное аудио приводится к моно и частоте 16 кГц. В README приведены результаты оценки на отложенных записях, но пороги подбирались на данных, частично пересекающихся с оценочными, поэтому метрики могут быть оптимистичны; стандартных бенчмарков не проводили. Качество на некоторых классах и в новых акустических условиях ограничено или не измерено. Лицензия — CC BY-NC-SA 4.0, допускающая некоммерческое использование на её условиях.

Сценарии применения

  • добавление кашля, смеха и дыхания в расшифровку речи
  • разметка музыки, сирен, лая и других фоновых звуков с временными границами
  • поиск звуковых событий в аудиокорпусах
  • предварительная разметка записей для последующей проверки человеком

Ограничения

Точность слабая или ненадёжная для ряда классов, а качество на новых акустических условиях не измерено; пороги настраивали на данных, частично пересекающихся с оценочными, и стандартные бенчмарки не проводили. Модель не предназначена для диагностики, наблюдения или принятия решений о людях.

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Surround Sound: speech event detector

Demo: Surround Sound Space: a 59-minute documentary with the detected sounds, per-tag probabilities and an aligned transcript, synced to the video.

A small detector (5.8M parameters) that finds non-verbal vocal sounds (breath, cough, laugh, sigh, sniff, throat clearing, …) and background sounds (music, horn, vehicle, dog bark, siren, rain, applause, …) in recordings, with start and end times. It covers 54 classes. The included code also merges detected events into a Whisper transcript. An illustrative example:

so I was saying [cough] that the <horn> road was blocked </horn> [breath] anyway

[tag] marks a sound made by the speaker, placed where it starts. <tag> … </tag> wraps the words a background sound overlaps.

  • Input: audio of any length (any format ffmpeg reads), resampled to 16 kHz mono.
  • Output: a list of {label, start, end, prob} events, one probability per class every 40 ms, or a transcript with tags.
  • Speed: about 39× real time on 8 CPU threads and 380× on an NVIDIA T4 (3 minutes of audio).

Quick start

pip install torch torchaudio numpy scipy safetensors huggingface_hub    # plus the ffmpeg binary
pip install openai-whisper                                               # optional, for transcripts
hf download theboringai-work/surround-sound --local-dir surround-sound
cd surround-sound
python inference.py my_audio.mp3                    # transcript with tags + event list
python inference.py my_audio.mp3 --asr none         # events only
python inference.py recordings/ --asr none --json events.jsonl

From Python, run from the downloaded folder:

from sed import Detector, rich_transcript, clean

det = Detector.from_pretrained("theboringai-work/surround-sound", profile="sensitive")   # or a local folder path
events = det.detect("my_audio.mp3")
# [{'label': 'cough', 'start': 0.68, 'end': 2.0, 'prob': 0.92}, {'label': 'breath', 'start': 7.72, 'end': 8.72, 'prob': 0.94}, ...]

times, probs = det.frame_probs(audio_16k)          # raw per-class probabilities on the 40 ms grid

# with any ASR that gives word timestamps: words = [(word, start_s, end_s), ...]
print(rich_transcript(words, clean(words, events)))

Useful options of inference.py:

optionmeaning
--profile sensitive|balancedthreshold set (below)
--hide breath,lip_smackleave tags out
--thr cough=0.5,machine=1.01change thresholds for this run (above 1 switches a class off)
--asr none|openai-whisper|transformerstranscription backend
--language, --asr-modelWhisper language and size
--timesinclude times inside the tags
--json out.jsonlmachine-readable output

Files

filecontent
model.safetensors, config.jsonweights, class list and settings
thresholds_sensitive.jsonper-class thresholds tuned for F2 (default)
thresholds.jsonper-class thresholds tuned for F1
detect_config.jsonpost-processing setting (hysteresis ratio)
sed/, inference.pyinference code (PyTorch)

Model

audio 16 kHz ─► log-mel (64 bands, 25 ms window, 10 ms hop)
            ─► 5 conv blocks (3×3, BatchNorm, ReLU; frequency /16, time /4)
            ─► linear projection + sinusoidal positions
            ─► Transformer encoder (6 layers, d=256, 8 heads, pre-norm, GELU)
            ─► linear + sigmoid: 54 probabilities every 40 ms

The model sees 8 s windows. Long audio is processed with a 2 s hop, and overlapping predictions are averaged. Each class's probability track is then median-filtered over 200 ms and thresholded with hysteresis (an event starts above the class threshold and continues while above 0.6 × threshold). Events closer than 0.3 s (speaker sounds) or 1.0 s (background) are joined, and events shorter than 0.15 s are dropped.

Threshold profiles

Every class has its own threshold, tuned on real held-out recordings by 2-fold cross-validation.

profiletuned for43 reliably measured classes (frame level, cross-validated)
sensitive (default)F2: a missed sound costs twice a false tagrecall 0.52, precision 0.27
balancedF1recall 0.41, precision 0.35

Classes and accuracy

frame AP: frame-level average precision on real held-out windows. CV F1: cross-validated frame F1 at the balanced threshold. found: share of held-out real events detected (overlapping prediction of the same class) with the sensitive profile. weak: too little held-out data (< 1 s of positive frames) or CV F1 < 0.1; treat these tags as hints.

Speaker sounds, [tag]

tagframe APCV F1 (balanced)held-out events found (sensitive)status
sigh0.720.6584% of 389reliable
snore0.550.6168% of 28reliable
laugh0.520.4779% of 587reliable
breath0.500.5080% of 1,116reliable
sniff0.440.4265% of 272reliable
sneeze0.430.210% of 8reliable
scream0.420.1316% of 32reliable
throat_clear0.340.3862% of 190reliable
cough0.310.4056% of 329reliable
whisper0.300.3736% of 36reliable
burp0.220.2857% of 7reliable
shout0.150.2645% of 97reliable
cry0.070.0543% of 61weak
gasp0.070.1337% of 41reliable
lip_smack0.050.1322% of 9reliable
chew0.040.0610% of 29weak
groan0.010.0319% of 36weak
yawn0.010.017% of 14weak
hiccup0.000.0121% of 14weak
nose_blow0.000.000% of 1weak

Background sounds, <tag> … </tag>

tagframe APCV F1 (balanced)held-out events found (sensitive)status
music0.880.8184% of 1,361reliable
horn0.590.5676% of 258reliable
applause0.580.4834% of 199reliable
whistle0.520.4928% of 83reliable
dog_bark0.510.4766% of 128reliable
vehicle0.500.4987% of 549reliable
siren0.490.4758% of 114reliable
bird0.400.4364% of 791reliable
water0.390.3875% of 192reliable
insect0.380.4342% of 87reliable
cheer0.320.3326% of 73reliable
crowd0.320.2461% of 41reliable
wind0.320.3068% of 206reliable
gunshot0.310.3281% of 75reliable
bell0.260.3580% of 87reliable
explosion0.220.4663% of 54reliable
baby_cry0.220.4039% of 31reliable
construction0.210.3367% of 220reliable
glass_break0.200.2112% of 58reliable
dishes0.200.2042% of 50reliable
phone_vibrate0.170.4025% of 4reliable
rain0.160.2812% of 43reliable
animal0.150.1452% of 538reliable
child_voice0.150.1948% of 179reliable
machine0.140.2851% of 137reliable
thunder0.100.1954% of 13reliable
buzzer0.090.1220% of 25reliable
beep0.090.1856% of 165reliable
phone_ring0.090.2070% of 64reliable
door0.080.035% of 21weak
tv_speaker0.040.0744% of 23weak
footsteps0.040.0850% of 218weak
fan0.040.0415% of 13weak
knock0.000.000% of 5weak

Evaluation

All evaluation uses real recordings held out from training:

Each class is scored only on the datasets that label it. Whole clips are run through the full detector; a true event is found if a same-class prediction overlaps it, and a prediction is correct if it overlaps a same-class true event. Macro averages over classes with ≥ 10 held-out events:

classes (≥10 held-out events each)classeseventsrecall (sensitive)recall (balanced)precision (sensitive)precision (balanced)F1 (sensitive)F1 (balanced)
speaker sounds163,2710.460.330.380.400.380.34
background sounds326,0960.510.390.260.340.290.33
all489,3670.490.370.300.360.320.33

Thresholds were tuned on held-out data that overlaps the evaluation clips, so absolute numbers are somewhat optimistic. No standard benchmark (e.g. DCASE) has been run.

Training data

Real annotated recordings, event crops pasted into speech at known times (synthetic mixtures), and augmentation with real background noise.

datasetrolelicense (as stated by the source)
NonVerbalSpeech-38KMandarin/English recordings with one timestamped vocal event eachCC BY-NC 4.0, non-commercial research
Vaani Noise Event TimestampsIndic speech recorded on phones (58 Indian languages); 319 noise tags with timestamps (blog post)CC BY 4.0
NonverbalTTSEnglish (VoxCeleb, Expresso); sound positions in the transcript, timestamps obtained by forced alignmentannotations CC BY-NC-SA 4.0; audio under the source corpora's terms
AudioSet-StrongYouTube clips with temporally strong labelsnot stated on this mirror
OpenSLR 99 (Deeply Nonverbal Vocalization)isolated vocalizations recorded on phonesCC BY-NC-ND 4.0
DNChome background recordings (TV, appliances, cars, quiet rooms)MIT
DEMANDmulti-channel environmental noiseCC BY 4.0 (the record's text also states CC BY-SA 3.0)

Training examples (171,000 windows of 8 s, including augmented copies) were drawn from about 168 h of real annotated training recordings, plus event crops, speech beds and background noise; held-out recordings (about 17 h) were used only for model selection, thresholds and evaluation. Training ran for 10 epochs on one NVIDIA T4 (about 18 minutes per epoch), warm-started from a preliminary 31-class checkpoint of the same architecture. The checkpoint with the best mean macro average precision on the real held-out sets is kept (epoch 6).

Limitations and intended use

  • Intended for research and non-commercial use: rich transcription, corpus analysis, data filtering, and annotation assistance with human review.
  • Domains: training audio is mostly Mandarin drama, Indic phone speech, English interviews and acted speech, and YouTube. Accuracy on other domains (e.g. call centres, meetings, far-field microphones) is unmeasured. Check it on your own labelled sample.
  • Weak classes (tv_speaker, fan, footsteps, cry, groan, chew, door, yawn, hiccup, nose_blow, knock) fire rarely and unreliably.
  • Steady hum from some microphones can trigger machine or fan. Use --hide machine,fan if needed.
  • Timing: tag positions in transcripts depend on the ASR's word timestamps.
  • Not suitable for health or diagnostic use (e.g. inferring illness from coughs), surveillance, or any decision about a person.

License

The weights are released under CC BY-NC-SA 4.0 to respect the non-commercial and share-alike terms of the training data above. One source (OpenSLR 99) is CC BY-NC-ND 4.0. Users are responsible for complying with the terms of the training data in their jurisdiction. Commercial use is not permitted.

Citation

@misc{surround_sound_2026,
  title  = {Surround Sound: speech event detector},
  author = {Bar, Ayush Kumar},
  year   = {2026},
  note   = {Model on the Hugging Face Hub},
  url    = {https://huggingface.co/theboringai-work/surround-sound}
}

Please also cite the training datasets (see their pages).

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · pytorch · audio-classification

Нельзя запустить

Архитектура sed-cnn-transformer неизвестна transformers в образе рантайма.

Ревизия весов
d507911

0 моделей