MCPcopy Create free account
hub / github.com/Zyphra/Zonos / encode

Method encode

zonos/autoencoder.py:22–23  ·  view source on GitHub ↗
(self, wav: torch.Tensor)

Source from the content-addressed store, hash-verified

20 return torch.nn.functional.pad(wav, (0, right_pad))
21
22 def encode(self, wav: torch.Tensor) -> torch.Tensor:
23 return self.dac.encode(wav).audio_codes
24
25 def decode(self, codes: torch.Tensor) -> torch.Tensor:
26 with torch.autocast(self.dac.device.type, torch.float16, enabled=self.dac.device.type != "cpu"):

Callers 1

generate_audioFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected