Commit 52cfee78 authored by Phil Wang's avatar Phil Wang
Browse files

soundstream trainer should auto resample the input audio to the correct...

soundstream trainer should auto resample the input audio to the correct sampling hz set on SoundStream
parent 6289eb0b
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -153,6 +153,15 @@ loss = train_wrapper(
)

loss.backward()

# after a lot of training

mock_coarse_token_ids = torch.randint(0, 1024, (1, 128, 3))

fine_token_ids = train_wrapper.generate(
    coarse_token_ids = mock_coarse_token_ids
) # (1, 128, 5)

```

All together now
+1 −0
Original line number Diff line number Diff line
@@ -114,6 +114,7 @@ class SoundStreamTrainer(nn.Module):
        self.ds = SoundDataset(
            folder,
            max_length = data_max_length,
            target_sample_hz = soundstream.target_sample_hz,
            seq_len_multiple_of = soundstream.seq_len_multiple_of
        )

+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.0.46',
  version = '0.0.47',
  license='MIT',
  description = 'AudioLM - Language Modeling Approach to Audio Generation from Google Research - Pytorch',
  author = 'Phil Wang',