<jupyter_start><jupyter_text>lab server pre-learning for synthesize  10 audios/speaker  import libs<jupyter_code>from tqdm import tqdm
from pathlib import Path<jupyter_output><empty_output><jupyter_text>Main Directory<jupyter_code>datasets_root = Path("datasets_root/Training")<jupyter_output><empty_output><jupyter_text>Speakers<jupyter_code>speakers = [m for m in datasets_root.glob("*") if m.is_dir()]<jupyter_output><empty_output><jupyter_text>Delete Everything else 10 Audios per Speakers<jupyter_code>for speaker in tqdm(speakers):
    wavs = sorted(speaker.glob("*.wav"))
    if len(wavs) < 10:
        start_idx = 0
        is_empty_dir = True
    else:
        start_idx = 10
        is_empty_dir = False
    for wav in wavs[start_idx:]:
        wav.unlink(True)
    if is_empty_dir:
        speaker.rmdir()<jupyter_output>0it [00:00, ?it/s]
{'fraction_non_alphanumeric': 0.10705882352941176, 'fraction_numerical': 0.01647058823529412, 'mean_word_length': 4.828767123287672, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '312461', 'license': 'MIT', 'n_tokens_mistral': 337, 'n_tokens_neox': 323, 'n_words': 58, 'path': 'pre-learning-data/10audio-per-speaker.ipynb', 'repo_name': 'jonggurl96/Real-Time-Voice-Cloning', 'size': '850'}