def prepare_untran(feat_type, tgt_dir, untran_dir):
    """ Preprocesses untranscribed audio."""
    org_dir = str(untran_dir)
    wav_dir = os.path.join(str(tgt_dir), "wav", "untranscribed")
    feat_dir = os.path.join(str(tgt_dir), "feat", "untranscribed")
    if not os.path.isdir(wav_dir):
        os.makedirs(wav_dir)
    if not os.path.isdir(feat_dir):
        os.makedirs(feat_dir)

    # Standardize into wav files
    for fn in os.listdir(org_dir):
        in_path = os.path.join(org_dir, fn)
        prefix, _ = os.path.splitext(fn)
        mono16k_wav_path = os.path.join(wav_dir, "%s.wav" % prefix)
        if not os.path.isfile(mono16k_wav_path):
            feat_extract.convert_wav(Path(in_path), Path(mono16k_wav_path))

    # Split up the wavs and write prefixes to prefix file.
    wav_fns = os.listdir(wav_dir)
    with (tgt_dir / "untranscribed_prefixes.txt").open("w") as prefix_f:
        for fn in wav_fns:
            in_fn = os.path.join(wav_dir, fn)
            prefix, _ = os.path.splitext(fn)
            # Split into sub-wavs and perform feat extraction.
            split_id = 0
            start, end = 0, 10 #in seconds
            length = utils.wav_length(in_fn)
            while True:
                sub_wav_prefix = "{}.{}".format(prefix, split_id)
                print(sub_wav_prefix, file=prefix_f)
                out_fn = os.path.join(feat_dir, "{}.wav".format(sub_wav_prefix))
                start_time = start * ureg.seconds
                end_time = end * ureg.seconds
                if not Path(out_fn).is_file():
                    wav.trim_wav_ms(Path(in_fn), Path(out_fn),
                                    start_time.to(ureg.milliseconds).magnitude,
                                    end_time.to(ureg.milliseconds).magnitude)
                if end > length:
                    break
                start += 10
                end += 10
                split_id += 1

    # Do feat extraction.
    feat_extract.from_dir(Path(os.path.join(feat_dir)), feat_type=feat_type)
Preprocesses untranscribed audio.