read_speech_model_info (src/speech_model.rs)

peters/horizon · crates/horizon-core/src/speech_model.rs · rust · MIT
voice

! Minimal GGUF metadata reader for speech models. ! ! Reads only the key/value header of a transcribe.cpp GGUF — never the ! tensor data — so the settings UI can offer the model's real language ! list and translation targets without loading gigabytes of weights. ! Pure std, toler

// Source: https://github.com/peters/horizon | License: MIT | Copyright 2026 Peter Rekdal Khan-Sunde
// Provided via justclaw.it.com; keep this notice with the code.
//! Minimal GGUF metadata reader for speech models.
//!
//! Reads only the key/value header of a transcribe.cpp GGUF — never the
//! tensor data — so the settings UI can offer the model's real language
//! list and translation targets without loading gigabytes of weights.
//! Pure std, tolerant of unknown keys, and bounded against malformed files.

use std::fs::File;
use std::io::{BufReader, Read};
use std::path::Path;

/// Speech-relevant metadata extracted from a GGUF header.
///
/// Capability fields are `Option` so "the KV is absent" (family default
/// applies) stays distinguishable from an explicit `false`.
#[derive(Clon

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key