from typing import Dict


def phone_symb2int(phones_file: str) -> Dict[str, int]:
    """Map phoneme symbols to integer codes

    Parameters
    ----------
    phones_file : str
        A path to a phones.txt file. For example, 'exp/mono_mfcc/phones.txt'

    Returns
    -------
    mapping : dict
        A dict of pairs {phone_symb: phone_int_code}
    """
    with open(phones_file) as file:
        code2phone = [x.rstrip("\n").split() for x in file.readlines()]
    return {phone: int(code) for phone, code in code2phone}