Multiple row formula

I converted an AWS Transcribe Diarized that brings each word independently. I need to group each speaker in order and combine the words into complete sentences. In Alteryx, I would use a multi-row formula and would indicate if the current row speaker matches the previous row speaker, then add the current row to the end of the first row along with an additional space to keep the separation of words and carry that down so that the last speaker in the grouping would contain the full sentence, then delete all rows except for the last for each grouping. From what I am reading, the lag field is the closest to the multi row formula, but the lag requires a specific number of lags. I might have two rows for speaker 0 then 20 rows for speaker 1 then 10 for speaker 0 then 3 for speaker 1, so the determining factor would be the last row of each grouping of speaker. Is this doable in Knime?

See here: Formatting AWS Transcribe Output with Diarization