Preparing your design workspace

Loading the problem and your latest saved attempt…

Design an Audio AI Processing Backend

Process large audio datasets through retry-safe CPU and GPU stages with lineage, batching, and measurable quality.

Problem statement

For this exercise, assume customers submit versioned audio manifests whose objects already reside in tenant-scoped storage.

A processing run validates each object, normalizes audio, segments it, batches compatible segments for GPU inference, assembles per-object results, and evaluates quality gates before publishing an immutable output manifest.

Every stage is retry-safe and records input hashes, code and model versions, parameters, and output hashes. The orchestrator supports pause, cancellation before publication, partial retry, priority, and bounded backfill.

GPU scheduling improves utilization without mixing incompatible models or allowing one tenant to starve others. Design manifest intake, orchestration, CPU preprocessing, GPU batching, artifact storage, quality checks, status and cancellation, publication, capacity control, observability, and recovery.

Model training, annotation tooling, and customer-facing audio capture are outside scope.

What to build

  1. Submit and validate one immutable audio manifest and obtain a retry-safe processing run.
  2. Execute a versioned CPU and GPU stage graph with resumable per-object progress and complete lineage.
  3. Batch compatible segments efficiently on GPUs while preserving tenant fairness, priority, and resource limits.
  4. Before publication, require every input to decode with declared format and duration within 100 ms, every accepted timeline to have gap-free segment coverage except configured overlap, exactly one assembled terminal result per object, zero output-schema violations, and every metric in a pinned reviewed model benchmark policy to pass.
  5. Pause, cancel, retry failed work, and inspect status without duplicating expensive physical execution or publishing partial output.

At scale

  • Assume 25 million audio hours per month, objects from five seconds to four hours, and 50,000 concurrent processing runs.
  • Run admission and status reads should finish within 300 ms p95; interactive-priority audio should begin processing within 30 seconds p95.
  • Immutable input audio bytes (or verified durable upstream bytes), required intermediate and output bytes, stage lineage, model and code artifacts, parameters, quality evidence, and published result manifests are retained for seven years so every retained result remains reproducible; hashes verify those bytes rather than replacing them.
  • A retry, worker loss, scheduler failover, or cancellation race cannot authorize a second physical execution while the first stage occurrence remains unresolved.
  • A versioned QualityPolicy pins the benchmark corpus and per-metric thresholds; any decodability, duration, segment-coverage, assembly-completeness, output-schema, or benchmark failure blocks publication and leaves the previous manifest authoritative.