why not rich.progress

This commit is contained in:
Miuzarte 2023-07-23 05:56:27 +08:00
parent e50786e627
commit 4c4093eef3

View File

@ -7,7 +7,7 @@ from multiprocessing import cpu_count
import librosa
import numpy as np
from scipy.io import wavfile
from tqdm import tqdm
from rich.progress import track
def load_wav(wav_path):
@ -81,7 +81,7 @@ def process_all_speakers():
if os.path.isdir(spk_dir):
print(spk_dir)
futures = [executor.submit(process, (spk_dir, i, args)) for i in os.listdir(spk_dir) if i.endswith("wav")]
for _ in tqdm(concurrent.futures.as_completed(futures), total=len(futures)):
for _ in track(concurrent.futures.as_completed(futures), total=len(futures), description="resampling:"):
pass