Rayhane-mamah / Tacotron-2

DeepMind's Tacotron-2 Tensorflow implementation
MIT License
2.28k stars 905 forks source link

Error with preprocess | max() arg is an empty sequence #465

Open humboldt123 opened 4 years ago

humboldt123 commented 4 years ago

In essence, whenever I try to pre-process my dataset, it returns this error.

100%|████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:27<00:00,  3.87s/it]
Write 0 utterances, 0 mel frames, 0 audio timesteps, (0.00 hours)
Traceback (most recent call last):
  File "preprocess.py", line 110, in <module>
    main()
  File "preprocess.py", line 106, in main
    run_preprocess(args, modified_hp)
  File "preprocess.py", line 83, in run_preprocess
    preprocess(args, input_folders, output_folder, hparams)
  File "preprocess.py", line 18, in preprocess
    write_metadata(metadata, out_dir)
  File "preprocess.py", line 30, in write_metadata
    print('Max input length (text chars): {}'.format(max(len(m[5]) for m in metadata)))
ValueError: max() arg is an empty sequence

D:\Tacotron-2-master>

I checked and made sure my metadata.csv had nothing wrong with it. And to test, I changed it to:

LJ001-0001|1|one
LJ001-0002|2|two
LJ001-0003|3|three
LJ001-0004|4|four
LJ001-0005|5|five
LJ001-0006|6|six
LJ001-0007|7|seven

...and sure enough; same error. Googling ValueError: max() arg is an empty sequence yields issues with syntax errors in miscellaneous Python Projects and searching for print('Max input length (text chars): {}'.format(max(len(m[5]) for m in metadata))) finds me preprocess.py; nothing that can help me solve the error.

youshuaiHou commented 4 years ago

I have the same problem. Is there any solution?

CHJ920319 commented 4 years ago

In my case, it was resolved when I adjusted max_mel_frames in hparams.py

jinny1208 commented 3 years ago

In my case, it was resolved when I adjusted max_mel_frames in hparams.py

To what value did you adjust the max_mel_frames (if you remember) and why? Does the value relate to the sampling rate of your dataset?

xiao-song2022 commented 1 year ago

+1