kan-bayashi / ParallelWaveGAN

Unofficial Parallel WaveGAN (+ MelGAN & Multi-band MelGAN & HiFi-GAN & StyleMelGAN) with Pytorch
https://kan-bayashi.github.io/ParallelWaveGAN/
MIT License
1.54k stars 340 forks source link

How to modify the sampling rate when use csmsc dataset to train the vocoder? #359

Closed Hu-chengyang closed 2 years ago

Hu-chengyang commented 2 years ago

Dear professor: I try to train a vocoder, and I have installed parallelwavegan,and I run the command: run.sh,however it came out with the traceback: Traceback (most recent call last): File "/home/liyp/anaconda3/envs/xll/bin/parallel-wavegan-preprocess", line 11, in load_entry_point('parallel-wavegan', 'console_scripts', 'parallel-wavegan-preprocess')() File "/data2/hcy/VQMIVC-main/vocoder/ParallelWaveGAN/parallel_wavegan/bin/preprocess.py", line 186, in main ), f"{utt_id} seems to have a different sampling rate."

I find that the sampling rate of csmsc is 24000hz,however the sampling rate of the my model is 16000,could you tell me how to modify the sampling rate?

kan-bayashi commented 2 years ago

Please change here https://github.com/kan-bayashi/ParallelWaveGAN/blob/1f1f6750ea09ee416496eba79ec1a21dc20e5daf/egs/csmsc/voc1/local/data_prep.sh#L9 And launch the recipe from data prep.

Hu-chengyang commented 2 years ago

Thank you.

Hu-chengyang commented 2 years ago

However,the new problem comes out: 2022-05-11 19:50:59,583 (utils:95) ERROR: There is no such a hdf5 file (dump/train_nodev/stats.(grep -q hdf5 <(yq .format /data2/hcy/VQMIVC-main/ParallelWaveGAN/egs/csmsc/voc1/conf/parallel_wavegan.v3.yaml) && echo h5 || echo npy)).

kan-bayashi commented 2 years ago

You may edit here wrongly. https://github.com/kan-bayashi/ParallelWaveGAN/blob/1f1f6750ea09ee416496eba79ec1a21dc20e5daf/egs/csmsc/voc1/run.sh#L56

Hu-chengyang commented 2 years ago

Yes,I modified it as :stats_ext=$"(grep -q "hdf5" <(yq ".format" "${conf}") && echo "h5" || echo "npy")" Because it came out with:syntax error near unexpected token `('

Hu-chengyang commented 2 years ago

How can I solve this problem?

kan-bayashi commented 2 years ago

That is wrong. Please use it as is.

kan-bayashi commented 2 years ago

If you are not familiar with shellscript, please use hard coding. E.g, stats_ext=h5

Hu-chengyang commented 2 years ago

Do you mean modify the "stats_ext=$(grep -q "hdf5" <(yq ".format" "${conf}") && echo "h5" || echo "npy") " as "stats_ext=h5"?

kan-bayashi commented 2 years ago

right

Hu-chengyang commented 2 years ago

Thank you, I will try.

Hu-chengyang commented 2 years ago

How to stop the training?