VocGAN icon indicating copy to clipboard operation
VocGAN copied to clipboard

Assertion error: torchaaudio resample_waveform related

Open raikarsagar opened this issue 5 years ago • 3 comments

I am facing assertion error and the log is as follows:

Traceback (most recent call last): File "/home/stuart/sagar/speech_analysis_synth/VocGAN/utils/train.py", line 98, in train disc_real, disc_real_multiscale = model_d(audioG, melG) File "/home/stuart/sagar/speech_analysis_synth/VocGAN/venv/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in call result = self.forward(*input, **kwargs) File "/home/stuart/sagar/speech_analysis_synth/VocGAN/model/hierarchical_discriminator.py", line 30, in forward x_ = down_(x) File "/home/stuart/sagar/speech_analysis_synth/VocGAN/venv/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in call result = self.forward(*input, **kwargs) File "/home/stuart/sagar/speech_analysis_synth/VocGAN/venv/lib/python3.6/site-packages/torchaudio/transforms.py", line 382, in forward return kaldi.resample_waveform(waveform, self.orig_freq, self.new_freq) File "/home/stuart/sagar/speech_analysis_synth/VocGAN/venv/lib/python3.6/site-packages/torchaudio/compliance/kaldi.py", line 802, in resample_waveform assert waveform.dim() == 2 AssertionError

Any wayouts from this issue will be helpful. Thanks Sagar

raikarsagar avatar Nov 16 '20 12:11 raikarsagar

your audio should be single channel, check weather you pass single or dual channel.

rishikksh20 avatar Nov 19 '20 13:11 rishikksh20

The files are fine because I was able to train with master branch. The issue persists with baseline branch.

raikarsagar avatar Nov 20 '20 03:11 raikarsagar

don't use that branch, that branch no more maintained.

rishikksh20 avatar Nov 20 '20 04:11 rishikksh20