Audio AI-GIDS

Detectie van geluidsgebeurtenissen

Sound event detection (SED) is the task of finding which sounds occur in a recording and exactly when each one starts and stops, such as a dog barking from 2.6 to 7.2 seconds while speech overlaps it.

Luister naar deze gidsAI-verteld · ~8 min

Op deze pagina9 minuten lezen
  1. Overzicht
  2. Belangrijkste inzichten
  3. Diepe duik
  4. Scoring a detector's output by hand
  5. Implementatie in de echte wereld
  6. De toekomst van detectie van geluidsgebeurtenissen
  7. Het in de praktijk brengen
  8. Bronnen en verdere literatuur
  9. Blijf verkennen
  10. Veelgestelde vragen

Overzicht

It powers alarms, smart-home triggers and audio search, and it is harder than simple audio tagging because systems must place time boundaries on overlapping sounds, often while learning from labels that lack timestamps.

Belangrijkste inzichten

  1. Sound event detection outputs labeled events with start and end times, while audio tagging only reports which sounds appear in a clip.
  2. AudioSet holds about 2.08 million weakly labeled 10-second clips across 527 classes; strong time labels exist for only a small subset.
  3. DCASE's contrastive event-based F1 uses a 200 millisecond onset collar and an offset collar of 200 milliseconds or 20% of event length.
  4. PSDS, proposed in 2019, sweeps the decision threshold and matches events by intersection, so it does not depend on a single operating point.
  5. Adding pretrained BEATs embeddings to the DCASE 2023 baseline raised development-set PSDS scenario 1 from 0.359 to 0.500.

Diepe duik

Sound event detection asks two questions about an audio recording: what sounds are present, and when does each one occur. The output is a list of events, each with a class label, an onset (start time) and an offset (end time). The sed_eval documentation, a widely used evaluation toolbox, describes the task as locating and classifying sounds, estimating onset and offset for each sound event instance and giving it a textual label. Real recordings are usually polyphonic, meaning several events overlap: a person talks while a dishwasher runs and a dog barks. A detector must report all of them at once.

SED sits between two related tasks. Audio tagging, also called audio classification, only says which classes appear somewhere in a clip, with no timing. Acoustic scene classification gives a single label to a whole recording, such as 'street' or 'office'. SED adds temporal localization to tagging, which is what applications like alarms, captioning and audio search need.

Most modern systems follow the same pipeline. First, audio is converted into a log-Mel spectrogram, a time-frequency picture scaled to roughly match human pitch perception. Second, a neural network, commonly a convolutional recurrent neural network (CRNN), reads the spectrogram. The convolutional layers detect local patterns such as the harmonics of a bark, and the recurrent layers track context over time. Third, the network outputs a probability for every class at every time frame. Fourth, post-processing turns those frame probabilities into events: apply a threshold, smooth with a median filter to remove flicker, and merge consecutive active frames into one event with an onset and offset.

The main practical obstacle is labeling. Marking exact start and end times by hand is slow, so most available data has weak labels, meaning clip-level tags without timestamps. AudioSet, released by Google with an ICASSP 2017 paper, contains about 2.08 million human-labeled 10-second YouTube clips across 527 classes, with labels that only verify a sound is present. In 2020 Google added temporally strong labels for 16,996 evaluation clips and 103,463 training clips, about 5% of the training set, using a vocabulary of around 600 labels. Because strong labels are scarce, research has focused on learning timing from weak labels, synthetic data and unlabeled audio.

The DCASE community (Detection and Classification of Acoustic Scenes and Events) has run challenges on this since 2013, and its Task 4 is the main public benchmark for domestic SED. The 2023 edition used DESED, a dataset of 10-second clips from AudioSet or synthesized with the Scaper library, covering 10 household classes. Its development set offered 1,578 weakly labeled clips, 14,412 unlabeled in-domain clips and 10,000 synthetic clips with exact timestamps. The baseline was a mean-teacher CRNN, a semi-supervised method in which a student network learns to match the predictions of a slowly updated teacher on unlabeled audio. A second baseline added frame-level embeddings from BEATs, a model pretrained on AudioSet, and raised the development-set PSDS scenario 1 score from 0.359 to 0.500.

Evaluation choices change results a great deal. Segment-based metrics divide time into fixed segments, often one second, and check whether each class is correctly marked active in each segment. Event-based metrics match whole events, counting a detection as correct if its label matches and its boundaries fall within a tolerance called a collar. DCASE's contrastive event-based F1 uses a 200 millisecond collar on onsets and the larger of 200 milliseconds or 20% of the event length on offsets. The error rate counts substitutions, deletions and insertions relative to the number of reference events, as in speech recognition. These metrics all depend on a chosen decision threshold.

