#!/usr/bin/python3 # -*- coding: utf-8 -*- import argparse import os from pathlib import Path from scipy.io import wavfile from tqdm import tqdm from project_settings import project_path def get_args(): parser = argparse.ArgumentParser() parser.add_argument( "--wav_dir", default=(project_path / "data/early_media/60/wav").as_posix(), type=str ) parser.add_argument( "--query", default="e9b985ea-aca6-4e04-87ab-e51271503f4c", type=str ) args = parser.parse_args() return args def main(): args = get_args() wav_dir = Path(args.wav_dir) for filename in tqdm(wav_dir.glob("*/*.wav")): basename = filename.stem # print(basename) if str(basename).__contains__(args.query): print(filename) return if __name__ == '__main__': main()