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
Resolves a pinned Hub quantization through the shared verified cache, then loads it.
| Parameter | Description |
|---|---|
repository | Hugging Face owner/name. |
quantization | Exact published variant; AUTO selects unambiguous Q8_0. |
device | Execution selector, validated before downloading. |
maxContext | Prompt plus generated-frame capacity. |
maxFrames | Maximum generated codec frames. |
seed | Per-utterance sampling seed. |
revision | Hub branch/tag/commit, resolved to an immutable snapshot. |
offline | Require an already complete verified cache. |
verbose | Display download and loading progress; default false. |
token | Optional private Hub access token. |
format | AUTO, GGUF or SAFETENSORS. Original floating Safetensors retain their precision and reject an explicit GGUF quantization selector. |
Owned synthesizer; reuse it across utterances, then close it.
speech = SpeechSynthesizer.load("sakasegawa/Qwen3-TTS-12Hz-0.6B-CustomVoice-GGUF", ModelQuantization.Q8_0)