Repository navigation
feat(pipelines): clean up only low quality recordings, a quality gate on clean_audio - #623
Merged
Merged
Conversation
… on clean_audio Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012m72U9mPLCbuH8rSAZGSuZ
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012m72U9mPLCbuH8rSAZGSuZ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Before: the
clean_audiostep (#569) cleaned every recording it ran on, so a pipeline carrying the step also ran WebRTC processing over recordings that already sounded fine.After: the step can measure each recording's signal-to-noise and clipping first and leave a clean-sounding one exactly as it is, cleaning only the noisy, quiet or clipped ones. A pipeline can now carry
clean_audiofor everything while only the recordings that need it are actually touched; a good recording is transcribed from its original. This is off by default, so the step's existing behaviour (clean everything) is unchanged.Turn on "Clean only low quality recordings" under Settings → Transcription → Audio cleanup and set the signal-to-noise floor (default 20 dB). The measurement is numpy only, no model: noise floor and speech level from two percentiles of the 10 ms frames, plus a clipping check. What it measured (
snr_db,clip_pct) is kept on the recording inGET /api/v1/recordings/{id}, and a skipped recording keeps no other cleanup options.Motivation and Context
Follow-up on top of #569. This thread's ask was to detect low quality audio and only then enhance it; #569 shipped the cleanup itself, and this adds the quality gate on top rather than a parallel step. A doubtful recording (SNR that can't be judged, or clipping) is still cleaned, so the gate never skips something that needs help.
Types of changes
Checklist:
make hookschecks it on commit).docs/accordingly.changelog.d/fragment.Done questions (AGENTS.md)
clean_audioyet clean only low quality recordings; delivered end to end.clean_audiostep, reachable through the API, MCP and automations exactly as the step is;snr_db/clip_pctare in the recording's API response.transcribe.cleanup.only_if_poorandsnr_floor_dbin Settings → Transcription → Audio cleanup, with defaults, out of the wizard.test_audio_cleanup.py,docs/processing.md,make openapi).clean_audioand its settings rather than adding a second cleanup step.Generated by Claude Code