Librosa: Allow for streaming per-channel energy normalization (PCEN)

Created on 11 Jan 2019  路  2Comments  路  Source: librosa/librosa

Description

AFAIK, the current implementation of PCEN (librosa.core.pcen) is non-streaming. This is an issue, since applications in, for example, speech recognition and keyword spotting depend on streaming computation of spectrogram features. My PyTorch PCEN implementation supports streaming audio (and trainable weights), but it's probably slower on the CPU than LibROSA's implementation.

API change enhancement functionality question

Most helpful comment

Thanks @daemon for raising this issue and for sharing a PyTorch implementation of PCEN under MIT license! :)

I don't have any experience with streaming, but yes this would be a great addition. I guess that the way we close this issue depends on the decisions we end up taking re: #101.
I agree with @bmcfee that hooking into the initial filter state (zi) is the way to go for the IIR filter. Very neat idea 馃憤

All 2 comments

Thanks for posting this.

You're correct that pcen, as well as just about everything else in librosa, does not directly support streaming. Because pcen specifically relies on IIR filtering, it's not as straightforward to implement as, say, melspectrogram in a block-streaming fashion. However, I wonder if exposing the initial filter state (zi) as a pass-through parameter to lfilter would be enough to let you stream data through pcen in a coherent fashion?

@lostanlen got any thoughts on this?

Thanks @daemon for raising this issue and for sharing a PyTorch implementation of PCEN under MIT license! :)

I don't have any experience with streaming, but yes this would be a great addition. I guess that the way we close this issue depends on the decisions we end up taking re: #101.
I agree with @bmcfee that hooking into the initial filter state (zi) is the way to go for the IIR filter. Very neat idea 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

juanbraga picture juanbraga  路  3Comments

GPrathap picture GPrathap  路  3Comments

edne picture edne  路  3Comments

lostanlen picture lostanlen  路  4Comments

Magurosenbei picture Magurosenbei  路  3Comments