jzi040941 / PercepNet

Unofficial implementation of PercepNet: A Perceptually-Motivated Approach for Low-Complexity, Real-Time Enhancement of Fullband Speech
BSD 3-Clause "New" or "Revised" License
325 stars 91 forks source link

Lookahead in compute_rnn (c++) #49

Open aaronhsueh0506 opened 2 years ago

aaronhsueh0506 commented 2 years ago

Hi Noh,

We queue a buffer when I was training the model (maybe 500 frames), but I think the funciton compute_rnn looks like a frame-in-frame-out flow. My question is, is there no need to prepare a buffer for inference?

Thanks, Aaron

jzi040941 commented 2 years ago

Hi there, rnnoise_process_frame is called while inference step, in that function it calls compute_frame_features function which is stacking input X to comb_buf and pitch_buf.

so there's no need to add buffer in compute_rnn.

I'm not sure this is your intention of your question. feel free to leave comments more if is not correct

aaronhsueh0506 commented 2 years ago

Hi Noh,

Thanks for your reply. Yes, I am confused about buffer. So we only feed a frame length data into the neural network? Because I am trying to construct the real-time flow and the frame length is a factor related to the complexity of the model.

Thanks, Aaron

jzi040941 commented 2 years ago

Yes, you need feed features(Ex[34], Exp[34], T, corr) extracted from frame length audio to neural network it's possible to run it in realtime frame by frame