MCPcopy
hub / github.com/huggingface/parler-tts / on_finalized_audio

Method on_finalized_audio

parler_tts/streamer.py:133–137  ·  view source on GitHub ↗

Put the new audio in the queue. If the stream is ending, also put a stop signal in the queue.

(self, audio: np.ndarray, stream_end: bool = False)

Source from the content-addressed store, hash-verified

131 self.on_finalized_audio(audio_values[self.to_yield :], stream_end=True)
132
133 def on_finalized_audio(self, audio: np.ndarray, stream_end: bool = False):
134 """Put the new audio in the queue. If the stream is ending, also put a stop signal in the queue."""
135 self.audio_queue.put(audio, timeout=self.timeout)
136 if stream_end:
137 self.audio_queue.put(self.stop_signal, timeout=self.timeout)
138
139 def __iter__(self):
140 return self

Callers 2

putMethod · 0.95
endMethod · 0.95

Calls 1

putMethod · 0.80

Tested by

no test coverage detected