diff --git a/audiotools/core/loudness.py b/audiotools/core/loudness.py index cb3ee267..451c6eb8 100644 --- a/audiotools/core/loudness.py +++ b/audiotools/core/loudness.py @@ -308,6 +308,8 @@ def loudness( meter = Meter( self.sample_rate, filter_class=filter_class, block_size=block_size, **kwargs ) + if "mps" in str(self.audio_data.device): # MPS has no float64 + meter = meter.type(torch.float32) meter = meter.to(self.device) # measure loudness loudness = meter.integrated_loudness(self.audio_data.permute(0, 2, 1))