prepare_align.py 605 B

1234567891011121314151617181920212223
  1. import argparse
  2. import yaml
  3. from preprocessor import ljspeech, aishell3, libritts
  4. def main(config):
  5. if "LJSpeech" in config["dataset"]:
  6. ljspeech.prepare_align(config)
  7. if "AISHELL3" in config["dataset"]:
  8. aishell3.prepare_align(config)
  9. if "LibriTTS" in config["dataset"]:
  10. libritts.prepare_align(config)
  11. if __name__ == "__main__":
  12. parser = argparse.ArgumentParser()
  13. parser.add_argument("config", type=str, help="path to preprocess.yaml")
  14. args = parser.parse_args()
  15. config = yaml.load(open(args.config, "r"), Loader=yaml.FullLoader)
  16. main(config)