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

Method flush

moss_tts_realtime/fast_api.py:157–162  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

155 yield wav.detach().cpu().numpy().reshape(-1)
156
157 def flush(self) -> Iterator[np.ndarray]:
158 final_chunk = self.decoder.flush()
159 if final_chunk is not None and final_chunk.numel() > 0:
160 self._mark_started()
161 yield final_chunk.detach().cpu().numpy().reshape(-1)
162 self.finish()
163
164
165def _maybe_wait_for_buffer(buffer_tracker: BufferedAudioTracker, threshold_seconds: float) -> None:

Callers 1

_handle_finish_turnMethod · 0.45

Calls 2

_mark_startedMethod · 0.95
finishMethod · 0.95

Tested by

no test coverage detected