GithubHelp home page GithubHelp logo

librimix's People

Contributors

jonashaag avatar joriscos avatar mpariente avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

librimix's Issues

gitbash run generate_librimix.sh on windows

$ sh generate_librimix.sh
0%| | 0/20000 [00:00<?, ?it/s]
Augmenting E:/librimixdataset/LibriMix-master/librimixdataset/wham_noise\tr files
Change speed with factor 0.8
concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
File "C:\Anaconda3\lib\concurrent\futures\process.py", line 239, in _process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
File "C:\Anaconda3\lib\concurrent\futures\process.py", line 198, in _process_chunk
return [fn(*args) for args in chunk]
File "C:\Anaconda3\lib\concurrent\futures\process.py", line 198, in
return [fn(*args) for args in chunk]
File "E:\librimixdataset\LibriMix-master\scripts\augment_train_noise.py", line 60, in apply_fx
s = fx(s)
File "C:\Anaconda3\lib\site-packages\pysndfx\dsp.py", line 413, in call
stdout, stderr = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE).communicate(stdin.tobytes(order="F"))
File "C:\Anaconda3\lib\subprocess.py", line 800, in init
restore_signals, start_new_session)
File "C:\Anaconda3\lib\subprocess.py", line 1207, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] ϵͳ▒Ҳ▒▒▒ָ▒▒▒▒▒ļ▒▒▒
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "scripts/augment_train_noise.py", line 68, in
main(args)
File "scripts/augment_train_noise.py", line 40, in main
augment_noise(sound_paths, 0.8)
File "scripts/augment_train_noise.py", line 49, in augment_noise
chunksize=10
File "C:\Anaconda3\lib\site-packages\tqdm\contrib\concurrent.py", line 130, in process_map
return _executor_map(ProcessPoolExecutor, fn, *iterables, **tqdm_kwargs)
File "C:\Anaconda3\lib\site-packages\tqdm\contrib\concurrent.py", line 76, in _executor_map
return list(tqdm_class(ex.map(fn, *iterables, **map_args), **kwargs))
File "C:\Anaconda3\lib\site-packages\tqdm\std.py", line 1166, in iter
for obj in iterable:
File "C:\Anaconda3\lib\concurrent\futures\process.py", line 483, in _chain_from_iterable_of_lists
for element in iterable:
File "C:\Anaconda3\lib\concurrent\futures_base.py", line 598, in result_iterator
yield fs.pop().result()
File "C:\Anaconda3\lib\concurrent\futures_base.py", line 435, in result
return self.__get_result()
File "C:\Anaconda3\lib\concurrent\futures_base.py", line 384, in __get_result
raise self._exception
FileNotFoundError: [WinError 2] ϵͳ▒Ҳ▒▒▒ָ▒▒▒▒▒ļ▒▒▒

I dont know what to do with it.

soundfile.write() function

Hello!

This data preparation package has been really helpful! One issue I found is that soundfile.write() does not write the correct audio instance when the same file name is used across different preparations (mix_clean, s1, s2, noise, etc.) even though they are saved in separate folders. The problem was solved by naming the files differently by adding small suffix for differentiation. It may be just due to my hardware settings. But I thought I should bring it up anyway.

Thanks,
Agudemu

Potential C++ Implementation?

I'd like to help convert this pipeline to C++, if you're interested.
But first, I must ask.

Does the model allow for this to happen in real time?

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

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

can't generate librimix_metadata as same as you provided

I run create_librimix_metadata.py to generate the file. But there are some differences between yours and mine. I don't know why. I run this script on windows10.
this is mine of libri2mix_dev-clean.csv.
Mine
this is provided of libri2mix_dev-clean.csv .
pro

here is the command I used.

python create_librimix_metadata.py --librispeech_dir /f/data/LibriSpeech --librispeech_md_dir /f/LibriMix/metadata/LibriSpeech --wham_dir /f/data/wham_noise --wham_md_dir /f/LibriMix/metadata/Wham_noise --metadata_outdir /f/LibriMix/metadata/Libri2Mix_new --n_src 2

Unable to download wham_noise.zip

After running the ./generate_librimix.sh storage_dir, the wham_noise directory is not being downloaded in the storage_dir. I am repeatedly facing a connection timed out error.