The polyphonic sound detection score (PSDS), proposed by Cagdas Bilen and colleagues in a paper posted October 18, 2019 and presented at ICASSP 2020, addresses that dependence. It sweeps the decision threshold, builds a receiver operating characteristic curve of true positive rate against false positives per hour, and summarizes it as one number. It matches events by how much they intersect rather than by fixed collars, which the authors argue is more robust to subjective labeling. DCASE uses two settings: scenario 1 emphasizes precise timing for fast reactions, and scenario 2 emphasizes avoiding confusion between classes. The 2023 task switched to a fully threshold-independent PSDS implementation.

Limitations remain significant. Reference annotations are subjective: the DCASE organizers note that experts checking AudioSet clips found many did not contain the labeled event. Systems trained on synthetic soundscapes can struggle on real recordings. Short, quiet or heavily overlapped events are often missed, and rare classes have little training data. Reported scores depend on the metric, collar and threshold chosen, so numbers from different papers are often not comparable; DCASE itself notes that its 2023 threshold-independent PSDS is not directly comparable to earlier years. On cost, the 2023 challenge made reporting training energy mandatory and added a count of multiply-accumulate operations per 10 seconds of audio, reflecting concern about compute as models grow.

04Uitgewerkt voorbeeld

Scoring a detector's output by hand

  1. Schrijf een referentie voor een 10‑seconden clip: spraak van 0.0 tot 4.0 seconden en een hondenblaffende van 2.6 tot 3.4 seconden.

  2. Schrijf de systeemoutput: spraak van 0.1 tot 4.3 seconden, hond van 2.7 tot 3.5 seconden, en een valse ‘blender’-event van 6.0 tot 6.5 seconden.

  3. Pas event‑gebaseerde matching toe met een onset‑collar van 200 milliseconden: spraak‑onset wijkt 0.1 seconde af en hond met 0.1 seconde, dus beide onsets komen overeen.

  4. Controleer offsets met een collar van de grotere van 200 milliseconden of 20 % van de eventlengte: spraak staat 0.8 seconde toe en wijkt 0.3 af; hond staat 0.2 toe en wijkt 0.1 af, dus beide komen overeen.

  5. Tel resultaten: twee true positives, één false positive (blender) en nul false negatives.

  6. Bereken precisie 2/3, ongeveer 0.67, recall 2/2 = 1.0, en F‑score 2 x 0.67 x 1.0 / 1.67, ongeveer 0.80.

Wat het laat zien

Een event‑gebaseerde F‑score van ongeveer 0.80 voor deze clip. Controleer de handberekening door dezelfde referentie‑ en output‑lijsten in de sed_eval EventBasedMetrics‑klasse in te voeren met een collar van 0.2 seconde en de 20 % offset‑optie, die dezelfde tellingen zou moeten rapporteren.

Implementatie in de echte wereld

Thuismonitoring die snel moet reageren, zoals het activeren van een alarm of het aanpassen van domotica wanneer er geluid optreedt, de use case achter de DCASE 2023 Task 4 'scenario 1' evaluatie.

Detectie van tien huishoudelijke geluidsklassen, waaronder hondengejank, alarmklokken en afruimen van vaatwerk, in de DESED dataset van 10-seconden huishoudclips die sinds 2020 in de DCASE-uitdaging worden gebruikt.

Zoeken in grote audioarchieven op geluidssoort en tijd, met behulp van Google's AudioSet sterke labels, die start- en eindtijden voor gebeurtenissen markeren in meer dan 120.000 YouTube-clips.

Evalueren van een detector met de open‑source sed_eval‑toolbox, die de systeemoutput tegen referentie‑annotaties evalueert met segment‑gebaseerde en gebeurtenis‑gebaseerde precisie, recall, F‑score en foutpercentage.

Hergebruiken van voorgetrainde audio‑netwerken zoals PANNs, die 0.439 mean average precision behaalden op AudioSet‑tagging, als feature‑extractors voor een tijd‑opgeloste detector.

De toekomst van detectie van geluidsgebeurtenissen

Several research directions are visible in the DCASE task design and the datasets around it. The 2023 Task 4 asked how pretrained embeddings, external data and model complexity affect results, and its BEATs-based baseline showed large gains from models pretrained on AudioSet, which points toward general audio foundation models adapted to detection. Labeling remains the bottleneck: Google's 2021 strong-label release covered only about 5% of AudioSet's training clips, so methods that learn timing from weak, noisy or partial labels are still central. Evaluation itself is an open problem. PSDS (2019 to 2020) and later threshold-independent implementations (2022) were introduced because collar-based F-scores depend on arbitrary thresholds, but each change makes scores incomparable with older work. The DCASE 2023 decision to require energy reporting and operation counts suggests efficiency will be weighed alongside accuracy, which matters for always-on devices. Open questions include detecting rare or unseen classes, handling heavily overlapped sounds, and transferring systems trained on synthetic or YouTube audio to real homes, cities and wildlife recordings.

