klyn.genai.tts.SpeechSynthesizer.stream
method
public stream(notnull text as String, notnull voice as String = "", notnull language as String = "auto", notnull instructions as String = "") as SpeechStream
Description

Starts bounded, cancellable incremental synthesis on a registered Klyn worker.

Parameters
ParameterDescription
textNonempty text; embedded NUL is rejected.
voiceBuilt-in voice name; required by the CustomVoice checkpoint.
languageBCP 47 language code, or auto.
instructionsOptional voice/style instruction; unsupported checkpoints reject it.
Returns

Owned single-consumer PCM stream; always close it.

Throws
  • IOException if closed/busy; ValueException for invalid input or generation.
Example

try stream = speech.stream("Hello", voice="ryan", language="en"): block = stream.read()