joriscos / librimix Goto Github PK
View Code? Open in Web Editor NEWAn open source dataset for source separation
License: MIT License
An open source dataset for source separation
License: MIT License
$ 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.
Hi JorisCos
How Extending LibriMix with reverb ? Thanks!
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
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?
how can i create just 10 hours mix from train-clean-100.tar.gz (instead of 100 h)
It seems to me even when I only need "mix_clean", the data preparation code is still highly entangled with noise
LibriMix/scripts/create_librimix_from_metadata.py
Lines 158 to 169 in 60199d7
Hence, it might make more sense to always create the "noise" directory here
LibriMix/scripts/create_librimix_from_metadata.py
Lines 104 to 109 in 60199d7
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
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.
this is provided of libri2mix_dev-clean.csv .
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
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.
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.
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...
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.
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.
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.
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.
Hello,
I had an error while trying to create LibriMix.
I am new to this area, I don't know how to fix it. Really appreciated if you can tell me where is the problem.
I had successful downloaded LibriSpeech and wham_noise.
I used anaconda prompt to run the generate_librimix.sh and I met the following issue.
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?
If I try to run create_librispeech_metadata.py directly I'm getting the following errors.
Thank you.
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
Sorry to bother, I figured it out.
Error opening 'storage_dir/wham_noise/tt/445c0204_1.7413_442c020t_-1.7413.wav': System error.
How to solve this problem?
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.