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

[BEATs] How to handle different length of audio files? #1621

Open
omerkaanvural opened this issue Sep 9, 2024 · 0 comments
Open

[BEATs] How to handle different length of audio files? #1621

omerkaanvural opened this issue Sep 9, 2024 · 0 comments

Comments

@omerkaanvural
Copy link

Model: BEATs_iter3_plus_AS20K

I'm trying to use BEATs as a feature extractor to calculate similarity between two different audio files. There is a statement that cosine-based similarity is used to calculate similarity scores in the BEATs paper. However, I can not calculate the similarity between two different length of audio files since the feature dimensions are different. Shouldn't the feature extraction map the audio vectors to the same dimension?

Thanks in advance for the responses.

for ref in reference_set_paths:
    sr, audio = wavfile.read(folder_name / ref)
    audio = torch.from_numpy(audio).unsqueeze(0)
    rep = BEATs_model.extract_features(audio)[0]
    print(rep.shape)
sizes
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

1 participant