Companion

Constants and factory functions of WhisperModelHeader.

Properties

Link copied to clipboard
const val MAGIC: Long = 1734831468

"ggml" magic as a little-endian uint32 (bytes 6c 6d 67 67).

Functions

Link copied to clipboard
fun parse(source: ModelByteSource, scanTensors: Boolean = true): WhisperModelHeader

Parses source. With scanTensors (default) the tensor table is walked to the end of the file by skipping tensor data, which needs a source of known size or a complete stream; pass false to read only the hyper-parameters, mel filters and vocabulary (for example from a downloaded header prefix).