Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files88 unmodified lines899091929293949588 unmodified lines
original_length = len(gt) # Ensure the audio is of the correct length by padding or trimming duration_seconds = len(gt) / sr duration_seconds = min(len(gt) / sr, 10) quantized_duration = np.ceil(duration_seconds * 2) / 2 # This rounds to the nearest 0.5 seconds num_samples = int(quantized_duration * sr) audio_frames = round(num_samples / sr * params['autoencoder']['latent_sr'])app.py+1-1