parse

fun parse(source: ModelByteSource, scanTensors: Boolean = true): WhisperModelHeader(source)

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).

Throws

on a wrong magic, invalid hyper-parameters or a truncated or corrupt file.