Skip to content

Commit

Permalink
prepare
Browse files Browse the repository at this point in the history
  • Loading branch information
skysbird committed Jul 31, 2023
1 parent fff4d0a commit 139023c
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions vall_e/emb/prepare.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/env python3

import argparse
import json
import re
from pathlib import Path


import random
from tqdm import tqdm


def process_aishell(path):
print(path)


def main():
parser = argparse.ArgumentParser()
parser.add_argument("--suffix", type=str, default=".wav")
parser.add_argument("--worker-size", type=int)
parser.add_argument("--dataset", type=str, default="aishell")
parser.add_argument("folder", type=Path)

args = parser.parse_args()

paths = list(args.folder.rglob(f"*{args.suffix}"))

for path in tqdm(paths):
if args.dataset == 'aishell':
process_aishell(path)


if __name__ == "__main__":
main()

0 comments on commit 139023c

Please sign in to comment.