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

Function _build_block

moss_tts_delay/llama_cpp/processor.py:155–159  ·  view source on GitHub ↗
(length: int)

Source from the content-addressed store, hash-verified

153 lengths_iter = iter(lengths)
154
155 def _build_block(length: int) -> str:
156 if length == 0:
157 return f"{audio_start_token}{audio_end_token}"
158 step_tokens = gen_slot_token * length + delay_slot_token * (n_vq - 1)
159 return f"{audio_start_token}{step_tokens}{audio_end_token}"
160
161 def replacer(match: re.Match) -> str:
162 return _build_block(next(lengths_iter))

Callers 1

replacerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected