View source on GitHub
|
Bidirectional streaming synthesis session supporting push_text().
mp.tasks.audio.TtsStream(
tts: mp.tasks.audio.TextToSpeech,
stream_handle: ctypes.c_void_p
)
Methods
cancel
cancel() -> None
Cancels this stream immediately.
close
close() -> None
Releases native stream resources.
finish_input
finish_input() -> None
Marks the end of incremental text input and flushes clauses.
push_text
push_text(
text_delta: str
) -> None
Appends an incremental text fragment to the stream.
__enter__
__enter__() -> 'TtsStream'
__exit__
__exit__(
exc_type, exc_val, exc_tb
) -> None
__iter__
__iter__() -> Iterator[mp.tasks.audio.TtsAudioResult]
View source on GitHub