def METHOD_NAME(aishell1_dir, md_dir):
    """ Generate metadata corresponding to downloaded data in aishell1 """
    # Get speakers metadata
    speakers_metadata = create_speakers_dataframe(aishell1_dir)
    filename2transcript = {}
    with open(
        os.path.join(aishell1_dir, "transcript/aishell_transcript_v0.8.txt"),
        "r",
    ) as f:
        lines = f.readlines()
        for line in lines:
            key = line.split()[0]
            value = " ".join(line.split()[1:])
            filename2transcript[key] = value
    # Check for already generated files and generate files accordingly
    aishell1_dir = os.path.join(aishell1_dir, "wav")
    dir_to_process = check_already_generated(md_dir, aishell1_dir)
    # Go through each directory and create associated metadata
    for ldir in dir_to_process:
        # Generate the dataframe relative to the directory
        dir_metadata = create_aishell1_dataframe(
            aishell1_dir, ldir, speakers_metadata, filename2transcript
        )
        # Filter out files that are shorter than 3s
        num_samples = NUMBER_OF_SECONDS * RATE
        dir_metadata = dir_metadata[dir_metadata["length"] >= num_samples]
        # Sort the dataframe according to ascending Length
        dir_metadata = dir_metadata.sort_values("length")
        # Write the dataframe in a .csv in the metadata directory
        save_path = os.path.join(md_dir, ldir + ".csv")
        dir_metadata.to_csv(save_path, index=False)