Het in de praktijk brengen

Waarom het ertoe doet

  • Toegang en bereik. Het verbetert de toegankelijkheid via transcriptie, gesproken tekst en spraakinterfaces.
  • Kosten en budget. Mediateams kunnen met kleinere budgetten sneller gepolijste audio leveren.
  • Snelheid en schaal. Klantgerichte systemen kunnen gesproken interacties op grotere schaal verwerken.

Pas op voor

  • Het risico op stemmisbruik en imitatie neemt toe als de toestemming ontbreekt.
  • De nauwkeurigheid kan afnemen bij accenten, dialecten of luidruchtige omgevingen.
  • Synthetische audio kan worden aangezien voor authentieke spraak zonder duidelijke labels.

Volgende stappen

  1. Verkrijg expliciete toestemming voor het vastleggen, klonen en hergebruiken van spraak.
  2. Test de kwaliteit van diverse sprekers en achtergrondomstandigheden.
  3. Bepaal wanneer een mens de output moet beoordelen of goedkeuren.
  4. Label synthetische audio en houd de herkomstgegevens bij voor verantwoording.

Bronnen en verdere literatuur

  1. DCASE CommunityGeluidsevenementdetectie met zwakke labels en synthetische geluidslandschappen (DCASE 2023 Taak 4A)
  2. arXiv (ICASSP 2020)Een kader voor de robuuste evaluatie van geluidsevenementdetectie
  3. Tampere University Audio Research Groupsed_eval: Geluidsevenementdetectie‑metriek
  4. Google ResearchAudioSet
  5. Google ResearchAudioSet Temporally‑Strong Labels Download (mei 2021)
  6. arXivPANNs: Large‑Scale Pretrained Audio Neural Networks for Audio Pattern Recognition

Blijf verkennen

Gratis nieuwsbrief

Ontvang de dagelijkse AI-briefing

Drie verifieerde AI-verhalen elke weekdagmorgen, geschreven in eenvoudig Engels. Gratis voor altijd, geen advertenties.

Eén e-mail elke weekdag. Afmelden met één klik. We verkopen of delen je adres nooit.

Test jezelf

Doe de geluidsevenementdetectie‑quiz

Directe feedback op elke antwoord, en een deelbare certificaat met een verifieerbare ID zodra je een cursus hebt afgerond.

Quiz starten

Ondersteun gratis AI-onderwijs. AI Understanding is een 501(c)(3) non-profit — geen advertenties, geen betaalmuur, nooit. Doe een donatie

Veelgestelde vragen

Wat is geluidsevenementdetectie?

Geluidsevenementdetectie (SED) is de taak om te bepalen welke geluiden in een opname voorkomen en precies wanneer elk geluid begint en eindigt, bijvoorbeeld een blaffende hond van 2,6 tot 7,2 seconden terwijl spraak eroverheen loopt. Het voedt alarmen, slimme‑huis‑triggers en audio‑zoekopdrachten, en is moeilijker dan eenvoudige audio‑tagging omdat systemen tijdsgrenzen moeten plaatsen bij overlappende geluiden, vaak terwijl ze leren van labels zonder tijdstempels.

Welke extra output schat temporale geluidsevenementdetectie in naast een clip‑niveau tag?

De taak voegt geschatte temporale lokalisatie toe, waarvan de nauwkeurigheid wordt geëvalueerd in plaats van gegarandeerd.

Waarom wordt de detectie van geluidsgebeurtenissen vaak omschreven als een polyfonisch probleem?

Real-world audio bevat vaak meerdere overlappende gebeurtenissen tegelijkertijd, dus het model moet meerdere actieve labels per frame voorspellen.

Wat betekent 'zwakke labeling' in SED-trainingsgegevens?

Zwakke labels duiden op de aanwezigheid van een gebeurtenis in een clip zonder exacte begin- en eindtijden, waardoor nauwkeurig leren in de tijd moeilijker wordt.

Welke classifier‑structuur wordt geïdentificeerd in de geciteerde DCASE 2024‑baseline?

De genoemde baseline combineert tijd‑frequentie‑feature‑verwerking met temporale modellering volgens de opgegeven opzet.

Welke tijd‑frequentie‑representatie wordt gebruikt in de gedocumenteerde geluid‑detectie‑baseline die hier wordt beschreven?

Dit is een gespecificeerde feature‑keuze, geen vereiste voor elke mogelijke detector.