Download wham_noise into storage_dir
--2024-02-09 14:01:12-- https://storage.googleapis.com/whisper-public/wham_noise.zip
Resolving storage.googleapis.com (storage.googleapis.com)... 2404:6800:4002:804::201b, 2404:6800:4002:82e::201b, 2404:6800:4002:82f::201b, ...
Connecting to storage.googleapis.com (storage.googleapis.com)|2404:6800:4002:804::201b|:443... failed: Connection timed out.
Connecting to storage.googleapis.com (storage.googleapis.com)|2404:6800:4002:82e::201b|:443... failed: Connection timed out.
Connecting to storage.googleapis.com (storage.googleapis.com)|2404:6800:4002:82f::201b|:443... failed: Connection timed out.
Connecting to storage.googleapis.com (storage.googleapis.com)|2404:6800:4002:806::201b|:443... failed: Connection timed out.
Connecting to storage.googleapis.com (storage.googleapis.com)|142.250.207.219|:443... connected.
HTTP request sent, awaiting response... 403 Forbidden
2024-02-09 14:09:56 ERROR 403: Forbidden.

It appears that augmented files have not been generated properly
Resuming augmentation.
Change speed with factor 0.8
0it [00:00, ?it/s]
Change speed with factor 1.2
0it [00:00, ?it/s]
Directory storage_dir/Libri2Mix/wav8k/min/train-100 already exist. Files won't be overwritten
Directory storage_dir/Libri2Mix/wav8k/max/train-100 already exist. Files won't be overwritten
Directory storage_dir/Libri2Mix/wav16k/min/train-100 already exist. Files won't be overwritten
Directory storage_dir/Libri2Mix/wav16k/max/train-100 already exist. Files won't be overwritten
Directory storage_dir/Libri2Mix/wav8k/min/dev already exist. Files won't be overwritten
Directory storage_dir/Libri2Mix/wav8k/max/dev already exist. Files won't be overwritten
Creating mixtures and sources from metadata/Libri2Mix/libri2mix_dev-clean.csv in storage_dir/Libri2Mix/wav16k/min/dev
0%| | 0/3000 [00:00<?, ?it/s]
concurrent.futures.process._RemoteTraceback:
"""

Traceback (most recent call last):
File "/opt/anaconda/anaconda3/lib/python3.7/concurrent/futures/process.py", line 239, in _process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
File "/opt/anaconda/anaconda3/lib/python3.7/concurrent/futures/process.py", line 198, in _process_chunk
return [fn(*args) for args in chunk]
File "/opt/anaconda/anaconda3/lib/python3.7/concurrent/futures/process.py", line 198, in
return [fn(*args) for args in chunk]
File "scripts/create_librimix_from_metadata.py", line 159, in process_utterance
wham_dir)
File "scripts/create_librimix_from_metadata.py", line 249, in read_sources
noise, _ = sf.read(noise_path, dtype='float32', stop=max_length)
File "/opt/anaconda/anaconda3/lib/python3.7/site-packages/soundfile.py", line 286, in read
subtype, endian, format, closefd) as f:
File "/opt/anaconda/anaconda3/lib/python3.7/site-packages/soundfile.py", line 658, in init
self._file = self._open(file, mode_int, closefd)
File "/opt/anaconda/anaconda3/lib/python3.7/site-packages/soundfile.py", line 1216, in open
raise LibsndfileError(err, prefix="Error opening {0!r}: ".format(self.name))
soundfile.LibsndfileError: Error opening 'storage_dir/wham_noise/cv/20oo0109_0.72115_01ua010r
-0.72115.wav': System error.
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "scripts/create_librimix_from_metadata.py", line 415, in
main(args)
File "scripts/create_librimix_from_metadata.py", line 59, in main
freqs, n_src, modes, types)
File "scripts/create_librimix_from_metadata.py", line 72, in create_librimix
wham_dir, out_dir, modes, types)
File "scripts/create_librimix_from_metadata.py", line 115, in process_metadata_file
subdirs, dir_path, subset_metadata_path, n_src)
File "scripts/create_librimix_from_metadata.py", line 138, in process_utterances
chunksize=10,
File "/opt/anaconda/anaconda3/lib/python3.7/site-packages/tqdm/contrib/concurrent.py", line 105, in process_map
return _executor_map(ProcessPoolExecutor, fn, *iterables, **tqdm_kwargs)
File "/opt/anaconda/anaconda3/lib/python3.7/site-packages/tqdm/contrib/concurrent.py", line 51, in _executor_map
return list(tqdm_class(ex.map(fn, *iterables, chunksize=chunksize), **kwargs))
File "/opt/anaconda/anaconda3/lib/python3.7/site-packages/tqdm/std.py", line 1182, in iter
for obj in iterable:
File "/opt/anaconda/anaconda3/lib/python3.7/concurrent/futures/process.py", line 483, in _chain_from_iterable_of_lists
for element in iterable:
File "/opt/anaconda/anaconda3/lib/python3.7/concurrent/futures/_base.py", line 598, in result_iterator
yield fs.pop().result()
File "/opt/anaconda/anaconda3/lib/python3.7/concurrent/futures/_base.py", line 428, in result
return self.__get_result()
File "/opt/anaconda/anaconda3/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
raise self.exception
soundfile.LibsndfileError: Error opening 'storage_dir/wham_noise/cv/20oo0109_0.72115_01ua010r
-0.72115.wav': System error.

path is incorrect when only generate one type

There may be such an issue in the script.
When I just generate mix_clean, it will not generate a noise subdir. But it still needs to weite_noise() in the noise subdir, then it will have an error due to no 'noise' path.

Error when generating the dataset

soundfile.LibsndfileError: Error : flac decoder lost sync.

Sorry to bother, but do you know how to deal with this problem? I use python 3.8...

How to create Libri2Mix dataset?

Hello, this is the first time I use this to create a Libri2Mix dataset and I don't know how to modify generate_librimix.sh script files. I've downloaded LibriSpeech and WHAM! dataset.

image

I want to create Libri2Mix/wav8k/min/test, Libri2Mix/wav8k/min/train-100, and Libri2Mix/wav8k/min/dev as described in the Storage_inf.txt table in metadata.

Can you give some good implementation steps, sorry I did this in the first place.

Generating 4 and 5 source mixtures

Hi,

I'm trying to generate 4 and 5 source mixtures for training Facebook research's svoice but looking at the script I don't see the location where the n_src variable is set. I tried changing for n_src in 2 3; do to for n_src in 2 3 4 5; do which generates the 2 and 3 mixtures just fine but get an error that the metadata files hadn't been generated for libri4mix. Any suggestions on how I'd go about getting the script to do 4 and 5 source mixtures?

Thank you.

soundfile.LibsndfileError: Error opening,

It appears that augmented files have not been generated properly
Resuming augmentation.
Change speed with factor 0.8
0it [00:00, ?it/s]
Change speed with factor 1.2
0it [00:00, ?it/s]
Directory /content/drive/MyDrive/8kdatasettrial/Libri2Mix/wav8k/max/test already exist. Files won't be overwritten
Creating mixtures and sources from /content/LibriMix/metadata/Libri2Mix/libri2mix_train-clean-100.csv in /content/drive/MyDrive/8kdatasettrial/Libri2Mix/wav8k/max/train-100
0% 0/13900 [00:00<?, ?it/s]
concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/local/lib/python3.7/concurrent/futures/process.py", line 239, in _process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
File "/usr/local/lib/python3.7/concurrent/futures/process.py", line 198, in _process_chunk
return [fn(*args) for args in chunk]
File "/usr/local/lib/python3.7/concurrent/futures/process.py", line 198, in
return [fn(*args) for args in chunk]
File "/content/LibriMix/scripts/create_librimix_from_metadata.py", line 159, in process_utterance
wham_dir)
File "/content/LibriMix/scripts/create_librimix_from_metadata.py", line 249, in read_sources
noise, _ = sf.read(noise_path, dtype='float32', stop=max_length)
File "/usr/local/lib/python3.7/site-packages/soundfile.py", line 286, in read
subtype, endian, format, closefd) as f:
File "/usr/local/lib/python3.7/site-packages/soundfile.py", line 658, in init
self._file = self._open(file, mode_int, closefd)
File "/usr/local/lib/python3.7/site-packages/soundfile.py", line 1216, in open
raise LibsndfileError(err, prefix="Error opening {0!r}: ".format(self.name))
soundfile.LibsndfileError: Error opening '/content/drive/MyDrive/8kdatasettrial/wham_noise/tr/20lo010l_0.062866_015o030q
-0.062866.wav': System error.
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/content/LibriMix/scripts/create_librimix_from_metadata.py", line 415, in
main(args)
File "/content/LibriMix/scripts/create_librimix_from_metadata.py", line 59, in main
freqs, n_src, modes, types)
File "/content/LibriMix/scripts/create_librimix_from_metadata.py", line 72, in create_librimix
wham_dir, out_dir, modes, types)
File "/content/LibriMix/scripts/create_librimix_from_metadata.py", line 115, in process_metadata_file
subdirs, dir_path, subset_metadata_path, n_src)
File "/content/LibriMix/scripts/create_librimix_from_metadata.py", line 138, in process_utterances
chunksize=10,
File "/usr/local/lib/python3.7/site-packages/tqdm/contrib/concurrent.py", line 130, in process_map
return _executor_map(ProcessPoolExecutor, fn, *iterables, **tqdm_kwargs)
File "/usr/local/lib/python3.7/site-packages/tqdm/contrib/concurrent.py", line 76, in _executor_map
return list(tqdm_class(ex.map(fn, *iterables, **map_args), **kwargs))
File "/usr/local/lib/python3.7/site-packages/tqdm/std.py", line 1195, in iter
for obj in iterable:
File "/usr/local/lib/python3.7/concurrent/futures/process.py", line 483, in _chain_from_iterable_of_lists
for element in iterable:
File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 598, in result_iterator
yield fs.pop().result()
File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 435, in result
return self.__get_result()
File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
raise self.exception
soundfile.LibsndfileError: Error opening '/content/drive/MyDrive/8kdatasettrial/wham_noise/tr/20lo010l_0.062866_015o030q
-0.062866.wav': System error.

Generating 4 and 5 source mixtures

Hi,

I'm trying to generate 4 and 5 source mixtures for training. I tried changing for n_src in 2 3; do to for n_src in 4 5; do which generates the 2 and 3 mixtures just fine but get an error that the metadata files hadn't been generated for libri4mix. Any suggestions on how I'd go about getting the script to do 4 and 5 source mixtures?
image
image

If I try to run create_librispeech_metadata.py directly I'm getting the following errors.
image

Thank you.

Rerun generate_librimix.sh error

The first time I run the generate_librimix.sh, it downloads all data and generates the data i need. But if i rerun the .sh to generate Libri2/3Mix or some subsets of it, an error occurs.


bash ./generate_librimix.sh ./data/

Augmenting ./data//wham_noise/tr files
Change speed with factor 0.8
  0%|                                                 | 0/60000 [00:00<?, ?it/s]
concurrent.futures.process._RemoteTraceback: 
"""

