def METHOD_NAME(args):
    data_root = Path(args.data_root).absolute() / args.lang
    # Generate TSV manifest
    print("Generating manifest...")
    df_top_n = get_top_n(data_root)
    id_to_split, speakers = get_splits(df_top_n)
    if args.convert_to_wav:
        convert_to_wav(data_root, df_top_n["path"].tolist())
    manifest_by_split = {split: defaultdict(list) for split in SPLITS}
    for sample in tqdm(df_top_n.to_dict(orient="index").values()):
        sample_id = sample["id"]
        split = id_to_split[sample_id]
        manifest_by_split[split]["id"].append(sample_id)
        if args.convert_to_wav:
            audio_path = data_root / "wav" / f"{sample_id}.wav"
        else:
            audio_path = data_root / "clips" / f"{sample_id}.mp3"
        manifest_by_split[split]["audio"].append(audio_path.as_posix())
        manifest_by_split[split]["n_frames"].append(sample["n_frames"])
        manifest_by_split[split]["tgt_text"].append(sample["sentence"])
        manifest_by_split[split]["speaker"].append(sample["client_id"])
        manifest_by_split[split]["src_text"].append(sample["sentence"])
    output_root = Path(args.output_manifest_root).absolute()
    output_root.mkdir(parents=True, exist_ok=True)
    for split in SPLITS:
        save_df_to_tsv(
            pd.DataFrame.from_dict(manifest_by_split[split]),
            output_root / f"{split}.audio.tsv"
        )