pyFDN.flamo_process#
- pyFDN.flamo_process(model, signal, *, fs=None, tail_seconds=0.0, dtype=None)[source]#
Run a 1-D signal through a FLAMO
Shellmodel offline.Wraps the boilerplate of turning a NumPy signal into the
(batch, time, channel)tensor FLAMO expects, running a no-grad forward pass, and converting the result back to NumPy.The model convolves in the frequency domain over a block of length
nfft(read from the model’s input layer), so the signal is truncated or zero-padded tonfft. Because that is a circular convolution, a long reverb tail can wrap around onto the start of the block; passtail_secondsto reserve that much trailing silence for the tail to decay into (requiresfs).- Parameters:
model – FLAMO
Shellwhose input layer exposesnfft(e.g. the output ofpyFDN.dss_to_flamo()).signal (np.ndarray) – 1-D input signal.
fs (int, optional) – Sampling rate, required only when
tail_seconds > 0.tail_seconds (float) – Trailing silence to reserve so the reverb tail does not wrap around.
dtype (torch.dtype or None) – Tensor dtype for the forward pass; defaults to float32.
- Returns:
Squeezed model output on CPU.
- Return type:
np.ndarray