Commit
refactor: Consolidate audio classification in Python Essentia service
Commit details
Commit notes
- Add DrumClassification model and analysis to Python Essentia service - Drum type detection using spectral and temporal features - Classification categories: kick, snare, hihat, clap, tom, cymbal, rim, perc, loop - Uses Essentia's spectral analysis combined with envelope characteristics
- Simplify hybrid analyzer to use Python for all classification - Remove redundant TypeScript classification when Essentia is available - Python/Essentia is the single source of truth for analysis - TypeScript only used as fallback when Python service is unavailable
- Improve Essentia client reliability - Add health check retry with exponential backoff (3 retries, 500ms/1s/2s) - Adaptive cache duration based on service health - Track consecutive failures to avoid hammering down service
Benefits: - Single source of truth for audio analysis (easier debugging) - Reduced tech debt (no duplicate classification logic) - Better classification accuracy (Essentia's mature algorithms) - More efficient (skip redundant analysis when Essentia succeeds)
Co-authored-by: armin.naimi <[email redacted]>
- Files changed
- 6
- Lines added
- +373
- Lines removed
- −178