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

Add resampling to BlissToPcmHDFJob #568

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

michelwi
Copy link
Contributor

Instead of calling a bunch of BlissFfmpegJob before BlissToPcmHDFJob we now can resample the audio data on the fly before writing to the HDF file.
Useful for multi-bandwidth training.

Also a bit of cleanup in the Job as I was on it anyway.

@michelwi
Copy link
Contributor Author

huh.. are we not having librosa in i6_core?

@JackTemaki
Copy link
Contributor

huh.. are we not having librosa in i6_core?

No, I think so far no core job used it.

@michelwi
Copy link
Contributor Author

No, I think so far no core job used it.

yes, grep told me.. I would like to change my question to "Is is available in your apptainer images / systems / etc, or would I break someones things if I merged this?"
Otherwise I could just add it to the requirements and have it available in the test pipeline.

Copy link
Collaborator

@Icemole Icemole left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Do you know how it interacts with the round_factor parameter? Should we assert, or at least warn, that only one of the two should be set at a given point?

@michelwi
Copy link
Contributor Author

Do you know how it interacts with the round_factor parameter?

technically both are solving the same problem in two different ways:

  • if the audio was resampled externally, round_factor makes this Job read the resampled audio file as if the timestamps were calculated with the original sampling rate.
  • with resampling the audio file is read at the "original" sampling rate and resampled internally.

Now if you had say 48kHz data, externally resampled it to 8kHz and then internally upsampled to 16kHz again, it would make sense to set both parameters; but I admit this is a contrived scenario and in practice we would only use one of those parameters.

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.

3 participants