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

resample before random crop in dataset? #301

Open
victor-shepardson opened this issue Mar 13, 2024 · 1 comment
Open

resample before random crop in dataset? #301

victor-shepardson opened this issue Mar 13, 2024 · 1 comment

Comments

@victor-shepardson
Copy link

transform_list.append(transforms.Resample(sr_dataset, sr))

should resampling be moved to before random cropping here? currently it seems to result in batches which aren't multiples of the latent downsampling factor when converting 44.1/48k.

I notice it also assumes that datasets processed at 48k with older versions of RAVE (where the sample rate wasn't stored as metadata) are 44.1 and tries to convert them, which is confusing for anyone who has been using 48k and upgrades. maybe it should do no conversion by default if the data same rate isn't known, and print a warning? I did it like this on my fork:
https://github.com/victor-shepardson/RAVE/blob/ff2218369f1589b06587bb58f37a609dc483d464/rave/dataset.py#L336

@domkirke
Copy link
Collaborator

You're absolutely right! I will fix that in next version, thanks for the issue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants