Real-time audio denoising using DeepFilterNet with streaming
Project description
DeepFilterNet Streaming
A Python library for real-time audio denoising using DeepFilterNet, providing streaming audio processing capabilities through C API bindings.
Platform Support
Currently supports the following platforms:
- macOS ARM64 (Apple Silicon)
- Linux x86_64
- Linux ARM64 (aarch64)
Installation
pip install dfnstream-py
Quick Start
from dfnstream_py import DeepFilterNetStreaming
import numpy as np
# Initialize the processor
processor = DeepFilterNetStreaming()
# Process audio chunks
audio_chunk = np.random.randn(1024).astype(np.float32) # Your audio data
denoised_chunk = processor.process_chunk(audio_chunk)
# Don't forget to cleanup
processor.close()
Examples
The examples/ folder contains sample scripts demonstrating different use cases:
Single File Processing
uv run python examples/enhance_wav.py input_audio.wav
Processes a single WAV file and saves the denoised version as input_audio_denoised.wav.
Batch Directory Processing
uv run python examples/enhance_dir.py /path/to/wav/files/
Processes all WAV files in a directory and saves enhanced versions to an outputs/ folder.
API Reference
DeepFilterNetStreaming
The main class for audio processing.
DeepFilterNetStreaming(
model_path=None, # Optional custom model path
atten_lim=None, # Attenuation limit in dB (None = no limit)
log_level="warn", # Logging level: "error", "warn", "info", "debug", "trace"
compensate_delay=True, # Enable delay compensation
post_filter_beta=0.0 # Post-filter beta (0.0 = disabled)
)
Key Methods
process_chunk(audio_chunk)- Process a chunk of audio dataprocess_frame(audio_frame)- Process a single framefinalize()- Get remaining delayed samplesclose()- Clean up resources
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dfnstream_py-0.2.0.tar.gz.
File metadata
- Download URL: dfnstream_py-0.2.0.tar.gz
- Upload date:
- Size: 97.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e00379d96f3a56bd63ff1559ca2947974c12798b5e85a80f98b6b788db814531
|
|
| MD5 |
e65bb09f8bdd829682143d9a6c8abff7
|
|
| BLAKE2b-256 |
3490d52441a5971853bf43c75a7f3bd1daa576544410ccc88b11f519d478a8c9
|
File details
Details for the file dfnstream_py-0.2.0-py3-none-any.whl.
File metadata
- Download URL: dfnstream_py-0.2.0-py3-none-any.whl
- Upload date:
- Size: 97.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0af15191fd2b206ea7ba90b76e86f17fb4388cca62cb2c941754a339ddbbb677
|
|
| MD5 |
8569c684fdd385adff9f2c7bc48807b3
|
|
| BLAKE2b-256 |
e69d24f78da6d40029e1097973b154d92ea66d79fe1852f10b833093ff72e566
|