TensorSpeech / TensorFlowTTS

:stuck_out_tongue_closed_eyes: TensorFlowTTS: Real-Time State-of-the-art Speech Synthesis for Tensorflow 2 (supported including English, French, Korean, Chinese, German and Easy to adapt for other languages)
https://tensorspeech.github.io/TensorFlowTTS/
Apache License 2.0
3.84k stars 815 forks source link

pad() missing 1 required positional argument: 'mode' #96

Closed Mingrg closed 4 years ago

Mingrg commented 4 years ago

In examples/fastspeech2/fastspeech2_dataset.py, line 33.

durs_cum = np.cumsum(np.pad(durs, (1, 0)))

I got an error like:

pad() missing 1 required positional argument: 'mode'

Seem like I used the wrong version of numpy or something? How should I pad in this situation? My numpy version is 1.16.4.

dathudeptrai commented 4 years ago

my numpy version is 1.18.1

Mingrg commented 4 years ago

my numpy version is 1.18.1

thx! @dathudeptrai I found that in version 1.18, "mode" uses "constant" by default.

I changed the code to:

durs_cum = np.cumsum(np.pad(durs, (1, 0), mode='constant'))

In numpy version 1.16.4 and it wored.