def parse_cmu_seg_line(line, prepend_reco_to_spk=False):
    """This line parses a 'line' from the CMU automatic segmentation for
    recording.
    The CMU segmentation has the following format:
    <file> <channel> <speaker> <start-time> <end-time> <condition>

    We force the channel to be 1 and take the file-id to be the recording-id.
    """
    line = line.strip()
    if len(line) == 0 or line[0:2] == ";;":
        return None
    parts = line.split()

    # Actually a file, but we assuming 1-1 mapping to recording and force
    # channel to be 1.
    reco = parts[0]

    # The channel ID is expected to be 1.
    if parts[1] != "1":
        raise TypeError("Invalid line {0}".format(line))
    spk = parts[2]

    start_time = float(parts[3])
    end_time = float(parts[4])

    if prepend_reco_to_spk:
        spk = reco + '-' + spk
        utt = "{spk}-{0:06d}-{1:06d}".format(int(start_time * 100),
                                             int(end_time * 100), spk=spk)
    else:
        utt = "{spk}-{reco}-{0:06d}-{1:06d}".format(int(start_time * 100),
                                                    int(end_time * 100),
                                                    reco=reco, spk=spk)

    segment_line = "{0} {1} {st:.3f} {end:.3f}".format(
        utt, reco, st=start_time, end=end_time)
    utt2spk_line = "{0} {1}".format(utt, spk)

    return (segment_line, utt2spk_line)