MCPcopy Create free account
hub / github.com/MoonInTheRiver/DiffSinger / get_vocoder_cls

Function get_vocoder_cls

vocoders/base_vocoder.py:11–19  ·  view source on GitHub ↗
(hparams)

Source from the content-addressed store, hash-verified

9
10
11def get_vocoder_cls(hparams):
12 if hparams['vocoder'] in VOCODERS:
13 return VOCODERS[hparams['vocoder']]
14 else:
15 vocoder_cls = hparams['vocoder']
16 pkg = ".".join(vocoder_cls.split(".")[:-1])
17 cls_name = vocoder_cls.split(".")[-1]
18 vocoder_cls = getattr(importlib.import_module(pkg), cls_name)
19 return vocoder_cls
20
21
22class BaseVocoder:

Callers 3

__init__Method · 0.90
__init__Method · 0.90
test_startMethod · 0.90

Calls

no outgoing calls

Tested by 1

test_startMethod · 0.72