# Sound event detection (https://docs.cochl.ai/docs/core/sound-event-detection)



**Sound event detection (SED)** is the on-device sound recognition capability of Cochl.Sense Core. It runs entirely on the edge—no cloud round-trip, no audio leaves the device—and produces the same tag-and-probability output as [its Cochl.Sense Pro equivalent](https://docs.cochl.ai/docs/pro/sound-event-detection).

This page covers SED behavior in Cochl.Sense Core. For installation and your first prediction, start with [Getting started](https://docs.cochl.ai/docs/core/getting-started) and [Samples](https://docs.cochl.ai/docs/core/samples).

## 1. How it works [#1-how-it-works]

The SDK runs a TensorFlow Lite model on the CPU; the published v1.6.1 builds are CPU-only. It processes audio in fixed-size windows (the “window size”) with a configurable stride (the “hop size”) and emits a result per window.

Each result includes the predicted tags and their probabilities, plus the time interval of the window. Adjacent windows can be merged into a single event using [Result summary](https://docs.cochl.ai/docs/core/advanced-configurations).

## 2. Choose your tags at project creation [#2-choose-your-tags-at-project-creation]

Unlike Cochl.Sense Pro—which detects every official tag by default—a **Cochl.Sense Core project ships with only the tags you select when creating the project on the Dashboard**. The on-device model is built for that exact tag subset, which keeps the model lean and inference fast on edge hardware.

What this means in practice:

* Pick the tags you actually need at project creation. Browse the catalog on the [Sound tags](https://docs.cochl.ai/docs/core/sound-event-detection/sound-tags) page first.
* The tag list is fixed when the project is created; the Dashboard shows it on the project’s **Overview** and **Sound tags** pages but does not edit it. To detect a different set, create a new Core project with the tags you need.
* If the sound you care about isn’t covered by built-in tags, train a custom one via [Custom sound: Sound events](https://docs.cochl.ai/docs/core/sound-event-detection/custom-sound). Training runs on Cochl’s infrastructure; once it finishes, the new tag appears under **Your Custom Sounds** in the **New Core project** dialog, where you select it together with the built-in tags.

<img src="/images/core/sound-event-detection/select-tags.png" alt="The New Core project dialog: searching the tag catalog and selecting tags" width="560" />

The catalog covers **100+ tags across eight categories** — a taste of what’s in each:

<Cards>
  <Card title="&#x22;Emergency&#x22;" description="&#x22;Siren · Gunshot · Glass_break&#x22;" href="/docs/core/sound-event-detection/sound-tags#emergency" />

  <Card title="&#x22;Human action&#x22;" description="&#x22;Applause · Clap · Footstep&#x22;" href="/docs/core/sound-event-detection/sound-tags#human-action" />

  <Card title="&#x22;Human status&#x22;" description="&#x22;Baby_cry · Cough · Snore&#x22;" href="/docs/core/sound-event-detection/sound-tags#human-status" />

  <Card title="&#x22;Human speech&#x22;" description="&#x22;Speech · Whisper · Yell&#x22;" href="/docs/core/sound-event-detection/sound-tags#human-speech" />

  <Card title="&#x22;Home context&#x22;" description="&#x22;Vacuum_cleaner · Knock · Cooking&#x22;" href="/docs/core/sound-event-detection/sound-tags#home-context" />

  <Card title="&#x22;Outdoor context&#x22;" description="&#x22;Car_horn · Car_alarm · Aircraft_noise&#x22;" href="/docs/core/sound-event-detection/sound-tags#outdoor-context" />

  <Card title="&#x22;Animal&#x22;" description="&#x22;Dog_bark · Cat_meow · Bird_chirp&#x22;" href="/docs/core/sound-event-detection/sound-tags#animal" />

  <Card title="&#x22;Music&#x22;" description="&#x22;Guitar · Piano · Drum&#x22;" href="/docs/core/sound-event-detection/sound-tags#music" />

  <Card title="&#x22;Browse all&#x22;" description="&#x22;100+ tags →&#x22;" href="/docs/core/sound-event-detection/sound-tags" />
</Cards>

The tags active on the device are the subset selected when the project was created; review them on the project’s **Sound tags** page of the [Dashboard](https://dashboard.cochl.ai/).

## 3. Two modes: file vs. stream [#3-two-modes-file-vs-stream]

| Mode            | Source                           | Use case                                     |
| --------------- | -------------------------------- | -------------------------------------------- |
| **File mode**   | `wav` / `mp3` on disk            | Batch processing, testing, post-hoc analysis |
| **Stream mode** | Live audio buffer (mic, network) | Real-time monitoring, alerts                 |

Both modes return the same result for each inference window. C++ and Python receive a typed value and can format it as needed; the samples output JSON:

```json
{
  "start_time": 3.0,
  "end_time": 5.0,
  "prediction_time_ms": 24,
  "tags": [
    {
      "name": "Siren",
      "probability": 0.81
    }
  ]
}
```

| Field                | Meaning                                                   |
| -------------------- | --------------------------------------------------------- |
| `start_time`         | Start of this window, in seconds.                         |
| `end_time`           | End of this window, in seconds.                           |
| `prediction_time_ms` | Time the SDK took to process the window, in milliseconds. |
| `tags[].name`        | Detected tag, e.g. `Siren`.                               |
| `tags[].probability` | Confidence for that tag, `0.0`–`1.0`.                     |

`tags` is `[]` for silence, or when no tag crossed its sensitivity threshold — still a successful result, not an error.

<Callout type="info">
  **On v1.6.0 or earlier?** Older SDKs returned every value as a JSON string (`"probability": "0.81"`) and named the latency field `prediction_time`. Cast the numeric values before comparing them, or upgrade to v1.6.1 — see the [release notes](https://docs.cochl.ai/docs/core/release-notes).
</Callout>

The result also carries `timestamp`, `summaries` and `error`. The samples print `summaries` when Result Summary is on and `error` when a window fails, but not `timestamp`. See [Samples](https://docs.cochl.ai/docs/core/samples) for the complete schema and per-language code.

## 4. Tune detection behavior [#4-tune-detection-behavior]

The SDK reads `config.json` on initialization. Three knobs control SED behavior:

* **Sensitivity control**—global and per-tag; levels are `VERY_LOW`, `LOW`, `NORMAL`, `HIGH`, `VERY_HIGH` (strings; numbers are ignored).
* **Result summary*&#x2A;—merges adjacent same-tag windows. &#x2A;(In stream mode, only `default_interval_margin` applies — per-tag margins are ignored — and the merge happens after each prediction.)*
* **Audio preprocessor**—optional `audio_activity_detection` (skip silent windows) and `automatic_gain_control` (boost quiet input up to 8×; loud input is never attenuated).

Full schema and field-by-field reference: [Samples → Configuration](https://docs.cochl.ai/docs/core/samples#2-configuration). Each feature is explained in [Advanced configurations](https://docs.cochl.ai/docs/core/advanced-configurations).

## 5. Performance [#5-performance]

Latency and resource use vary by device. Per-platform CPU, memory, and inference-time measurements are in [Benchmark](https://docs.cochl.ai/docs/core/benchmark).

The current Cochl.Sense Core model has improved Average Precision (AP) by approximately **17% over the previous release**, with the biggest gains on small target sounds and in noisy environments. See [Release notes](https://docs.cochl.ai/docs/core/release-notes) for the version history.

## 6. Limitations [#6-limitations]

* **Sample rate** — the model runs at 22,050 Hz, and the input must be **at or above** that rate. Lower rates are not supported: **file** mode rejects a below-rate file with a resampling error, and **stream** mode rejects the pushed chunk. Higher rates are automatically downsampled to the model rate.
* **Short files** — a file shorter than the model’s window is still processed; the SDK zero-pads the final (or only) window, so short and trailing audio is never dropped. Only an empty file is rejected.
* The SDK requires an outbound network connection on first run to download the model and verify the license. After the initial setup, prediction is fully offline; license verification re-runs periodically.

## See also [#see-also]

* [Getting started](https://docs.cochl.ai/docs/core/getting-started)
* [Samples (Python / C++ / Android)](https://docs.cochl.ai/docs/core/samples)
* [Advanced configurations](https://docs.cochl.ai/docs/core/advanced-configurations)
* Cloud equivalent: [Cochl.Sense Pro → sound event detection](https://docs.cochl.ai/docs/pro/sound-event-detection)
