Spaces:
Running
Running
Upload app.py
Browse files
app.py
CHANGED
@@ -257,7 +257,7 @@ self._train_state.params, batch, jax.random.PRNGKey(seed))
|
|
257 |
"""从音频计算频谱图帧。"""
|
258 |
print(f"[{current_time()}] 运行:从音频计算频谱图帧")
|
259 |
frame_size = self.spectrogram_config.hop_width
|
260 |
-
padding = [0, frame_size
|
261 |
audio = np.pad(audio, padding, mode='constant')
|
262 |
frames = spectrograms.split_audio(audio, self.spectrogram_config)
|
263 |
num_frames = len(audio) // frame_size
|
|
|
257 |
"""从音频计算频谱图帧。"""
|
258 |
print(f"[{current_time()}] 运行:从音频计算频谱图帧")
|
259 |
frame_size = self.spectrogram_config.hop_width
|
260 |
+
padding = [0, frame_size - len(audio) % frame_size]
|
261 |
audio = np.pad(audio, padding, mode='constant')
|
262 |
frames = spectrograms.split_audio(audio, self.spectrogram_config)
|
263 |
num_frames = len(audio) // frame_size
|