vox-cloned-data / print_stats.py
jerpint's picture
script to print stats
b4f3fce
raw
history blame contribute delete
437 Bytes
# Print the number of audio files in each directory
import os
for dir in os.listdir("."):
if not dir.startswith(".") and os.path.isdir(dir): # Ignore hidden dirs and files
files = os.listdir(dir)
mp3_files = [f for f in files if f.endswith(".mp3")] # Only list mp3 files
wav_files = [f for f in files if f.endswith(".wav")] # Only list mp3 files
print(f"{dir}: {len(mp3_files) + len(wav_files)}")