How to use voice corpus tool to augment the dataset

anyone please provide voice corpus tool example I read the usage file but I cant understand the process.

this what I used
./voice.py augment ./train_data_english.csv reverb [-room_scale 1] [-hf_damping 1] [-wet_gain 1] [-reverberance 1] [-wet_only 1] [-pre_delay 1] write ./temp.csv

Reading augmentation sample durations…
0%| | 0/16244 [00:00<?, ?it/s]Traceback (most recent call last):
File “./voice.py”, line 700, in
main()
File “./voice.py”, line 696, in main
parser.parse(sys.argv[1:])
File “./voice.py”, line 131, in parse
result = self._parse(state)
File “./voice.py”, line 123, in _parse
result = cmd.action(*arg_values, **options)
File “./voice.py”, line 629, in _augment
aug_durs = self._map(‘Reading augmentation sample durations…’, aug_samples, lambda s: int(math.ceil(s.file.duration * 1000.0)))
File “./voice.py”, line 372, in _map
for result in self._progress(message, pool.imap_unordered(fun, lst), total=len(lst) if total < 0 else total):
File “/home/giuser/anaconda3/lib/python3.7/site-packages/tqdm/_tqdm.py”, line 955, in iter
for obj in iterable:
File “/home/giuser/anaconda3/lib/python3.7/multiprocessing/pool.py”, line 748, in next
raise value
File “/home/giuser/anaconda3/lib/python3.7/multiprocessing/pool.py”, line 121, in worker
result = (True, func(*args, **kwds))
File “./voice.py”, line 629, in
aug_durs = self._map(‘Reading augmentation sample durations…’, aug_samples, lambda s: int(math.ceil(s.file.duration * 1000.0)))
File “./voice.py”, line 225, in duration
return self.stats.duration
File “./voice.py”, line 220, in stats
self._stats = sf.info(self.filename)
File “/home/giuser/anaconda3/lib/python3.7/site-packages/soundfile.py”, line 436, in info
return _SoundFileInfo(file, verbose)
File “/home/giuser/anaconda3/lib/python3.7/site-packages/soundfile.py”, line 383, in init
with SoundFile(file) as f:
File “/home/giuser/anaconda3/lib/python3.7/site-packages/soundfile.py”, line 627, in init
self._file = self._open(file, mode_int, closefd)
File “/home/giuser/anaconda3/lib/python3.7/site-packages/soundfile.py”, line 1182, in _open
"Error opening {0!r}: ".format(self.name))
File “/home/giuser/anaconda3/lib/python3.7/site-packages/soundfile.py”, line 1355, in _error_check
raise RuntimeError(prefix + _ffi.string(err_str).decode(‘utf-8’, ‘replace’))
RuntimeError: Error opening ‘/home/giuser/MyWorkspace/HMM_STT/2907/voice-corpus-tool/wav/joel/filee_35015.wav’: File contains data in an unknown format.

but i got this error

thanks

Maybe @Tilman_Kamp the author could explain in a bit more detail?

Consider the following example: ./voice.py add ./train_data_english.csv augment ./noise_data.csv write ./result

Here the augment sub-command will layer another sample-source (./noise_data.csv) onto the current buffer (loaded through add ./train_data_english.csv) and write the resulting samples to directory ./result and the list to ./result.csv.

Unfortunately I had to remove SoX effect support (without changing the README - sorry - corrected it now), as it tended to be quite slow and unstable.

1 Like

@Tilman_Kamp what should be content/format of noise_data.csv
there cannot be transcript as its just noise
with only path of file and two extra , ,
eg.

wav_filename,wav_filesize,transcript
/data/alok/final_noise_car_people/1506671403737-car.raw.wav ,,
/data/alok/final_noise_car_people/1509699974399-car.raw.wav ,,
/data/alok/final_noise_car_people/1509701023755-car.raw.wav ,,
/data/alok/final_noise_car_people/1508504834575-car.raw.wav ,,
/data/alok/final_noise_car_people/1506952194577-car.raw.wav ,,
/data/alok/final_noise_car_people/xbr.wav ,,
/data/alok/final_noise_car_people/xey.wav ,,
/data/alok/final_noise_car_people/xcu.wav ,,
....

i am getting below error

./voice.py add ./speech_files.csv augment ./rnnoise.csv write ./result
Added 341 samples to buffer.
Traceback (most recent call last):
  File "./voice.py", line 700, in <module>
    main()
  File "./voice.py", line 696, in main
    parser.parse(sys.argv[1:])
  File "./voice.py", line 131, in parse
    result = self._parse(state)
  File "./voice.py", line 123, in _parse
    result = cmd.action(*arg_values, **options)
  File "./voice.py", line 626, in _augment
    aug_samples = self._load_samples(source)
  File "./voice.py", line 403, in _load_samples
    tags=row[tags_index].split() if tags_index else []) for row in rows]
  File "./voice.py", line 403, in <listcomp>
    tags=row[tags_index].split() if tags_index else []) for row in rows]
IndexError: list index out of range