rnnoise icon indicating copy to clipboard operation
rnnoise copied to clipboard

A question about the adaptation for different frame size e.g. 10ms 22band

Open 20050710212 opened this issue 5 years ago • 3 comments

Thank you for the fantastic work. In denoise.c, line 193, should I change the 22 to be NB_BANDS for different NB_BANDS? out[i] = sum*sqrt(2./NB_BANDS);

My configuration is 10ms per frame, and 16kHz. Other modification I have done:

  1. in the denoise.c
#define FRAME_SIZE_SHIFT 1
#define FRAME_SIZE (80)
#define WINDOW_SIZE (2*FRAME_SIZE)
#define FREQ_SIZE (FRAME_SIZE + 1)

#define PITCH_MIN_PERIOD 20
#define PITCH_MAX_PERIOD 256
#define PITCH_FRAME_SIZE 320
static const opus_int16 eband5ms[] = {
  0,  1,  2,  3,  4,  5,  6,  7,  8, 10, 12, 14, 17, 20, 24, 28, 33, 39, 47,57, 68, 80
}

features[NB_BANDS+3*NB_DELTA_CEPS] = .01*(pitch_index-100);
  1. in the rnnoise_demo.c #define FRAME_SIZE 160

I suppose many pepole want to change the sampling frequency, frame size and NB_BANDS. I hope we can share the ideas in this issue. I'd appreciate any help.

20050710212 avatar Oct 27 '20 08:10 20050710212

There are many open issues regarding the sampling frequency. Please use the search function! The short answer is: This is not sufficient. There is some pitch filtering/correlation done, which wont work, if you change the sampling frequency.

Zadagu avatar Oct 27 '20 13:10 Zadagu

@Zadagu
I also want training sample's sample rate is 16000, how to change pitch_downsample,pitch_search,remove_doubling those funtions? I have searched all issues but didn't find the answer,Can you give some guidance? Thanks!

zuowanbushiwo avatar May 30 '22 09:05 zuowanbushiwo

I'm also very interested in a 10ms window variant. I made an issue about this upstream: https://gitlab.xiph.org/xiph/rnnoise/-/issues/9. I'm fine with the stock 48kHz sample rate and band count, just the window size is a big deal for me. If you have any advice on how to go about this, I'd love to hear it!

pallaswept avatar Sep 01 '23 16:09 pallaswept