MCPcopy Create free account
hub / github.com/MeiGen-AI/MultiTalk / forward

Method forward

kokoro/istftnet.py:241–254  ·  view source on GitHub ↗

Sine_source, noise_source = SourceModuleHnNSF(F0_sampled) F0_sampled (batchsize, length, 1) Sine_source (batchsize, length, 1) noise_source (batchsize, length 1)

(self, x)

Source from the content-addressed store, hash-verified

239 self.l_tanh = nn.Tanh()
240
241 def forward(self, x):
242 """
243 Sine_source, noise_source = SourceModuleHnNSF(F0_sampled)
244 F0_sampled (batchsize, length, 1)
245 Sine_source (batchsize, length, 1)
246 noise_source (batchsize, length 1)
247 """
248 # source for harmonic branch
249 with torch.no_grad():
250 sine_wavs, uv, _ = self.l_sin_gen(x)
251 sine_merge = self.l_tanh(self.l_linear(sine_wavs))
252 # source for noise branch, in the same shape as uv
253 noise = torch.randn_like(uv) * self.sine_amp / 3
254 return sine_merge, noise, uv
255
256
257class Generator(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected