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

audio preprocessing and duration for pretrained model inference #33

Open
sivannavis opened this issue Apr 22, 2024 · 1 comment
Open

Comments

@sivannavis
Copy link

sivannavis commented Apr 22, 2024

Hi! I'm using pretrained clap models for downstream tasks. I'm wondering if it's necessary to do the preprocessing in your wrapper code here?
Seems like this function made sure the audio is repeated or truncated to be 7 or 5 seconds as predefined. However, I found the model HTSAT or CNN can take variable lengths and output 1024 embedding regardless even without such preprocessing.

Could you tell me if it's important to do this when I use the model for inference?

Thanks!

@bmartin1
Copy link
Contributor

CLAP performs better with recordings of 7 seconds length, that's why we preprocess the audio. You can try different ways to preprocess the length, and different ways to preprocess longer recordings. The length constraint from CLAP comes from HTSAT.

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

No branches or pull requests

2 participants