Spaces:
Runtime error
Runtime error
Update to unlimited (#1)
Browse files- Update to unlimited (486e680ec5de1eb681653c08389fe5c49fa764fa)
utils.py
CHANGED
@@ -16,7 +16,7 @@ def load_audio(audio_path: Union[str, np.array], fn_STFT, left: int = 0, right:
|
|
16 |
import audioldm
|
17 |
import audioldm.audio
|
18 |
|
19 |
-
duration =
|
20 |
|
21 |
mel, _, _ = audioldm.audio.wav_to_fbank(audio_path, target_length=int(duration * 102.4), fn_STFT=fn_STFT)
|
22 |
mel = mel.unsqueeze(0)
|
|
|
16 |
import audioldm
|
17 |
import audioldm.audio
|
18 |
|
19 |
+
duration = audioldm.utils.get_duration(audio_path)
|
20 |
|
21 |
mel, _, _ = audioldm.audio.wav_to_fbank(audio_path, target_length=int(duration * 102.4), fn_STFT=fn_STFT)
|
22 |
mel = mel.unsqueeze(0)
|