def __call__(self, x: mx.array, c: mx.array = None):
        """encoder forward.

        Args:
            x (mx.array): (batch_size, input_channels, length)

        Returns:
            x (mx.array): (batch_size, encode_channels, length)
        """
        x = self.linear_pre(x.transpose(0, 2, 1))
        for modules in self.downsample:
            for module in modules:
                x = module(x)

        x = self.vocos_backbone(x.transpose(0, 2, 1), bandwidth_id=c)
        x = self.linear(x).transpose(0, 2, 1)
        if self.use_tanh_at_final:
            x = mx.tanh(x)

        return x
encoder forward.

        Args:
            x (mx.array): (batch_size, input_channels, length)

        Returns:
            x (mx.array): (batch_size, encode_channels, length)
        
mlx_audio/tts/models/spark/modules/encoder_decoder/feat_decoder.py