Speech and audio
Audio Tagging, Sound Event Detection, and Acoustic Scene Analysis
Distinguish clip tagging, temporal event detection, acoustic scene classification, multilabel ontologies, weak labels, and continuous-stream evaluation.
By the end you can
- Define audio tagging, sound event detection, and acoustic scene analysis as an operational problem with explicit inputs, outputs, and boundaries
- Distinguish audio tagging, sound event detection, and acoustic scene classification without treating them as interchangeable
- Trace the workflow from define the ontology and unit through evaluate continuous behavior
- Evaluate audio tagging, sound event detection, and acoustic scene analysis using macro and micro multilabel precision and recall and evidence from difficult deployment slices
Comparison
What happened, when, and where
Three questions get asked of the same recording and they are not the same question. What was audible in it? When exactly did each thing start and stop? What kind of place was it recorded in?
Audio tagging answers the first and makes no claim at all about the second. A label covers the whole clip and says only that something happened somewhere inside it. Sound event detection answers the second, putting each event on a timeline. Acoustic scene classification answers the third, describing a context rather than an incident.
The three are scored on different evidence, and that is where the trouble starts. A system trained and measured on the first question can look finished right up to the moment production asks it the second. The gap is neither hypothetical nor small. AudioSet is the field's largest labelled collection, and its original release carries labels on its 1.8M training clips at 10 sec resolution only. A tagger trained on it has never once been shown where an event began or ended.
Everything that follows is what happened when teams measured that instead of asserting it. Google Research went back and re-annotated its own dataset at roughly 0.1 sec resolution. Audio Analytic showed that changing only the scoring rule reorders a leaderboard. A group at Tampere University kept the ten scenes and the ten cities and changed nothing but the microphone.
Audio tagging
Predicts one or more labels for an entire clip.
- Decision focus: Define the ontology and unit
- Useful evidence: Macro and micro multilabel precision and recall
- Watch for: Treating weak clip labels as exact event boundaries
- Best used when its assumptions are documented for audio tagging, sound event detection, and acoustic scene analysis
Sound event detection
Predicts event class with onset and offset or frame activity.
- Decision focus: Choose weak or strong supervision
- Useful evidence: Event-based and segment-based detection measures
- Watch for: No explicit unknown or out-of-scope event handling
- Best used when its assumptions are documented for audio tagging, sound event detection, and acoustic scene analysis
Acoustic scene classification
Predicts a broader environment such as street, office, or station.
- Decision focus: Model context and polyphony
- Useful evidence: False alarms per hour and time-to-detection
- Watch for: Dataset source artifacts standing in for scene class
- Best used when its assumptions are documented for audio tagging, sound event detection, and acoustic scene analysis
Example
AudioSet's own authors went back for the boundaries
The strongest evidence that a clip label is not an event label was published by the people who published the clip labels. In 2021 Google Research went back to AudioSet and named the limit of its own resource. The original release's 1.8M training clips carry labels only at 10 sec resolution. Nothing in such a label says when a sound began, when it ended, or how many separate events a burst of them should become.
So they collected new ones. About 81k annotations with precise onsets and offsets, at roughly 0.1 sec resolution. 14k of those fall in the evaluation set, leaving up to 67k for training — roughly 4% of the 1.8M weakly-labelled training clips. Their abstract states it plainly: “We devised a temporally-strong evaluation set (including explicit negatives of varying difficulty) and a small strong-labeled training subset of 67k clips (compared to the original dataset's 1.8M clips labeled at 10 sec resolution).”
Then they measured what the re-annotation bought. A ResNet-50 fine-tuned on a mix of weak and strong labels moved from d' 1.13 to d' 1.39 on the strong evaluation set including explicit negatives. The paper splits that 0.26 gain into 0.11 attributable to temporal precision and 0.15 to other factors. The new labels were released as an update to AudioSet.
That is the episode the rest of this lesson keeps coming back to. Not because 0.26 of d' is a large number. Because of what had to happen to get it. The team best placed to know what a 10 sec label contains decided it did not contain boundaries. Then it paid for 67k clips of fresh annotation to obtain them. No amount of clip-level precision and recall on the weak labels would have surfaced that. Those numbers are counted over clips, and the missing thing was inside the clip.
- Six things have to stay apart in what follows: clip tagging, temporal event detection, acoustic scene classification, multilabel ontologies, weak labels, and continuous-stream evaluation. Let two of them blur and the price is 81k hand-collected onset/offset annotations.
- Underneath it all sits a single failure: weak clip labels treated as exact event boundaries. Up to 67k re-annotated clips at roughly 0.1 sec resolution exist because 10 sec labels could not be read that way.
- The evidence anyone would think to ask for is macro and micro multilabel precision and recall, and on the weak labels it was already fine. The gain the strong labels produced showed up on a different instrument: d' on a strong evaluation set that included explicit negatives of varying difficulty.
- The practical response is a test set that carries event-free time, clusters, overlaps, and changing scenes. The temporally-strong evaluation set came before the temporally-strong training subset for exactly that reason.
Case
527 classes, ten-second clips, a 200-millisecond collar
Those weak labels were not careless. They have the shape the field's standard resources give labels, and that shape is a choice someone made. AudioSet, released by Google in 2017, holds 2,084,320 human-labelled ten-second clips drawn from YouTube, about 5,800 hours in all. Its ontology defines 632 audio event classes. Only 527 of them are annotated in the released data. That figure is confirmed from outside Google by the FSD50K paper: “Note that the AudioSet vocabulary is a subset of 527 classes drawn from the ontology”. The same paper records that AudioSet's official release consists of pre-computed features rather than audio.
FSD50K is the second choice made from the same 632 entries, and comparing the two is the quickest way to see that a vocabulary is a decision rather than a fact. It gathers 51,197 Freesound clips, 108.3 hours, clips running from 0.3 to 30 s, labelled with 200 classes — 144 leaf nodes and 56 intermediate. Only 31.5 of its 108.3 hours are exhaustively labelled, and all of its ground truth is clip-level, that is, weak. One ontology of 632 entries. One team drew 527 classes from it, another drew 200. Both left the boundaries unmarked. Ten seconds, or anything from 0.3 to 30 s, is the unit. So a 300-millisecond alarm and a nine-second one arrive in that vocabulary as the same kind of entry.
The scoring tolerance is a choice too. DCASE, the detection challenge series, scores events with an onset collar of 200 milliseconds and an offset collar of 200 milliseconds or twenty per cent of the event duration, whichever is larger. For an event as brief as that 300-millisecond alarm the percentage is the smaller of the two, so the flat figure governs. The slack left over is a substantial fraction of the event itself.
How much does the rule matter? Enough to reverse a leaderboard. In 2020 Bilen and colleagues at Audio Analytic took three DCASE 2019 Task 4 systems and re-scored them without touching a single model: the baseline, the 1st-ranking and the 4th-ranking, renamed System 1, 2 and 3. Under the DCASE collar-based F1 the three scored 23.70%, 42.32% and 39.90%. Under the paper's intersection criteria at (rho_DTC, rho_GTC) = (0.5, 0.5) the same three scored 61.38%, 60.13% and 63.24%. The collar-based worst does not merely draw level with the collar-based best. It passes it, 61.38% against 60.13%, and the collar-based best falls to last of the three. The paper says why: “many FPs for System 1 were due to split detections which are reinstated as TPs using the DTC/GTC approach”.
Split detections are the collar's weak point because human annotators do not agree on where one event ends and the next begins. The paper's own illustration: “E.g, a dog barking repeatedly could be as reasonably interpreted by human listeners as a single dog barking event, as it could be interpreted as several separate dog bark events, and exhaustive labelling specs turn out difficult to define and enforce in practice.” A metric that scores boundaries has to take a position on a question the ground truth never settled.
Figure
A label is not a cause
Both the vocabulary and the tolerance, then, are settled before a model is trained, and what they settle is how much a label is allowed to mean. An event label indicates that an audible pattern matched an entry in an ontology. It does not prove the physical source, the cause, the danger, the intent, or the uniqueness of that event. A clip-level system never claims an alarm was sounding. It claims a clip resembled the clips annotated that way.
The deeper version of the gap is named in the field's standard tutorial, published in IEEE Signal Processing Magazine in 2021. It puts it this way: “Sound event detection defines the task at event level, but practical methods solve it at segment level, thus creating a mismatch between the problem and its solution.” The same tutorial fixes the vocabulary this lesson depends on. A weak label applies to the whole recording. A strong label applies to specific segments. Its Figure 8 illustrates the 200 ms collar on both onset and offset — a peer-reviewed source for the tolerance, independent of the challenge page that sets it. It calls the use of collars a significant weakness in event-based evaluation. That is the criticism PSDS was built to answer.
The three tasks differ in precisely this respect. Audio tagging predicts labels for a broad clip, sound event detection adds temporal localization, and acoustic scene classification characterizes an environment or recording context. Different units, different label semantics, different error costs. Multiple sources overlap and scenes change inside a single clip. Whether any of that becomes measurable is not something the model decides. It is decided by whether the ontology and the unit you chose leave anything for a continuous-operation test to look at. Multilabel precision and recall support a decision only when they are counted over the unit the system will really run on.
Treating a predicted label as a proven cause hands a decision to a system that only ever claimed an audible pattern matched an ontology entry.
Key idea
Four cheap simplifications, one alert stream
Four simplifications are cheap to make at design time, and each is paid for later in the same currency: an alert stream nobody can act on.
1) Treating weak clip labels as exact event boundaries. 2) Providing no explicit handling of unknown or out-of-scope events. 3) Letting dataset source artifacts stand in for the scene class. 4) Counting every overlapping frame as an independent false alarm.
The first is what up to 67k re-annotated AudioSet clips were bought to undo. The fourth is what the Audio Analytic re-scoring measured: charge a system for every split detection and the DCASE 2019 baseline scores 23.70%; reinstate those split detections and the same untouched system scores 61.38%.
The third stops being a warning and becomes a number in the DCASE 2020 Task 1 overview, written at Tampere University. Its development set holds ten acoustic scenes recorded in ten cities with nine devices — three real (A, B, C) and six simulated (S1-S6). Device A alone supplies 40 of its 64 hours. The Subtask A baseline scored 54.1% over the development set as a whole, and the breakdown is the point: “Highest accuracy is obtained on device A (70.6%), while the other devices for which a small amount of data is available in training provide about 50-60% accuracy; the lowest accuracy is observed for the unseen devices (39-48%).” Same ten scenes, same rooms and streets, different microphone, and roughly a third of the accuracy is gone. S4, S5 and S6 appear only in the test split. That is all it took. The 33-hour evaluation set spans ten scenes across all twelve cities with eleven devices, five of them unseen in training. There the best of the roughly 90 Subtask A submissions (92 systems from 28 teams) reached 76.5%, against a 51.4% baseline.
The second failure mode is the quiet one and it has no such table. A system with no way to say unknown has to place every sound somewhere in a fixed vocabulary — 527 classes, or 200, or ten. Nothing in its output distinguishes a confident match from the least-bad available entry. All four share one move. They read a label as a claim about the world, when the ontology licensed only a claim about an audible pattern.
Weak labels mark that something audible happened somewhere in the clip; read them as start and end times and the alert stream becomes precise about boundaries nobody ever annotated.
Example
The unit decides what an error costs
Charging the operator several times for one event is a unit problem rather than a modelling problem. Unit problems are why four words that sound like near-synonyms are nothing of the kind. Each names a different thing to count, and what an error costs follows from which one was picked.
- Audio tagging assigns one or more labels to a recording and locates none of them in time. AudioSet's 2,084,320 clips and FSD50K's 51,197 are labelled this way. The tutorial calls such a label weak, because it applies to the whole recording.
- Sound event detection predicts an event class together with the time interval it occupies. A strong label, in the same tutorial's terms, applies to specific segments — the kind Google Research collected at roughly 0.1 sec resolution, about 81k of them.
- Polyphony is the simultaneous occurrence of multiple acoustic events. It is the ordinary case, not the edge case, and it is why the replacement score proposed at Audio Analytic is a polyphonic sound detection ROC curve rather than a single confusion matrix.
- An acoustic scene is a broader environmental context, inferred from recurring sounds and recording conditions rather than from any one event — the ten scenes of DCASE 2020 Task 1, recorded in ten cities and, fatally for a naive classifier, on nine identifiable devices.
Steps
Design a continuous sound-event benchmark
The way to stop all of this being a matter of opinion is to make the benchmark run the way the system runs. On a continuous benchmark another team can watch weak clip labels being treated as exact event boundaries, and can see the alert stream that follows. On a benchmark of isolated clips they cannot.
One published deployment did all four steps in the open. SONYC is an acoustic sensor network that runs continuously in New York City. As of December 2018 it had 56 sensors, primarily in Greenwich Village plus other locations in Manhattan, Brooklyn and Queens. Together they had gathered the equivalent of 30 years of audio data and more than 60 years of sound-pressure levels and telemetry. Its team described it in Communications of the ACM in February 2019. The problem is not academic. New York's 311 line has logged more than 2.7 million noise-related complaints since 2010, roughly 834 a day.
Step one, long recordings rather than clips: theirs is a continuous stream from fixed sensors, not a folder of isolated examples. Step two, an explicit matching and triggering rule, written down before the results. In an 11-month Washington Square Park study, from May 2016 to April 2017, they triggered on instantaneous SPL exceeding a documented threshold. That threshold was 10 dB above a background computed as a moving average of SPL measurements within a two-hour window, the level the city's noise code defines as indicating potential violations. Step three, convert outputs into an operator's burden: the trigger produced a countable number of detections rather than a per-frame score. Step four, review what the detections actually were: “Our analysis resulted in detection of 324 such events we classified by noise source and determined 76% (246) were related to construction as follows: jackhammering (223), compressor engines (16), metallic banging/scraping (7), and the remainder to non-construction sources, mainly sirens and other traffic noise.”
Note what that review is. It is the ontology-gap and acoustically-similar-event audit, done on real detections. Jackhammering, compressor engines and metallic banging/scraping are the classes that a coarse construction label would have collapsed together.
Note too what the paper is candid about. Their machine-listening models performed robust multi-label classification over 10 common classes of urban sound sources in real time on a laptop, and the authors write that they would “soon adapt them to run under the computational constraints of the Raspberry Pi”. At the time of writing the classification was not running on the sensor at all. Write down what your choice of ontology and unit assumes, find the recording that breaks the assumption, and state what your continuous evaluation does when it meets one.
1. Create long recordings
Include event-free time, clusters, overlaps, and changing scenes.
2. Define event matching
Set onset, offset, duration, and merge tolerances.
3. Measure alert burden
Convert frame outputs into product alerts with cooldown and grouping.
4. Review false alarms
Classify acoustically similar events and ontology gaps.
Load the test set with events that sound alike and events the ontology cannot name; without both, the score will not survive continuous audio.
Example
False alarms per hour is the product number
Start with what a good clip-tagging score actually looks like, because the number is lower than the confidence usually placed on it. The best PANNs system reached mean average precision 0.439 on AudioSet tagging in 2020, against a previous best of 0.392. The paper says it in one line: “Our best PANN system achieves a state-of-the-art mean average precision (mAP) of 0.439 on AudioSet tagging, outperforming the best previous system of 0.392.” That is the headline for clip tagging across 527 classes on the field's largest dataset. At the state of the art it sits below 0.5 mAP.
The point of a portfolio is that the numbers are allowed to disagree. Macro and micro multilabel precision and recall can rise while ontology coverage, unknown rejection, and scene-transition behavior get worse. The decision turns on which of those the product actually runs on. For a system running around the clock that is a rate, not an accuracy. Which is why PSDS, the replacement score proposed at Audio Analytic, is the normalised area under a polyphonic sound detection ROC curve whose x-axis is an effective false-positive rate in events per hour. Its e_max, the maximum eFPR of interest, is set to 100 events/hour in the main experiment and 50 in one reported setting. The x-axis is chosen in the units the operator lives in.
The portfolio also has to mark the point where clip labels can no longer stand in for event boundaries. That is where the system should abstain or fall back instead of continuing to fire.
- For the core task, macro and micro multilabel precision and recall — with a calibrated sense of scale: mAP 0.439 was the state of the art for AudioSet tagging, against a previous best of 0.392.
- For system behavior, event-based and segment-based detection measures, which are the ones capable of seeing a boundary at all. They reordered three DCASE 2019 Task 4 systems from 23.70/42.32/39.90 to 61.38/60.13/63.24 when only the matching rule changed.
- For the robustness slice, false alarms per hour and time-to-detection. PSDS is built on an effective false-positive rate in events per hour, with e_max at 100 events/hour, because that is the burden an operator carries.
- Over the working life of the system, ontology coverage, unknown rejection, and scene-transition behavior — the last of which fell from 70.6% to 39-48% the moment DCASE 2020 Task 1 changed the recording device.
Report macro and micro multilabel precision and recall together with ontology coverage, unknown rejection, and scene-transition behavior.
Key takeaways
- AudioSet's own authors collected about 81k onset/offset annotations at roughly 0.1 sec resolution, because the original release's 1.8M training clips carry labels only at 10 sec resolution. Fine-tuning on up to 67k of them moved d' from 1.13 to 1.39.
- An event label indicates that an audible pattern matched an ontology entry. The field's standard tutorial puts the gap plainly: the task is defined at event level but practical methods solve it at segment level. Nothing in the output proves source, cause, danger, intent, or uniqueness.
- The ontology and the unit are fixed before any model is trained, and they decide what a later test can measure at all. From one ontology of 632 classes, AudioSet released 527 and FSD50K drew 200. At ten seconds, a 300-millisecond alarm and a nine-second one carry the same label.
- Audio tagging, sound event detection and acoustic scene classification answer related but different questions, and the third is fragile in a way the first two hide. The DCASE 2020 Subtask A baseline scored 70.6% on device A and 39-48% on the devices held out of training.
- Scoring tolerances are choices rather than facts. Audio Analytic re-scored three DCASE 2019 Task 4 systems without touching them: 23.70%, 42.32% and 39.90% under the collar became 61.38%, 60.13% and 63.24%, and the ranking reversed.
- Report macro and micro multilabel precision and recall — the state of the art on AudioSet tagging is mAP 0.439 — alongside ontology coverage, unknown rejection and scene-transition behavior. For anything continuous, report a rate in events per hour, as SONYC's 324 reviewed detections and PSDS's 100 events/hour axis both do.