klyn.genai.tts.SpeechSynthesizer.load
method
public static load(notnull repository as String, quantization as ModelQuantization = ModelQuantization.AUTO, notnull device as Device = Device.auto, maxContext as Long = 1024l, maxFrames as Long = 512l, seed as ULong = 0ul, revision as String = "main", offline as Boolean = false, verbose as Boolean = false, token as String = "", format as ModelFormat = ModelFormat.AUTO) as SpeechSynthesizer
Description

Resolves a pinned Hub quantization through the shared verified cache, then loads it.

Parameters
ParameterDescription
repositoryHugging Face owner/name.
quantizationExact published variant; AUTO selects unambiguous Q8_0.
deviceExecution selector, validated before downloading.
maxContextPrompt plus generated-frame capacity.
maxFramesMaximum generated codec frames.
seedPer-utterance sampling seed.
revisionHub branch/tag/commit, resolved to an immutable snapshot.
offlineRequire an already complete verified cache.
verboseDisplay download and loading progress; default false.
tokenOptional private Hub access token.
formatAUTO, GGUF or SAFETENSORS. Original floating Safetensors retain their precision and reject an explicit GGUF quantization selector.
Returns

Owned synthesizer; reuse it across utterances, then close it.

Throws
  • IOException for transfer/integrity errors; ValueException for invalid checkpoints or an unavailable GPU; NotSupportedException for NPU or unsupported layouts.
Example

speech = SpeechSynthesizer.load("sakasegawa/Qwen3-TTS-12Hz-0.6B-CustomVoice-GGUF", ModelQuantization.Q8_0)