z11h's picture
Duplicate from AIGC-Audio/AudioGPT
5dacb9f
raw
history blame contribute delete
474 Bytes
import utils.commons.single_thread_env # NOQA
from text_to_speech.utils.commons.hparams import hparams, set_hparams
import importlib
def preprocess():
assert hparams['preprocess_cls'] != ''
pkg = ".".join(hparams["preprocess_cls"].split(".")[:-1])
cls_name = hparams["preprocess_cls"].split(".")[-1]
process_cls = getattr(importlib.import_module(pkg), cls_name)
process_cls().process()
if __name__ == '__main__':
set_hparams()
preprocess()