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

Method build_phone_encoder

tasks/tts/tts.py:95–99  ·  view source on GitHub ↗
(self, data_dir)

Source from the content-addressed store, hash-verified

93 pin_memory=False)
94
95 def build_phone_encoder(self, data_dir):
96 phone_list_file = os.path.join(data_dir, 'phone_set.json')
97
98 phone_list = json.load(open(phone_list_file))
99 return TokenTextEncoder(None, vocab_list=phone_list, replace_oov=',')
100
101 def build_optimizer(self, model):
102 self.optimizer = optimizer = torch.optim.AdamW(

Callers 1

__init__Method · 0.95

Calls 1

TokenTextEncoderClass · 0.90

Tested by

no test coverage detected