MCPcopy Create free account
hub / github.com/OpenMOSS/MOSS-TTS / encode

Method encode

moss_tts_delay/llama_cpp/processor.py:49–50  ·  view source on GitHub ↗
(self, text: str)

Source from the content-addressed store, hash-verified

47 log.info("Tokenizer loaded from %s (vocab=%d)", tokenizer_path, self._tok.get_vocab_size())
48
49 def encode(self, text: str) -> list[int]:
50 return self._tok.encode(text).ids
51
52 def decode(self, ids: list[int]) -> str:
53 return self._tok.decode(ids)

Callers 2

build_generation_promptFunction · 0.45
_get_unified_codesFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected