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
Skip to main content

Constructors

new AudioRecordStream()

new AudioRecordStream(id): AudioRecordStream Creates a new AudioRecordStream instance. This constructor Must not be called directly. Use AudioRecordStreamBuilder.AudioRecordStreamBuilder.buildAsync to create instances.

Parameters

id
number Internal stream identifier

Returns

AudioRecordStream

Properties

streamId

streamId: number

Methods

flushAsync()

flushAsync(): Promise<AudioStatus> Flushes the record buffer, discarding any unread data.

Returns

Promise<AudioStatus> A promise that resolves to:
  • STATUS_NO_ERROR (0): Successfully flushed
  • STATUS_NO_INIT (-3): Stream not initialized
  • STATUS_DEAD_OBJECT (-5): Server communication error

getAudioConfigAsync()

getAudioConfigAsync(): Promise<AudioConfig> Retrieves the current audio configuration of the record stream.

Returns

Promise<AudioConfig> A promise that resolves to an AudioConfig object containing:
  • sampleRate: Current sample rate in Hz
  • channelMask: Current channel configuration
  • format: Current sample format Or rejects with:
  • STATUS_NO_INIT (-3): Stream not initialized
  • STATUS_DEAD_OBJECT (-5): Server communication error

Last modified on October 2, 2025