def get_transcript_index_by_time(t, transcript, delay=0):
    """
    Return the first index whose beginning time >= t
    """
    for i in range(len(transcript)):
        stime = transcript[i][1]
        if stime-delay - t  >= 0: 
            return i
    return len(transcript)-1