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

Allow all zero rows in mel computation matrix. #107

Merged
merged 1 commit into from
Sep 14, 2024
Merged

Conversation

csukuangfj
Copy link
Owner

import kaldifeat

opts = kaldifeat.FbankOptions()
opts.frame_opts.samp_freq = 8000
opts.mel_opts.num_bins = 128

fbank = kaldifeat.Fbank(opts)

throws the following error:

x: first_index != -1 && last_index >= first_index && "You may have set num_mel_bins too large."

However, in lhotse, the following code runs correctly

from lhotse import *

extractor = Fbank(FbankConfig(num_mel_bins=128, sampling_rate=8000))

And if we use
Screenshot 2024-09-14 at 12 01 03

We can see that it allows rows to contain all zeros in the matrix.

This PR updates the C++ code in kaldifeat to match that.

@csukuangfj csukuangfj merged commit e05540c into master Sep 14, 2024
5 of 7 checks passed
@csukuangfj csukuangfj deleted the fix-mel branch September 14, 2024 04:02
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

Successfully merging this pull request may close these issues.

1 participant