Traceback (most recent call last):
  File "/home/aiz/Program/anaconda3/envs/ss/lib/python3.6/concurrent/futures/process.py", line 175, in _process_worker
    r = call_item.fn(*call_item.args, **call_item.kwargs)
  File "/home/aiz/Program/anaconda3/envs/ss/lib/python3.6/concurrent/futures/process.py", line 153, in _process_chunk
    return [fn(*args) for args in chunk]
  File "/home/aiz/Program/anaconda3/envs/ss/lib/python3.6/concurrent/futures/process.py", line 153, in <listcomp>
    return [fn(*args) for args in chunk]
  File "scripts/augment_train_noise.py", line 42, in apply_fx
    s = s[:, 0]
IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed
"""
The above exception was the direct cause of the following exception:
  Traceback (most recent call last):
  File "scripts/augment_train_noise.py", line 52, in <module>
    main(args)
  File "scripts/augment_train_noise.py", line 24, in main
    augment_noise(sound_paths, 0.8)
  File "scripts/augment_train_noise.py", line 33, in augment_noise
    chunksize=10
  File "/home/aiz/Program/anaconda3/envs/ss/lib/python3.6/site-packages/tqdm/contrib/concurrent.py", line 127, in process_map
    return _executor_map(ProcessPoolExecutor, fn, *iterables, **tqdm_kwargs)
  File "/home/aiz/Program/anaconda3/envs/ss/lib/python3.6/site-packages/tqdm/contrib/concurrent.py", line 73, in _executor_map
    ex.map(fn, *iterables, **map_args), **kwargs))

  File "/home/aiz/Program/anaconda3/envs/ss/lib/python3.6/site-packages/tqdm/std.py", line 1171, in __iter__
    for obj in iterable:
  File "/home/aiz/Program/anaconda3/envs/ss/lib/python3.6/concurrent/futures/process.py", line 366, in _chain_from_iterable_of_lists
    for element in iterable:
  File "/home/aiz/Program/anaconda3/envs/ss/lib/python3.6/concurrent/futures/_base.py", line 586, in result_iterator
    yield fs.pop().result()  
File "/home/aiz/Program/anaconda3/envs/ss/lib/python3.6/concurrent/futures/_base.py", line 432, in result
    return self.__get_result()
  File "/home/aiz/Program/anaconda3/envs/ss/lib/python3.6/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed

RuntimeError: Error opening……

I have this error when I just run this command:"./generate_librimix.sh storage_dir".The program stoped.
How to solve this problem? And I have installed the sox. If it needs to change the code,which file should I change?
I am a beginner and sorry to bother you.o(╥﹏╥)o
捕获

data process

Error opening 'storage_dir/wham_noise/tt/445c0204_1.7413_442c020t_-1.7413.wav': System error.
How to solve this problem?

Does s1 and s2 refer to speaker1 and speaker2 folders? But they are the same.

I used the default parameters to synthesize the mixed speech of two people, but found that there are 5 folders, namely mix_clean (utterances only), mix_both (utterances + noise), mix_single (1 utterance + noise), s1, s2. I would like to ask Do s1 and s2 refer to speaker1 and speaker2? But I listened to the audio inside, but they are all from the same speaker.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.