import string


def clean_phonemes(phonemes, corpus_name):
    """Librispeech and cmudict have stress digits that need to be removed
    """

    if corpus_name == "librispeech" or corpus_name == "cmudict":
        return [phones.rstrip(string.digits) for phones in phonemes]
    else:
        return phonemes