def incremental_encode(
        self,
        seg_src_tokens: Tensor,
        seg_src_lengths: Tensor,
        states=None,
    ):
        """
        Different from forward function, this function takes segmented speech
        as input, and append encoder states to previous states
        """
        (seg_encoder_states, seg_enc_lengths, states) = self.module(
            seg_src_tokens,
            seg_src_lengths,
            states=states,
        )
        return seg_encoder_states, seg_enc_lengths, states

        Different from forward function, this function takes segmented speech
        as input, and append encoder states to previous states
        
structured_prompting/fairseq-version/fairseq/fairseq/models/speech_to_text/modules/augmented_memory_attention.py