mirror of
https://github.com/wassname/TTS.git
synced 2026-09-09 11:16:00 +08:00
fixing size mismatch
This commit is contained in:
+2
-2
@@ -17,7 +17,7 @@ def plot_alignment(alignment, info=None):
|
||||
plt.tight_layout()
|
||||
fig.canvas.draw()
|
||||
data = np.fromstring(fig.canvas.tostring_rgb(), dtype=np.uint8, sep='')
|
||||
data = data.reshape(fig.canvas.get_width_height()[::-1] + (3, ))
|
||||
data = data.reshape((3, ) + fig.canvas.get_width_height()[::-1])
|
||||
plt.close()
|
||||
return data
|
||||
|
||||
@@ -30,6 +30,6 @@ def plot_spectrogram(linear_output, audio):
|
||||
plt.tight_layout()
|
||||
fig.canvas.draw()
|
||||
data = np.fromstring(fig.canvas.tostring_rgb(), dtype=np.uint8, sep='')
|
||||
data = data.reshape(fig.canvas.get_width_height()[::-1] + (3, ))
|
||||
data = data.reshape((3, ) + fig.canvas.get_width_height()[::-1])
|
||||
plt.close()
|
||||
return data
|
||||
|
||||
Reference in New Issue
Block a user