def read_key_label(file):
    """return a dictionary of key --> label of the key, where
    genuine: 1
    spoof: 0

    for all keys in a kaldi scp file
    """
    utt2label = {}
    with open(file) as f:
        content = f.readlines()
    content = [x.strip() for x in content]
    for i in content:
        key = i.split()[0]
        label = i.split()[1]
        if label == 'genuine':
            utt2label[key] = 1
        else:
            utt2label[key] = 0

    return utt2label