The interview problem

Practice prompt

Build an offline segmentation service that identifies speech-only, music-only, overlap and silence regions.

Original practice, not a reported company interview. Scenarios and numbers are illustrative. Interview date: not applicable. Sources retrieved October 1, 2026.

1. Scope and worked approach

Assume editing assistance with human correction. Compute short-window audio features, use a multi-label temporal classifier and smooth predictions with a minimum-duration policy. Keep speech and music probabilities separate so overlap is representable. Training annotations need interval boundaries and uncertainty near fades. Split by recording source, not adjacent windows. Serve intervals with evidence snippets and versioned thresholds. Compare to an energy-plus-simple-classifier baseline before adding a larger sequence model.

2. Trace the design or derivation

Window audio
  → predict separate labels
  → smooth intervals
  → retain overlap
  → editor correction

Specify boundary tolerance in seconds before labeling success. For a slow fade, annotators may disagree on the exact onset; preserve an uncertainty band or evaluate with a tolerance matched to the editing task. Count false cuts per hour so a very long silent recording cannot dominate the score.

3. Calculate the example

A 60-minute recording evaluated every 0.5 seconds has 7,200 steps. Missing a two-second spoken interruption affects four steps but may be the most important editing error, so frame accuracy alone is insufficient.

4. Failure cases and trade-offs

Singing resembles speech; quiet background music disappears below noise. Smoothing removes isolated false positives but can erase short interruptions. Measure event recall and boundary tolerance alongside time-weighted error, and retain an uncertain category for ambiguous vocal music.

5. Validation, follow-ups and self-review

Test crossfades, applause, singing and quiet speech over music. Follow-up: what latency would a live version require? Self-review: represent overlap explicitly and justify the minimum event duration.

Sources and related practice

Technical reference: arxiv.org — Speech-processing toolkit background; pronunciation and segmentation product designs are original.

Source publication/update: Submitted March 30, 2018. Retrieved October 1, 2026. The workflow, calculations and review exercises are original; this reference is not evidence that a company asked this question.

Continue with Detect acoustic events in continuous audio; Design a live meeting transcription system.

Continue your preparation

Choose a connected learning path or browse more ML system design questions. Read our editorial method and attribution policy.