Skip to content

Commit

Permalink
Release v0.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
iver56 committed Jan 15, 2025
1 parent bb90cf9 commit 9115aba
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 5 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,9 @@ classification. It was successfully applied in the paper

* Add new transforms: `Mix`, `Padding`, `RandomCrop` and `SpliceOut`

### Changes
## [v0.12.0] - 2025-01-15

### Removed

* Remove `librosa` dependency in favor of `torchaudio`

Expand Down
1 change: 0 additions & 1 deletion scripts/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ def __exit__(self, type, value, traceback):
num_samples = min(num_samples1, num_samples2)
samples = torch.stack([samples1[:, :num_samples], samples2[:, :num_samples]], dim=0)


modes = ["per_batch", "per_example", "per_channel"]
for mode in modes:
transforms = [
Expand Down
1 change: 1 addition & 0 deletions tests/test_background_noise.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from .utils import TEST_FIXTURES_DIR
from torch_audiomentations.utils.io import Audio


class TestAddBackgroundNoise(unittest.TestCase):
def setUp(self):
self.sample_rate = 16000
Expand Down
2 changes: 1 addition & 1 deletion tests/test_convolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from torch_audiomentations.utils.convolution import convolve as torch_convolve
from torch_audiomentations.utils.io import Audio


class TestConvolution:
def test_convolve(self):
sample_rate = 16000
Expand All @@ -15,7 +16,6 @@ def test_convolve(self):
samples = audio(file_path).numpy()
ir_samples = audio(TEST_FIXTURES_DIR / "ir" / "impulse_response_0.wav").numpy()


expected_output = scipy_convolve(samples, ir_samples)
actual_output = torch_convolve(
torch.from_numpy(samples), torch.from_numpy(ir_samples)
Expand Down
2 changes: 1 addition & 1 deletion torch_audiomentations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
from .utils.config import from_dict, from_yaml
from .utils.convolution import convolve

__version__ = "0.11.2"
__version__ = "0.12.0"
4 changes: 3 additions & 1 deletion torch_audiomentations/utils/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,9 @@ def downmix_and_resample(self, samples: Tensor, sample_rate: int) -> Tensor:

# resample
if self.sample_rate != sample_rate:
samples = torchaudio.functional.resample(samples, sample_rate, self.sample_rate)
samples = torchaudio.functional.resample(
samples, sample_rate, self.sample_rate
)

return samples

Expand Down

0 comments on commit 9115aba

Please sign in to comment.