Expand description
The plain-data types of transcribe.cpp’s Rust binding: options, results, enums, errors, abilities, stream updates and family extensions. No handles, no FFI, nothing native.
transcribe-cpp depends on this crate at
the exact same version and re-exports every type at its own root, so
transcribe_cpp::RunOptions and transcribe_cpp_types::RunOptions are the
same type. Depend on this crate alone to name those types without the engine
(transcribe-cpp-sys, CMake, ggml, GPU frameworks) in your dependency graph:
a process that talks to transcribe.cpp workers over IPC, say, in the
workers’ own types.
§Features
serde:Serialize/Deserializeon every type.transcribe-cpp/serdeturns it on.
Structs§
- Backend
Mask - Backend kinds allowed to register in this process. A backend outside the
mask never runs any code, so a broken GPU driver can be kept out of a
worker entirely. CPU is always allowed;
TRANSCRIBE_BACKENDScan only narrow the mask. - Capabilities
- Immutable, model-level capabilities read from GGUF metadata.
- Diarize
Info - Static facts about a diarization model (
transcribe_cpp::Model::diarize_info). - Diarize
Options - Per-run diarization parameters.
- Diarize
Session Options - Options for creating a diarization session.
- Error
Report - An owned, plain-data snapshot of a
transcribe_cpp::Error: what crosses a process or IPC boundary (e.g. a Tauri command’s error). - Lang
IdCandidate - One ranked label.
codeis the model’s own label ("en","iw"). - Lang
IdInfo - Static facts about a language ID model (
transcribe_cpp::Model::langid_info). - Lang
IdOptions - Per-run language ID parameters.
- Lang
IdResult - The result of one
transcribe_cpp::LangIdSession::run. - Lang
IdSession Options - Options for creating a language ID session.
- Moonshine
Streaming Options - Moonshine-streaming stream-extension knobs (stream slot).
- Parakeet
Buffered Stream Options - Parakeet chunked-attention buffered streaming knobs (stream slot).
- Parakeet
Stream Options - Parakeet cache-aware streaming knobs (stream slot).
- Roles
- The set of
Roles a model serves (transcribe_cpp::Model::roles). - RunOptions
- Per-run parameters.
- Segment
- One segment row. Times are milliseconds relative to the original audio.
- Session
Limits - Per-session effective limits.
- Session
Options - Options for creating a session.
- Sortformer
Diarize Options - Sortformer diarize-extension knobs (diarize-run slot).
Nonekeeps the family default (the GGUF-shipped cfg). - Speaker
Segment - One diarized speaker turn. Zero times mean the model attributed text but
did not provide turn timing;
pis NaN when unavailable. - Stream
Options - Options for beginning a stream.
- Stream
Text - A UI-facing snapshot of the stream’s text, fully owned.
- Stream
Update - Per-call change metadata from
feed/finalize. - Timings
- Per-run stage timings, in milliseconds. Zero means “unknown / not measured”.
- Token
- One token row.
pis a per-token confidence hint (NaN when the family produces none); its exact meaning is family-specific. - Transcript
- A fully-materialized transcription result.
- Turn
Info - Static facts about an end-of-turn model (
transcribe_cpp::Model::turn_info). - Turn
Options - Settings for
transcribe_cpp::TurnSession::run. - Turn
Result - The result of one
transcribe_cpp::TurnSession::run,transcribe_cpp::TurnSession::stream_feed,transcribe_cpp::TurnSession::stream_feed_batchortranscribe_cpp::TurnSession::stream_flush. - Turn
Session Options - Options for creating a turn session.
- VadInfo
- Static facts about a VAD model (
transcribe_cpp::Model::vad_info). - VadOptions
- Probabilities -> speech segments (
transcribe_cpp::VadSession::runonly). Fields and defaults are those of Silero’sget_speech_timestamps. - VadResult
- The result of one
transcribe_cpp::VadSession::run,transcribe_cpp::VadSession::stream_feedortranscribe_cpp::VadSession::stream_flush. - VadSegment
- One speech segment, in samples of the run’s input:
[start, end). - VadSession
Options - Options for creating a VAD session.
- Voxtral
Realtime Stream Options - Voxtral-realtime streaming knobs (stream slot).
- Whisper
RunOptions - Whisper run-extension knobs (run slot): initial prompt, temperature
fallback, and decode thresholds.
Nonekeeps the family default.initial_promptcannot be combined withRunOptions::vocabulary/prompt. - Word
- One word row.
Enums§
- Backend
- Which compute backend to request when loading a model.
- Commit
Policy - When the UI-facing committed text grows during a stream.
- Device
Type - ggml’s vendor-agnostic class for a compute device, orthogonal to
transcribe_cpp::Device::kind(which carries the vendor). Backends report this classification themselves, so use it as a runtime hint rather than a portable hardware-memory taxonomy. - Diarize
- Speaker-attribution runtime toggle.
- Diarize
Extension - A family extension for the diarize-run slot
(
transcribe_cpp::DiarizeSession::run). - Error
Kind - The category of a
transcribe_cpp::Error, without its payload. One kind per variant. - ExtSlot
- The slot a family extension is pointed at.
- Feature
- A yes/no model capability probe (
transcribe_model_supports). - Itn
- Inverse-text-normalization runtime toggle.
- KvType
- K/V activation precision for the decoder’s flash-attention path.
- Pnc
- Punctuation + capitalization runtime toggle.
- Role
- A kind of work a model can do (
transcribe_role). - RunExtension
- A family extension for the run slot (offline
run/run_batch). - Sortformer
Preset - Sortformer streaming operating point (latency / accuracy trade-off).
The menu is discrete (jointly-tuned bundles), not a latency dial;
Defaultkeeps the GGUF-shipped checkpoint configuration. - Stream
Extension - A family extension for the stream slot.
- Stream
State - Stream lifecycle state.
- Task
- The task a run performs.
- Timestamp
Kind - Requested (or returned) timestamp granularity.