//clika-runtime/io.clika.modelverse/TtsLoadOptions
TtsLoadOptions
[common]
data class TtsLoadOptions(val contextLength: Int = 0, val scratchDir: <Error class: unknown class>? = null, val modelArgs: Map<String, String> = emptyMap(), val revision: String = "main", val cacheDir: String? = null, val token: String? = null, val offline: Boolean = false, val device: String? = null, val weights: String? = null, val dtype: String? = null) : SourceOptions
The load-time choices a caller makes for a text-to-speech model.
Constructors
| TtsLoadOptions | [common] constructor(contextLength: Int = 0, scratchDir: <Error class: unknown class>? = null, modelArgs: Map<String, String> = emptyMap(), revision: String = "main", cacheDir: String? = null, token: String? = null, offline: Boolean = false, device: String? = null, weights: String? = null, dtype: String? = null) |
Properties
| Name | Summary |
|---|---|
| cacheDir | [common] open override val cacheDir: String? = null |
| contextLength | [common] val contextLength: Int = 0 The context window in tokens: the longest prompt plus generated speech frames the model's key-value cache opens for. 0 is auto: the largest window that fits the device's free memory beside the weights, bounded by the checkpoint's own; a value names the window, clamped to the checkpoint's. A sentence needs about a thousand tokens; a smaller window is what lets a phone load the model. |
| device | [common] open override val device: String? = null |
| dtype | [common] open override val dtype: String? = null The precision the weights load at: "float16" or "bfloat16" casts a dense checkpoint's float weights at load (about half the memory of a float32 checkpoint; the cast is best effort, and the stored precision keeps the model as trained) and selects a quantized checkpoint's compute dtype; null keeps the checkpoint's own. A load that reads neither meaning refuses naming the loads that do. The same dtype the command line's --dtype reads. |
| modelArgs | [common] val modelArgs: Map<String, String> The family's load arguments, as key and value pairs the model library reads at load (the chatterbox family's t3 set to v3 or v2 selects its multilingual line from a snapshot that also holds the English checkpoint). Empty keeps the snapshot's own choice. |
| offline | [common] open override val offline: Boolean = false |
| revision | [common] open override val revision: String |
| scratchDir | [common] val scratchDir: <Error class: unknown class>? = null A directory the model may write scratch files into (the app's cache directory): a VoiceReference.Pcm16 reference is written there as a WAV file the model reads, named by the clip's content so a repeated clip keeps its prepared voice, and removed when the model closes. Null admits VoiceReference.File references alone; a PCM reference is then refused and ends in SpeakListener.onError. |
| token | [common] open override val token: String? = null |
| weights | [common] open override val weights: String? = null The weight option of a repository that ships several (a GGUF repository with many quantizations): a quantization tag ( Q4_K_M), a repo-relative .gguf file name, or a glob over the option names. Null picks nothing: a repository with one option needs none, one with several refuses naming them. The same weights the command line's --weights reads. |