From 657bf44d04629140a6d90512f8c8d98af33cedfa Mon Sep 17 00:00:00 2001 From: AI Date: Fri, 8 Nov 2024 11:23:54 +0200 Subject: [PATCH] Backwards-compatible type-hinting --- torch_audiomentations/utils/io.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torch_audiomentations/utils/io.py b/torch_audiomentations/utils/io.py index 25339405..80b9cdb0 100644 --- a/torch_audiomentations/utils/io.py +++ b/torch_audiomentations/utils/io.py @@ -89,7 +89,7 @@ def rms_normalize(samples: Tensor) -> Tensor: return samples / (rms + 1e-8) @staticmethod - def get_audio_metadata(file_path: str | Path) -> tuple: + def get_audio_metadata(file_path: Union[str, Path]) -> tuple: """Return (num_samples, sample_rate).""" info = torchaudio.info(str(file_path)) # Deal with backwards-incompatible signature change.