﻿# CED.cpp audio tagging: processing time, parity and live-window latency

Review current CED.cpp CPU/GPU tables and its actual classification timer, preserving thread exceptions, upstream quality and live-window boundaries.

Author: Retrivium editorial team
Updated: 2026-11-05
Canonical URL: https://retrivium.ai/journal/ced-cpp-audio-tagging-timing-parity-backend-boundaries/
Language: en

CED.cpp ports an audio-tagging model to C++ and ggml, removing the Python runtime from inference. Its current public evidence includes actual CPU and GPU timing tables, more detail than the earlier research summary contained. The useful assessment separates model quality, numerical agreement, processing latency and the time an application needs to collect an audio window.

## A tagger does not transcribe or locate every event

The [port’s pinned README](https://raw.githubusercontent.com/localai-org/ced.cpp/736a4ee46a31d4ff38b41add65ce0f2cf1aaa05f/README.md) describes independent scores for the AudioSet classes. Multiple sounds can be present in the same clip. This differs from transcription, and a high clip score does not provide an exact event onset or a calibrated probability that an alarm is present in an arbitrary deployment.

The [upstream CED project](https://github.com/RicherMans/CED) reports the model family’s AudioSet results. Those model scores should not be labeled a fresh full-dataset evaluation of every converted artifact. The [AudioSet guide](/journal/data-guide-audioset-weak-segment-labels/) explains why clip labels and precise temporal detection are different tasks. Sliding-window integration adds an application policy around the tagger rather than changing its original evaluation target automatically.

## The CPU comparison has explicit conditions

The [benchmark document](https://raw.githubusercontent.com/localai-org/ced.cpp/736a4ee46a31d4ff38b41add65ce0f2cf1aaa05f/docs/BENCHMARKS.md) uses ced-base, a 10.11-second clip and a Ryzen workstation. At four threads, its author reports 158.8 ms for the PyTorch floating-point reference and 126.6 ms for the same-precision C++ path. The mean covers 40 timed iterations following 8 warm-ups.

The single-thread result is an important exception: the C++ full-precision case is slower than the PyTorch reference. Therefore the broad claim “faster on CPU” needs its threading and precision conditions. The compact integer-weight variant also is not automatically the fastest configuration. Lower resident memory and minimum latency are separate optimization goals.

## Inspect what the timer excludes

The [actual CLI code](https://raw.githubusercontent.com/localai-org/ced.cpp/736a4ee46a31d4ff38b41add65ce0f2cf1aaa05f/examples/cli/main.cpp) loads the model and audio before the benchmark loop. Each timed iteration surrounds classification, while file loading and earlier setup remain outside. The document calls this frontend-plus-model processing; it should not be read as complete cold process startup or an HTTP service’s end-to-end time.

The document defines its realtime factor as audio duration divided by processing time, so a larger value means faster processing. Some audio tools use the reciprocal convention. Preserving the formula avoids an apparent disagreement produced only by different names. For a live application, buffering enough audio and deciding when to emit a tag add latency beyond the measured classification call.

## GPU and parity results have their own boundaries

The current report includes Metal, Vulkan and CUDA observations, with longer clips taking a multi-chunk path. It explicitly warns that the CUDA host’s CPU container build is slow, making a large GPU-to-CPU ratio unrepresentative. The mel frontend remains CPU work, which can dominate the smallest model’s measured path.

The project reports numerical parity and matching leading tags on its validation inputs, including quantized forms. That supports implementation checks, not universal equivalence or a new task-accuracy guarantee for every sound distribution. A deployment comparison should retain audio length, preprocessing, model format, thread count and selected backend alongside difficult co-occurring sounds. The [benchmark-method guide](/journal/inference-benchmark-method/) helps define those conditions. This review examined the public source and reported tests; it did not run audio inference or independently reproduce the timings.
