from typing import List
from typing import Dict


def get_phrases(buckets: List, data: Dict) -> Dict[float, List[str]]:
    """
	Returns a dictionary of (timestamp, words) where words contains the phrases spoken at `timestamp`.
	:param buckets: Python list of bucket timestamps (from GT).
	:param data: Dictionary of timestamps and words.
	:return: Dictionary of phrases.
	"""
    idx = 0  # Bucket index.
    phrases = {x: [] for x in buckets}
    for i in range(len(data["timestamps"])):
        ts, word = data["timestamps"][i], data["words"][i]
        if idx + 1 < len(buckets) and ts >= buckets[idx + 1]:
            idx += 1
        phrases[buckets[idx]].append(word)
    return phrases