keras/src/layers/preprocessing/audio_preprocessing.py/MelSpectrogram/compute_output_shape
class MelSpectrogram:    def compute_output_shape(self, input_shape):
        if len(input_shape) == 1:
            output_shape = [
                self.num_mel_bins,
                (
                    (input_shape[0] + self.sequence_stride + 1)
                    // self.sequence_stride
                    if input_shape[0] is not None
                    else None
                ),
            ]
        else:
            output_shape = [
                input_shape[0],
                self.num_mel_bins,
                (
                    (input_shape[1] + self.sequence_stride + 1)
                    // self.sequence_stride
                    if input_shape[1] is not None
                    else None
                ),
            ]
        return output_shape