-
Notifications
You must be signed in to change notification settings - Fork 492
Add crates/denoise with DeepFilterNet dependency #3246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Create new denoise crate that wraps DeepFilterNet libDF for audio denoising - Uses git dependency on DeepFilterNet v0.5.6 tag - Provides clean interface with Denoiser struct for processing audio frames - Supports 48kHz sample rate with 480 sample hop size - Includes process_frame() for single frame and process() for batch processing - All tests passing Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
✅ Deploy Preview for hyprnote-storybook canceled.
|
✅ Deploy Preview for howto-fix-macos-audio-selection canceled.
|
✅ Deploy Preview for hyprnote canceled.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Return error when input length is not a multiple of hop_size - Add test for invalid length error case - Add benchmark suite following aec crate pattern - Benchmarks: initialization, process_frame, process (10/100/1000 frames), throughput Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
- Load 48kHz audio from english_1 test data - Benchmark with actual audio samples instead of zero-filled buffers - Results: ~284µs per frame, ~3.45 Msamples/s throughput Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
- Add default-model-ll feature flag for DeepFilterNet3 low-latency model - Update cfg attributes to support both default-model and default-model-ll - Benchmark comparison shows default model is faster for batch processing: - Default: 3.45 Msamples/s, ~50s for 1h audio - Low-latency: 1.84 Msamples/s, ~94s for 1h audio - Low-latency model has reduced algorithmic latency for real-time use Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
|
Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it. |
Summary
Adds a new
crates/denoisecrate that wraps DeepFilterNet libDF for audio noise suppression. The crate provides a cleanDenoiserstruct interface for processing audio frames at 48kHz with a 480-sample hop size.Key implementation details:
process_frame()for single-frame processing andprocess()for batch processingUpdates since last revision
default-model-llfeature flag for low-latency model (reduced algorithmic latency for real-time use)process()now returnsInvalidFrameSizeerror instead of silently truncatinghypr-datacrateBenchmark results (48kHz audio):
default-modeldefault-model-llNote: "Low-latency" refers to reduced algorithmic lookahead, not faster processing. Use
default-modelfor batch processing.Review & Testing Checklist for Human
process()now returns error for non-multiple of hop_size inputs instead of silent truncationSuggested test plan:
cargo test -p denoiseto verify unit tests passcargo bench -p denoiseto verify benchmark runsNotes
This crate is not yet integrated into the audio pipeline - it's just the foundation crate. Integration with listener/audio processing would be a follow-up.
Requested by @yujonglee
Link to Devin run: https://app.devin.ai/sessions/6128c661afaa4d9ca4bbf3b90071483a