Skip to content

Commit bcd22aa

Browse files
committed
refactor(audio): remove DC1Declick filter from processing pipeline
- Remove FilterDC1Declick from Pass2FilterOrder - Remove tuneDC1Declick() and adaptive tuning constants - Remove buildDC1DeclickFilter() method - Remove formatDC1DeclickFilter() from logging - Remove corresponding test cases - Update AGENTS.md and README.md to reflect removal Signed-off-by: Martin Wimpress <martin@wimpress.org>
1 parent c0b8831 commit bcd22aa

9 files changed

Lines changed: 2 additions & 620 deletions

File tree

AGENTS.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ internal/
4444

4545
**Filter chain order (Pass 2):**
4646
```
47-
highpass → noiseremove → gate → adeclick → acompressor → deesser
47+
highpass → noiseremove → gate → acompressor → deesser
4848
```
4949

5050
Each filter prepares audio for the next. Rumble removal before noise reduction. Denoising before gating. Compression before de-essing (compression emphasises sibilance).
@@ -94,7 +94,6 @@ Filter parameters adapt based on Pass 1 measurements (see `adaptive.go`):
9494
- **De-esser intensity:** 0.0-0.6 based on spectral centroid + rolloff (prefers `SpeechProfile` metrics when available)
9595
- **Gate threshold:** Derived from measured noise floor; with breath reduction enabled, positioned at 60% of gap between noise floor and quiet speech level (`SpeechProfile.RMSLevel - CrestFactor`), using firmer ratio (1.5x, clamped 2.0-4.0) and deeper range (+6 dB)
9696
- **LA-2A ratio/release:** Adapts based on kurtosis and flux from `SpeechProfile` when available
97-
- **DC-1 declick:** Uses spectral centroid from `SpeechProfile` when available
9897

9998
**Speech-aware metrics:** Filters processing speech content prefer `SpeechProfile` measurements (speech-only regions) over full-file analysis. Graceful fallback when speech metrics unavailable.
10099

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ Measures your audio's characteristics to drive adaptive processing:
4848
| **Low-pass** | DS201 side-chain | Removes ultrasonic content that triggers false processing |
4949
| **Noise reduction** | Non-Local Means | Adaptive Non-Local Means (anlmdn) denoiser with compand residual suppression |
5050
| **Gate** | DS201 expander | Soft expansion for natural inter-phrase cleanup |
51-
| **Declicker** | DC-1 | Autoregressive (AR) interpolation click/pop remover |
5251
| **Compressor** | LA-2A | Programme-dependent optical compression with ~10ms attack |
5352
| **De-esser** | - | Tames sibilance (adaptive intensity based on spectral rolloff) |
5453

@@ -211,7 +210,6 @@ internal/
211210
### Design Documentation
212211

213212
- [Gate: Drawmer DS201](docs/FilterGate-Drawmer%20DS201.md) - Soft expander gate with adaptive threshold
214-
- [Declick: CEDAR DC-1](docs/FilterDeclick-CEDAR%20DC-1.md) - Autoregressive declicker
215213
- [Compressor: LA-2A](docs/FilterCompressor-Teletronix%20LA-2A.md) - Programme-dependent optical compression
216214
- [Limiter: UREI 1176](docs/FilterLimiter-UREI1176.md) - Adaptive peak limiter
217215
- [Spectral Analysis](docs/Spectral%20Analysis.md) - How measurements drive adaptive processing

docs/FilterDeclick-CEDAR DC-1.md

Lines changed: 0 additions & 219 deletions
This file was deleted.

internal/logging/report.go

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -493,8 +493,6 @@ func formatFilter(f *os.File, filterID processor.FilterID, cfg *processor.Filter
493493
formatDS201LowPassFilter(f, cfg, m, prefix)
494494
case processor.FilterNoiseRemove:
495495
formatNoiseRemoveFilter(f, cfg, m, prefix)
496-
case processor.FilterDC1Declick:
497-
formatDC1DeclickFilter(f, cfg, m, prefix)
498496
case processor.FilterDS201Gate:
499497
formatDS201GateFilter(f, cfg, m, prefix)
500498
case processor.FilterLA2ACompressor:
@@ -673,41 +671,6 @@ func formatNoiseRemoveFilter(f *os.File, cfg *processor.FilterChainConfig, m *pr
673671
cfg.NoiseRemoveCompandKnee)
674672
}
675673

676-
// formatDC1DeclickFilter outputs CEDAR DC-1-inspired declicker filter details
677-
func formatDC1DeclickFilter(f *os.File, cfg *processor.FilterChainConfig, m *processor.AudioMeasurements, prefix string) {
678-
if !cfg.DC1DeclickEnabled {
679-
if cfg.DC1DeclickReason != "" {
680-
fmt.Fprintf(f, "%sDC1 Declick: DISABLED (%s)\n", prefix, cfg.DC1DeclickReason)
681-
} else {
682-
fmt.Fprintf(f, "%sDC1 Declick: DISABLED\n", prefix)
683-
}
684-
return
685-
}
686-
687-
method := "overlap-save"
688-
if cfg.DC1DeclickMethod == "a" {
689-
method = "overlap-add"
690-
}
691-
fmt.Fprintf(f, "%sDC1 Declick: ENABLED\n", prefix)
692-
fmt.Fprintf(f, " Threshold: %.0f (1=aggressive, 8=conservative)\n", cfg.DC1DeclickThreshold)
693-
fmt.Fprintf(f, " Window: %.0fms, Overlap: %.0f%%, AR Order: %.0f%%\n", cfg.DC1DeclickWindow, cfg.DC1DeclickOverlap, cfg.DC1DeclickAROrder)
694-
fmt.Fprintf(f, " Method: %s\n", method)
695-
if cfg.DC1DeclickReason != "" {
696-
fmt.Fprintf(f, " Reason: %s\n", cfg.DC1DeclickReason)
697-
}
698-
699-
// Show centroid with measurement source (used for window sizing)
700-
if m != nil && m.SpectralCentroid > 0 {
701-
centroid := m.SpectralCentroid
702-
centroidSource := "full-file"
703-
if m.SpeechProfile != nil && m.SpeechProfile.SpectralCentroid > 0 {
704-
centroid = m.SpeechProfile.SpectralCentroid
705-
centroidSource = "speech region"
706-
}
707-
fmt.Fprintf(f, " spectral centroid: %.0f Hz (%s)\n", centroid, centroidSource)
708-
}
709-
}
710-
711674
// joinWithComma joins string slice with comma separator
712675
func joinWithComma(items []string) string {
713676
result := ""

0 commit comments

Comments
 (0)