espnet2.enh.layers.bsrnn.get_erb_subbands
Less than 1 minute
espnet2.enh.layers.bsrnn.get_erb_subbands
espnet2.enh.layers.bsrnn.get_erb_subbands(input_dim, min_freq_idx=0, n_erbs=64, target_fs=48000)
Get Equivalent Rectangular Bandwidth (ERB) division of subbands.
Reference: : https://github.com/Xiaobin-Rong/gtcrn/blob/main/stream/gtcrn.py#L11-L49
- Parameters:
- input_dim (int) – number of frequency bins corresponding to target_fs Assumed to be n_fft // 2 + 1, where n_fft is the FFT size.
- min_freq_idx (int) – bin index of the minimum frequency to start the ERB bands. Frequency bins below this value will be kept as is. min_freq_idx / input_dim * target_fs / 2 is the minimum frequency in Hz.
- n_erbs (int) – number of ERB frequency bands to be used.
- target_fs (int) – target sampling frequency in Hz.
- Returns: a tuple of overlapping subbands (start and end indices) : len(subbands) = min_freq_idx + n_erbs
- Return type: subbands (tuple)