Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix sample_rate to frame_rate where appropriate #40

Merged
merged 2 commits into from
Mar 22, 2023

Conversation

LWprogramming
Copy link
Contributor

@LWprogramming LWprogramming commented Mar 18, 2023

In the quantizer, each quantizer quantizes a frame with lg(bins) bits. That means a single quantizer's bandwidth is lg(bins) * frame_rate. This aligns with the calculations in #39:

For the 24kHz model, frame rate is 75 Hz. Then we expect each quantizer (1024 bins) to contribute 75 * 10 bps, and with a bandwidth of 6kbps we get 6kbps total bandwidth / 750 bps per quantizer = 8 quantizers.

I didn't see anywhere in the codebase that calls the rvq's forward function but I updated it as well anyways.

TODO before review: run tests and lint all the tests and lint passed

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 18, 2023
@LWprogramming LWprogramming marked this pull request as ready for review March 18, 2023 02:14
@adefossez
Copy link
Contributor

thanks for the fix, that seems like a better name indeed.

@adefossez adefossez merged commit 27ff277 into facebookresearch:main Mar 22, 2023
Dinglet pushed a commit to Dinglet/encodec that referenced this pull request Jan 25, 2024
* fix sample_rate to frame_rate where appropriate

* lint
thatsvenyouknow pushed a commit to thatsvenyouknow/neuro-encodec that referenced this pull request Jun 20, 2024
* fix sample_rate to frame_rate where appropriate

* lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants