piper icon indicating copy to clipboard operation
piper copied to clipboard

Important note for dataset generation!

Open ican24 opened this issue 1 year ago • 7 comments

Hi, "python -m piper_train.preprocess" is not enable to treat double quote ("), maybe single quote too. The preprocess is ended with Ok, but in the stage of training it's stopped by "RuntimeError: CUDA out of memory. ..." error. Be careful! I lost a hug time to discover and fix this problem.

ican24 avatar Jul 23 '23 05:07 ican24

Hi @ican24, You can down the batch size, according to your dataset size.

rmcpantoja avatar Jul 27 '23 14:07 rmcpantoja

Yes, surely, but it significantly slows the machine learning: 4-8 times. More easy to remove quotes.

ican24 avatar Jul 27 '23 15:07 ican24

Could you please elaborate on the problem, our dataset has many quote " and I'm not sure what is the problem with it?

trunglebka avatar Aug 02 '23 04:08 trunglebka

I am trying to fix the problem with commands

sed -i 's/"//g' metadata.csv
sed -i 's/”//g' metadata.csv
sed -i 's/“//g' metadata.csv

The quotes are meaningless in TTS. Maybe you need to add other commands too in your case. Those fixed my problem and I went ahead.

ican24 avatar Aug 02 '23 06:08 ican24

I mean why do quotes cause Cuda OOM, is there parsing problem with training code but not preprocessing?...

trunglebka avatar Aug 02 '23 06:08 trunglebka

It is hard to say. I am not Deep Learning programmer. It needs to carefully analyze the existing code.

ican24 avatar Aug 02 '23 06:08 ican24

If your meta csv file has a line with only one quote, the csv reader will continue to read the next lines until it find the next quote, so several lines will be merged into one, creating a huge line and cause memory overflow. This should be fixed be setting quotechar to None in this line: https://github.com/rhasspy/piper/blob/master/src/python/piper_train/preprocess.py#L421 i.e reader = csv.reader(csv_file, delimiter="|", quotechar=None)

dttvn0010 avatar Apr 11 '24 07:04 dttvn0010