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

Method build_tts_model

usr/diffsinger_task.py:109–121  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

107 self.dataset_cls = ShallowDiffusionOfflineDataset
108
109 def build_tts_model(self):
110 mel_bins = hparams['audio_num_mel_bins']
111 self.model = OfflineGaussianDiffusion(
112 phone_encoder=self.phone_encoder,
113 out_dims=mel_bins, denoise_fn=DIFF_DECODERS[hparams['diff_decoder_type']](hparams),
114 timesteps=hparams['timesteps'],
115 K_step=hparams['K_step'],
116 loss_type=hparams['diff_loss_type'],
117 spec_min=hparams['spec_min'], spec_max=hparams['spec_max'],
118 )
119 # if hparams['fs2_ckpt'] != '':
120 # utils.load_ckpt(self.model.fs2, hparams['fs2_ckpt'], 'model', strict=True)
121 # self.model.fs2.decoder = None
122
123 def run_model(self, model, sample, return_output=False, infer=False):
124 txt_tokens = sample['txt_tokens'] # [B, T_t]

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected