Commit 0f10c2e1 authored by Phil Wang's avatar Phil Wang
Browse files

fix an issue with resampling in sounddataset, thanks to @LWprogramming

parent 096f72a8
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -68,8 +68,9 @@ class SoundDataset(Dataset):
        num_outputs = len(self.target_sample_hz)
        data = cast_tuple(data, num_outputs)

        if exists(self.target_sample_hz):
            data = tuple(resample(d, sample_hz, target_sample_hz) for d, target_sample_hz in zip(data, self.target_sample_hz))
        # resample if target_sample_hz is not None in the tuple

        data = tuple((resample(d, sample_hz, target_sample_hz) if exists(target_sample_hz) else d) for d, target_sample_hz in zip(data, self.target_sample_hz))

        if exists(self.max_length):
            data = tuple(d[:self.max_length] for d in data)
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@ from setuptools import setup, find_packages
setup(
  name = 'audiolm-pytorch',
  packages = find_packages(exclude=[]),
  version = '0.4.1',
  version = '0.4.2',
  license='MIT',
  description = 'AudioLM - Language Modeling Approach to Audio Generation from Google Research - Pytorch',
  author = 'Phil Wang',