DartBridgeSTT class

STT component bridge for C++ interop.

Provides thread-safe access to the C++ STT component. Handles model loading, transcription, and streaming.

Properties

currentModelId String?
Get the currently loaded model ID.
no setter
hashCode int
The hash code for this object.
no setterinherited
isLoaded bool
Check if a model is loaded.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
supportsStreaming bool
Check if streaming is supported.
no setter

Methods

destroy() → void
Destroy the component and release resources.
getHandle() RacHandle
Get or create the STT component handle.
loadModelForStreaming({required String path, required String id, required String name}) → void
Load a model onto this component handle. Streaming sessions are handle-bound, so the lifecycle-resolved model must be loaded here first (mirrors Swift prepareStreamingHandle). No-op when already loaded.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
transcribeLifecycleProto(STTTranscriptionRequest request) STTOutput
Transcribe audio through the lifecycle-owned generated-proto STT ABI.
transcribeLifecycleProtoAsync(STTTranscriptionRequest request) Future<STTOutput>
Transcribe audio through the lifecycle-owned generated-proto STT ABI, running the blocking native call in a short-lived worker isolate (Isolate.run) so the calling isolate — usually the Flutter UI isolate — stays responsive for the whole transcription. Whisper decode of a batch buffer is a long synchronous block; on the UI isolate it freezes frames. Mirrors dart_bridge_llm.dart's generateProto: this ABI is lifecycle-owned (no Dart-held handle), so the worker re-resolves the engine via the commons model lifecycle — nothing isolate-bound crosses.
transcribeProto(Uint8List audioData, STTOptions options) Future<STTOutput>
Transcribe audio with serialized runanywhere.v1.STTOptions.
transcribeSessionStream(Stream<Uint8List> audio, STTOptions options) Stream<STTPartialResult>
Canonical chunk-feed stream-in / stream-out transcription session.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

shared DartBridgeSTT
Shared instance
final