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

Method flush

moss_tts_realtime/app.py:273–282  ·  view source on GitHub ↗
(self, message_prefix: str)

Source from the content-addressed store, hash-verified

271 yield self._make_event(chunk, message_prefix)
272
273 def flush(self, message_prefix: str) -> Iterator[StreamEvent]:
274 if not self._prebuffering or not self._pending_chunks:
275 self._prebuffering = False
276 return
277 self._prebuffering = False
278 pending_chunks = self._pending_chunks
279 self._pending_chunks = []
280 self._pending_samples = 0
281 for chunk in pending_chunks:
282 yield self._make_event(chunk, message_prefix)
283
284 def _make_event(self, chunk: np.ndarray, message_prefix: str) -> StreamEvent:
285 self.chunk_count += 1

Callers 1

run_streamMethod · 0.95

Calls 1

_make_eventMethod · 0.95

Tested by

no test coverage detected