File size: 424 Bytes
1d427a4
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
def assemble_zip(title):
    import pathlib
    import zipfile
    from stqdm import stqdm

    directory = pathlib.Path("outputs/")
    zip_name = f"outputs/{title}.zip"

    with zipfile.ZipFile(zip_name, mode="w") as archive:
        for file_path in stqdm(directory.iterdir()):
            if pathlib.Path(file_path).suffix == '.wav':
                archive.write(file_path, arcname=file_path.name)

    return zip_name