Skip to content

Commit

Permalink
Backwards-compatible type-hinting
Browse files Browse the repository at this point in the history
  • Loading branch information
yalishanda42 committed Nov 8, 2024
1 parent 2c3f3ac commit 657bf44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torch_audiomentations/utils/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 657bf44

Please sign in to comment.