kan-bayashi / PytorchWaveNetVocoder

WaveNet-Vocoder implementation with pytorch.

Home Page:https://kan-bayashi.github.io/WaveNetVocoderSamples/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ValueError: operands could not be broadcast together with shapes

PetrochukM opened this issue · comments

Tried following the example in the README and got this error. Any ideas?

Process Process-1:
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.6.4_4/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/local/Cellar/python/3.6.4_4/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/process.py", line 93, in run
    self._target(*self._args, **self._kwargs)
  File "./../../../src/bin/decode.py", line 276, in gpu_decode
    for feat_ids, (batch_x, batch_h, n_samples_list) in generator:
  File "./../../../src/bin/decode.py", line 140, in decode_generator
    h = feat_transform(h)
  File "/Users/michaelp/Code/PytorchWaveNetVocoder/tools/venv/lib/python3.6/site-packages/torchvision/transforms/transforms.py", line 42, in __call__
    img = t(img)
  File "./../../../src/bin/decode.py", line 245, in <lambda>
    lambda x: scaler.transform(x)])
  File "/Users/michaelp/Code/PytorchWaveNetVocoder/tools/venv/lib/python3.6/site-packages/sklearn/preprocessing/data.py", line 692, in transform
    X -= self.mean_
ValueError: operands could not be broadcast together with shapes (633,30) (28,) (633,30)

WAV File I used: https://drive.google.com/file/d/1-2aMp0gyxn0Km25him8C_PRV2Y8V7WMk/view?usp=sharing

Changed the sample rate of the WAV file from 24000 to 16000 and the issue went away!

I added the information about sampling rate in README.
Thanks.