Commit 0aa0da0
committed
refactor(processor): consolidate measureOutput region functions into generic implementation
- Add regionMeasurements value type for shared measurement results
- Create measureOutputRegionFromReader generic function with unified
logic:
- Filter graph setup and frame processing
- Spectral measurement extraction and averaging
- Crest factor and RMS fallbacks
- dB conversion
- Replace measureOutputSilenceRegionFromReader with thin wrapper mapping
to SilenceCandidateMetrics
- Replace measureOutputSpeechRegionFromReader with thin wrapper mapping
to SpeechCandidateMetrics
- Move region-type-specific debug strings into wrappers
- Eliminates ~145 lines of duplicated measurement logic
Signed-off-by: Martin Wimpress <code@wimpress.io>1 parent 5a9f055 commit 0aa0da0
1 file changed
Lines changed: 103 additions & 248 deletions
0 commit comments