MCPcopy Create free account
hub / github.com/MYZY-AI/Muyan-TTS / decode

Method decode

sovits/module/quantize.py:112–119  ·  view source on GitHub ↗

Decode the given codes to the quantized representation. Args: codes (torch.Tensor): Input indices for each quantizer. st (int): Start to decode input codes from which layers. Default: 0.

(self, codes: torch.Tensor, st: int = 0)

Source from the content-addressed store, hash-verified

110 return codes
111
112 def decode(self, codes: torch.Tensor, st: int = 0) -> torch.Tensor:
113 """Decode the given codes to the quantized representation.
114 Args:
115 codes (torch.Tensor): Input indices for each quantizer.
116 st (int): Start to decode input codes from which layers. Default: 0.
117 """
118 quantized = self.vq.decode(codes, st=st)
119 return quantized

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected