facebookresearch / encodec

State-of-the-art deep learning based audio codec supporting both mono 24 kHz audio and stereo 48 kHz audio.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

get_bandwidth_per_quantizer is incorrect.

bfs18 opened this issue Β· comments

commented

πŸ› Bug Report

    def get_bandwidth_per_quantizer(self, sample_rate: int):
        """Return bandwidth per quantizer for a given input sample rate.
        """
        return math.log2(self.bins) * sample_rate / 1000

it should be

        return math.log2(self.bins) * sample_rate / 1000 / self.hop_length
commented

My bad. sample_rate is already divided by sample rate.