Skip to content

Remove the debug mode and simplify the detection path - #54

Merged
andrewchen5678 merged 10 commits into
mainfrom
remove-debug-mode
Oct 7, 2026
Merged

andrewchen5678 merged 10 commits into
mainfrom
remove-debug-mode

Conversation

@andrewchen5678

Copy link
Copy Markdown
Collaborator

Summary

  • Remove the debug mode ahead of a from-scratch rebuild: --debug / --debug-dir, the debug options on DetectorOptions and MatchOptions, the Python debug / debug_dir keyword arguments, and all debug-only output.
  • Keep only the center Pearson window that decides acceptance; the flanking windows were computed for debug output only.
  • Scale the peak-height threshold instead of normalizing the whole section correlation, saving one pass per clip per chunk.
  • Smaller cleanups in the detection path (lazy section timestamp, per-clip short-clip flag, fixed-size partition array).
  • Docs: drop the completed v1 section and the Python references from the roadmap, describe the single Pearson window and the unscaled correlation curve.
  • Bump version to 0.4.4.

Testing

  • cargo clippy --all-targets -- -D warnings, also with --features python
  • cargo test and tests/test_python_bindings.py
  • Threshold scaling checked on 62 real recordings (RTHK radio1/2/5, am1430, 881903): JSONL output byte-identical to the commit before it, about 3% faster overall.

🤖 Generated with Claude Code

Andrew Chen and others added 10 commits October 7, 2026 06:39
Drop --debug/--debug-dir, the debug options on DetectorOptions and
MatchOptions, the Python debug keyword arguments, and all debug-only
output (stderr diagnostics, candidate WAV sections, peak dumps,
safe_path_component). The flanking Pearson windows were computed only
for debug output, so only the deciding center window is kept.

Remove the completed v1 section from the roadmap and its references to
the Python implementation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Format the section timestamp only for the out-of-bounds skip message,
store the short-clip flag per clip instead of recomputing it for every
candidate, keep the partition similarities in a fixed array, and return
the peaks from correlation_method directly now that it cannot fail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tion

State that there is no debug mode yet instead of narrating its removal,
and describe the single center Pearson window the detector uses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Saves one pass over the section correlation per clip per chunk.
Verification already normalizes each candidate slice on its own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… window

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@andrewchen5678
andrewchen5678 merged commit 3929f1b into main Oct 7, 2026
2 checks passed
@andrewchen5678
andrewchen5678 deleted the remove-debug-mode branch October 7, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant