keras/src/layers/preprocessing/audio_preprocessing.py/MelSpectrogram/call
class MelSpectrogram:    def call(self, inputs):
        dtype = (
            "float32"
            if self.compute_dtype not in ["float32", "float64"]
            else self.compute_dtype
        )  # jax, tf supports only "float32" and "float64" in stft
        inputs = self.backend.convert_to_tensor(inputs, dtype=dtype)
        outputs = self._spectrogram(inputs)
        outputs = self._melscale(outputs)
        if self.power_to_db:
            outputs = self._dbscale(outputs)
        # swap time & freq axis to have shape of (..., num_mel_bins, time)
        outputs = self.backend.numpy.swapaxes(outputs, -1, -2)
        outputs = self.backend.cast(outputs, self.compute_dtype)
        return outputs