| Crates.io | ringkernel-audio-fft |
| lib.rs | ringkernel-audio-fft |
| version | 0.4.0 |
| created_at | 2025-12-03 17:08:51.788839+00 |
| updated_at | 2026-01-25 21:26:06.638865+00 |
| description | GPU-accelerated audio FFT processing with direct/ambience separation using RingKernel actors |
| homepage | https://github.com/mivertowski/RustCompute |
| repository | https://github.com/mivertowski/RustCompute |
| max_upload_size | |
| id | 1964602 |
| size | 208,424 |
GPU-accelerated audio FFT processing with direct/ambience signal separation.
This crate demonstrates RingKernel's actor model by implementing a novel audio processing pipeline where each FFT frequency bin is an independent GPU actor. Actors communicate with neighbors via K2K (kernel-to-kernel) messaging to perform coherence analysis and separate direct sound from room ambience.
Audio Input -> FFT -> [Bin Actors with K2K] -> Separation -> Mixer -> IFFT -> Output
| | |
neighbor links
Each frequency bin actor:
The separation is based on inter-bin phase coherence:
use ringkernel_audio_fft::prelude::*;
#[tokio::main]
async fn main() -> Result<()> {
let processor = AudioFftProcessor::builder()
.fft_size(2048)
.hop_size(512)
.sample_rate(44100)
.build()
.await?;
let input = AudioInput::from_file("input.wav")?;
let output = processor
.process(input)
.dry_wet(0.5) // 50% wet (ambience)
.gain_boost(1.2) // 20% gain boost
.run()
.await?;
output.direct.write_to_file("direct.wav")?;
output.ambience.write_to_file("ambience.wav")?;
Ok(())
}
| Module | Description |
|---|---|
audio_input |
Audio file I/O and device streaming |
bin_actor |
FFT bin actor implementation |
fft |
FFT/IFFT processing with window functions |
separation |
Coherence analysis and signal separation |
mixer |
Dry/wet mixing and gain control |
processor |
High-level processing pipeline |
| Parameter | Default | Description |
|---|---|---|
fft_size |
2048 | FFT window size (power of 2) |
hop_size |
512 | Overlap between windows |
sample_rate |
44100 | Audio sample rate |
dry_wet |
0.5 | Mix ratio (0 = direct only, 1 = ambience only) |
cargo test -p ringkernel-audio-fft
The crate includes 32 tests covering FFT processing, coherence analysis, and signal separation.
Apache-2.0