Skip to main content

Overview

The Speech-to-Text (STT) API allows you to transcribe audio files or raw audio data to text using on-device Whisper models. All transcription happens locally on the device for privacy and offline capability.

Basic Usage

Or transcribe base64-encoded audio:

Setup

Before transcribing, you need to download and load an STT model:

API Reference

transcribeFile

transcribeFile() is declared in the SDK but not yet implemented. Calling it will throw: "transcribeFile not yet implemented with rac_* API". Use transcribe() or transcribeBuffer() instead.

transcribe

Transcribe base64-encoded audio data.
Parameters:

transcribeBuffer

Transcribe raw float32 audio samples directly.
Parameters:
transcribeBuffer converts the Float32Array to base64 internally and calls the native transcribe() method. The sample rate defaults to 16000 Hz.

STT Options

STT Result

Examples

Transcribe Base64 Audio

Transcribe Float32 Buffer

React Native Recording + Transcription

Using the SDK’s built-in RunAnywhere.Audio API for recording:
VoiceRecorder.tsx

Transcribe Buffer from Microphone

Supported Audio Formats

For best results, use 16kHz mono WAV files. The SDK automatically handles audio conversion, but native formats are faster.

Available Models

Error Handling

STT Streaming

Real-time transcription

STT Options

Advanced configuration

VAD

Voice Activity Detection

Voice Agent

Complete voice pipeline