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

Method analysis

modules/parallel_wavegan/layers/pqmf.py:105–116  ·  view source on GitHub ↗

Analysis with PQMF. Args: x (Tensor): Input tensor (B, 1, T). Returns: Tensor: Output tensor (B, subbands, T // subbands).

(self, x)

Source from the content-addressed store, hash-verified

103 self.pad_fn = torch.nn.ConstantPad1d(taps // 2, 0.0)
104
105 def analysis(self, x):
106 """Analysis with PQMF.
107
108 Args:
109 x (Tensor): Input tensor (B, 1, T).
110
111 Returns:
112 Tensor: Output tensor (B, subbands, T // subbands).
113
114 """
115 x = F.conv1d(self.pad_fn(x), self.analysis_filter)
116 return F.conv1d(x, self.updown_filter, stride=self.subbands)
117
118 def synthesis(self, x):
119 """Synthesis with PQMF.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected