as

Settings
Sign out
Notifications
Alexa
亚马逊应用商店
AWS
文档
Support
Contact Us
My Cases
新手入门
设计和开发
应用发布
参考
支持
跳转到主要内容

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:
最后修改于 2026年8月25日