transcribe() is a suspend extension function on RunAnywhere. It takes raw audio bytes and
returns an STTOutput, not a bare String.
transcribeWithOptions; transcribe() always takes options and always returns the
detailed output. RASTTOptions is a typealias for the generated
ai.runanywhere.proto.v1.STTOptions, and RASTTOutput for STTOutput.
Audio must be 16 kHz mono 16-bit PCM.
Model loading
There is one load entry point for every modality. Category is optional and only needed to disambiguate a model registered under more than one:loadModel returns a ModelLoadResult with a success flag rather than throwing:
STTOutput
WordTimestamp carries word, start_ms, end_ms, confidence, and speaker_id. All timings
are milliseconds, as Long.
TranscriptionMetadata carries model_id, processing_time_ms, audio_length_ms, and
real_time_factor. A real-time factor below 1.0 means transcription ran faster than the audio
plays.
metadata is an optional message and either field can be 0
when the backend does not report it.
Transcribing a file
Errors
transcribe() throws SDKException when the SDK is not initialized or when no speech-recognition
model is loaded. See Error handling.
Related
Streaming STT
Live microphone transcription
STT options
Every field on STTOptions