Skip to main content

Crate transcribe_cpp_types

Crate transcribe_cpp_types 

Source
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 / Deserialize on every type. transcribe-cpp/serde turns it on.

Structs§

BackendMask
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_BACKENDS can only narrow the mask.
Capabilities
Immutable, model-level capabilities read from GGUF metadata.
DiarizeInfo
Static facts about a diarization model (transcribe_cpp::Model::diarize_info).
DiarizeOptions
Per-run diarization parameters.
DiarizeSessionOptions
Options for creating a diarization session.
ErrorReport
An owned, plain-data snapshot of a transcribe_cpp::Error: what crosses a process or IPC boundary (e.g. a Tauri command’s error).
LangIdCandidate
One ranked label. code is the model’s own label ("en", "iw").
LangIdInfo
Static facts about a language ID model (transcribe_cpp::Model::langid_info).
LangIdOptions
Per-run language ID parameters.
LangIdResult
The result of one transcribe_cpp::LangIdSession::run.
LangIdSessionOptions
Options for creating a language ID session.
MoonshineStreamingOptions
Moonshine-streaming stream-extension knobs (stream slot).
ParakeetBufferedStreamOptions
Parakeet chunked-attention buffered streaming knobs (stream slot).
ParakeetStreamOptions
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.
SessionLimits
Per-session effective limits.
SessionOptions
Options for creating a session.
SortformerDiarizeOptions
Sortformer diarize-extension knobs (diarize-run slot). None keeps the family default (the GGUF-shipped cfg).
SpeakerSegment
One diarized speaker turn. Zero times mean the model attributed text but did not provide turn timing; p is NaN when unavailable.
StreamOptions
Options for beginning a stream.
StreamText
A UI-facing snapshot of the stream’s text, fully owned.
StreamUpdate
Per-call change metadata from feed/finalize.
Timings
Per-run stage timings, in milliseconds. Zero means “unknown / not measured”.
Token
One token row. p is a per-token confidence hint (NaN when the family produces none); its exact meaning is family-specific.
Transcript
A fully-materialized transcription result.
TurnInfo
Static facts about an end-of-turn model (transcribe_cpp::Model::turn_info).
TurnOptions
Settings for transcribe_cpp::TurnSession::run.
TurnResult
The result of one transcribe_cpp::TurnSession::run, transcribe_cpp::TurnSession::stream_feed, transcribe_cpp::TurnSession::stream_feed_batch or transcribe_cpp::TurnSession::stream_flush.
TurnSessionOptions
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::run only). Fields and defaults are those of Silero’s get_speech_timestamps.
VadResult
The result of one transcribe_cpp::VadSession::run, transcribe_cpp::VadSession::stream_feed or transcribe_cpp::VadSession::stream_flush.
VadSegment
One speech segment, in samples of the run’s input: [start, end).
VadSessionOptions
Options for creating a VAD session.
VoxtralRealtimeStreamOptions
Voxtral-realtime streaming knobs (stream slot).
WhisperRunOptions
Whisper run-extension knobs (run slot): initial prompt, temperature fallback, and decode thresholds. None keeps the family default. initial_prompt cannot be combined with RunOptions::vocabulary / prompt.
Word
One word row.

Enums§

Backend
Which compute backend to request when loading a model.
CommitPolicy
When the UI-facing committed text grows during a stream.
DeviceType
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.
DiarizeExtension
A family extension for the diarize-run slot (transcribe_cpp::DiarizeSession::run).
ErrorKind
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).
SortformerPreset
Sortformer streaming operating point (latency / accuracy trade-off). The menu is discrete (jointly-tuned bundles), not a latency dial; Default keeps the GGUF-shipped checkpoint configuration.
StreamExtension
A family extension for the stream slot.
StreamState
Stream lifecycle state.
Task
The task a run performs.
TimestampKind
Requested (or returned) timestamp granularity.