mirror of
https://github.com/YuzuZensai/spleeter.git
synced 2026-01-31 14:58:23 +00:00
Hack so that multichannel doesn't crash with librosa
This commit is contained in:
@@ -145,8 +145,10 @@ class Separator(object):
|
|||||||
# TODO: fix the logic, build sometimes return, sometimes set attribute
|
# TODO: fix the logic, build sometimes return, sometimes set attribute
|
||||||
outputs = builder.outputs
|
outputs = builder.outputs
|
||||||
stft = self.stft(waveform)
|
stft = self.stft(waveform)
|
||||||
if stft.shape[-1] != 2:
|
if stft.shape[-1] == 1:
|
||||||
stft = np.concatenate([stft, stft], axis=-1)
|
stft = np.concatenate([stft, stft], axis=-1)
|
||||||
|
elif stft.shape[-1] > 2:
|
||||||
|
stft = stft[:, :2]
|
||||||
|
|
||||||
saver = tf.train.Saver()
|
saver = tf.train.Saver()
|
||||||
with tf.Session() as sess:
|
with tf.Session() as sess:
|
||||||
|
|||||||
Reference in New Issue
Block a user