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

Bug when only ["mix_clean"] is assigned as the target #20

Open
leo19941227 opened this issue Sep 21, 2021 · 2 comments
Open

Bug when only ["mix_clean"] is assigned as the target #20

leo19941227 opened this issue Sep 21, 2021 · 2 comments

Comments

@leo19941227
Copy link

leo19941227 commented Sep 21, 2021

It seems to me even when I only need "mix_clean", the data preparation code is still highly entangled with noise

mix_id, gain_list, sources = read_sources(row, n_src, librispeech_dir,
wham_dir)
# Transform sources
transformed_sources = transform_sources(sources, freq, mode, gain_list)
# Write the sources and get their paths
abs_source_path_list = write_sources(mix_id,
transformed_sources,
subdirs, dir_path, freq,
n_src)
# Write the noise and get its path
abs_noise_path = write_noise(mix_id, transformed_sources, dir_path,
freq)

Hence, it might make more sense to always create the "noise" directory here

# Create subdir
if types == ['mix_clean']:
subdirs = [f's{i + 1}' for i in range(n_src)] + ['mix_clean']
else:
subdirs = [f's{i + 1}' for i in range(n_src)] + types + [
'noise']

In my use case, I find that when I only use "mix_clean" in the generate_librimix.sh script, the script will crash since the "noise" directory is not created. Please correct me if I am wrong :)
Thanks!

Sincerely,
Leo

@closedappl
Copy link

I also meet this problem. Noise will always be added into the mixtures no matter what the type option is.

@JorisCos
Copy link
Owner

Sorry for the late reply. @leo19941227 Is right there is a bug when using only mix_clean for now the only workaround is to generate the whole dataset

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

3 participants