klyn.genai.tts.SpeechSynthesizer.SpeechSynthesizer
constructor
public SpeechSynthesizer(notnull path as FilePath, notnull device as Device = Device.auto, maxContext as Long = 1024l, maxFrames as Long = 512l, seed as ULong = 0ul, verbose as Boolean = false)
Description

Opens a local CustomVoice GGUF and keeps its parameters resident.

Parameters
ParameterDescription
pathExisting layout-1 Qwen3-TTS GGUF checkpoint.
deviceCPU, NVIDIA GPU, or auto (GPU when available, otherwise CPU). Causal audio kernels currently execute on CPU with synchronized tensors.
maxContextTalker prompt plus generated-frame capacity; at most 32768.
maxFramesCodec-frame bound; reaching it without EOS raises ValueException.
seedRepeatable per-utterance sampling seed, independent of global RNG.
verboseDisplay weight-loading progress; default false.
Throws
  • IOException for file errors; ValueException for invalid tensors/options or an unavailable GPU; NotSupportedException for NPU or an unsupported architecture.
Example

try speech = SpeechSynthesizer(FilePath("voice.gguf")): clip = speech.synthesize("Hello", voice="ryan")