Skip to content

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

@leo19941227

Description

@leo19941227

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions