Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Required Privileges

The API requires specific privileges for certain operations:
Requires requesting run-time privileges.

Constructors

new AudioRecordStreamBuilder()

new AudioRecordStreamBuilder(): AudioRecordStreamBuilder

Returns

AudioRecordStreamBuilder

Properties

args

args: Object = {}

Methods

buildAsync()

buildAsync(): Promise<AudioRecordStream>
Creates a new AudioRecordStream using the current builder configuration. Must call setAudioConfig and setAudioSource before building.

Returns

Promise<AudioRecordStream> Promise<AudioRecordStream> A promise that resolves to: Or rejects with:

destroyAsync()

static destroyAsync(recordStream: AudioRecordStream): Promise<AudioStatus>
Destroys an existing AudioRecordStream. This releases all resources associated with the stream. The stream object must not be used after calling this method.

Parameters

recordStream
AudioRecordStream The stream to destroy

Returns

Promise<AudioStatus> Promise<AudioStatus> A promise that resolves to:

reset()

reset(): void
Resets all builder configuration to default values. Use this to reuse the builder for creating a different stream configuration.

setAudioConfig()

setAudioConfig(config: AudioConfig): void
Sets the audio configuration for the stream to be built. This must be called before buildAsync.

Parameters

config
AudioConfig Audio configuration object containing:

setAudioFlags()

setAudioFlags(flags: AudioFlags): void
Sets optional audio flags for the stream to be built. These flags modify the behavior of the audio recording.

Parameters

flags
AudioFlags Bit flags from AudioFlags enum:

setAudioSource()

setAudioSource(source: AudioSource): void
Sets the audio source type for the stream to be built. This must be called before buildAsync. Different sources may have different routing and processing applied.

Parameters

source
AudioSource The type of audio input from AudioSource enum:
Last modified on August 25, 2026