from typing import Counter


def determine_sentence_speaker(chunk):
    """
    Validate for a chunk of the transcript (e.g. sentence) that there is one speaker.
    If not, take a majority vote to decide the speaker
    """
    speaker_ids = [ word[3] for word in chunk ]
    if len(set(speaker_ids)) != 1:
        print("Multiple speakers within one sentence:\n", chunk )
        return Counter(speaker_ids).most_common(1)[0]
    return chunk[0][3]