lucidrains / audiolm-pytorch

Implementation of AudioLM, a SOTA Language Modeling Approach to Audio Generation out of Google Research, in Pytorch
MIT License
2.32k stars 249 forks source link

Fix #259 #260

Closed orrp closed 6 months ago

orrp commented 6 months ago

This PR fixes #259 by taking

data_max_length = max(data_max_length_seconds * hz for hz in (wav2vec.target_sample_hz, codec.target_sample_hz))

In #259 I detail the alternative solution of changing the type of max_length in SoundDataset. I chose the change in this PR because it is more minimal and type-restrictive in SoundDataset, but I welcome feedback/edits if you have a better suggestion.

lucidrains commented 6 months ago

looks good! thanks and happy holidays