AudioCaptureManager class

SDK-owned microphone capture for speech-to-text.

Mirrors Swift AudioCaptureManager: startRecording emits PCM16 chunks (the streaming-STT input), startRecordingToBuffer/stopRecording is the one-shot WAV convenience, audioLevelStream mirrors @Published audioLevel.

Constructors

AudioCaptureManager()

Properties

audioLevelStream Stream<double>?
Normalized audio levels (0.0 to 1.0) while recording, or null when no capture is active. Mirrors Swift's @Published audioLevel.
no setter
hashCode int
The hash code for this object.
no setterinherited
isRecording bool
Whether capture is active. Mirrors Swift isRecording.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancel() Future<void>
Cancel the current capture without returning data. Mirrors Swift cancel().
dispose() Future<void>
Release the recorder. The manager is inert afterwards.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
requestPermission() Future<bool>
Whether microphone permission is granted (requests it when needed). Mirrors Swift requestPermission().
startRecording({int sampleRate = 16000, int numChannels = 1}) Future<Stream<Uint8List>?>
Start a raw PCM16 chunk stream (no file). The canonical streaming-STT input: chunks feed straight into RunAnywhere.transcribeStream(...). Mirrors Swift's tap onAudioData Int16 PCM callback as a Dart stream.
startRecordingToBuffer({int sampleRate = 16000, int numChannels = 1}) Future<String?>
One-shot convenience: record to a temp WAV file until stopRecording is called. Returns the recording path, or null on failure.
stopRecording() Future<Uint8List?>
Stop capture. For a startRecordingToBuffer session, returns the accumulated WAV bytes (and deletes the temp file); for a chunk-stream session, closing the recorder ends the stream (which lets the SDK session flush its final result) and this returns null. Mirrors Swift stopRecording().
toString() String
A string representation of this object.
inherited

Operators

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