MeloTTS icon indicating copy to clipboard operation
MeloTTS copied to clipboard

report "\ufeff..." errors when running train.sh

Open joaoleino opened this issue 1 year ago • 6 comments

Hello,

I saved all the files - config.json, metadata.list as UTF-8 without BOM format, while when running the training bash
bash train.sh ./data/example/config.json 1

it always report the

[rank0]: FileNotFoundError: [Errno 2] No such file or directory: '\ufeffdata/example/audio_for_training/aud2_2_0.wav'

I referred the metadata.list format and created my own metadata.list as below data/example/audio_for_training/aud2_2_0.wav data/example/audio_for_training/aud2_3_0.wav data/example/audio_for_training/aud2_4_0.wav ....

Details:

3%|██▌ | 1/29 [00:00<00:00, 430.67it/s] [rank0]: Traceback (most recent call last): [rank0]: File "/home/tom/melotts/MeloTTS/melo/train.py", line 636, in [rank0]: run() [rank0]: File "/home/tom/melotts/MeloTTS/melo/train.py", line 69, in run [rank0]: train_dataset = TextAudioSpeakerLoader(hps.data.training_files, hps.data) [rank0]: File "/home/tom/melotts/MeloTTS/melo/data_utils.py", line 50, in init [rank0]: self._filter() [rank0]: File "/home/tom/melotts/MeloTTS/melo/data_utils.py", line 81, in _filter [rank0]: lengths.append(os.path.getsize(audiopath) // (2 * self.hop_length)) [rank0]: File "/usr/lib/python3.10/genericpath.py", line 50, in getsize [rank0]: return os.stat(filename).st_size [rank0]: FileNotFoundError: [Errno 2] No such file or directory: '\ufeffdata/example/audio_for_training/aud2_2_0.wav' ^CW0612 07:21:52.457000 140061947457536 torch/distributed/elastic/agent/server/api.py:741] Received Signals.SIGINT death signal, shutting down workers W0612 07:21:52.458000 140061947457536 torch/distributed/elastic/multiprocessing/api.py:851] Sending process 803 closing signal SIGINT

joaoleino avatar Jun 11 '24 23:06 joaoleino

My env is Ubuntu 22.04 + python 3.10

joaoleino avatar Jun 11 '24 23:06 joaoleino

Anyone can help me? Thanks !

joaoleino avatar Jun 11 '24 23:06 joaoleino

According to compart.com/en/unicode/U+FEFF (Unicode/Invisible Character). It could be that your metadata.list has an invalid encoding. try to encode it to UTF-8. Try to encode your file to utf16 and back to utf-8 in your IDE/Code editor!

Solunexus avatar Jun 12 '24 17:06 Solunexus

image

Solunexus avatar Jun 12 '24 17:06 Solunexus

16 and back to 8!

Solunexus avatar Jun 12 '24 17:06 Solunexus

Did you Complete " python preprocess_text.py --metadata data/example/metadata.list "?

Solunexus avatar Jun 14 '24 16:06 Solunexus