AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
alexaClientSDK::capabilityAgents::aip::AudioProvider Struct Reference

#include <AudioProvider.h>

Collaboration diagram for alexaClientSDK::capabilityAgents::aip::AudioProvider:
Collaboration graph
[legend]

Public Member Functions

 AudioProvider (std::shared_ptr< avsCommon::avs::AudioInputStream > stream, const avsCommon::utils::AudioFormat &format, ASRProfile profile, bool alwaysReadable, bool canOverride, bool canBeOverridden)
 
 operator bool () const
 

Static Public Member Functions

static AudioProvider TapAudioProvider (std::shared_ptr< avsCommon::avs::AudioInputStream > stream, const avsCommon::utils::AudioFormat &format)
 
static AudioProvider WakeAudioProvider (std::shared_ptr< avsCommon::avs::AudioInputStream > stream, const avsCommon::utils::AudioFormat &format)
 
static AudioProvider HoldAudioProvider (std::shared_ptr< avsCommon::avs::AudioInputStream > stream, const avsCommon::utils::AudioFormat &format)
 
static const AudioProvidernull ()
 

Public Attributes

std::shared_ptr< avsCommon::avs::AudioInputStreamstream
 The ByteStream to use for audio input. More...
 
avsCommon::utils::AudioFormat format
 The AudioFormat of the data in byteStream. More...
 
ASRProfile profile
 The ASRProfile describing the acoustic environment for the audio input. More...
 
bool alwaysReadable
 Whether new audio data can be read at any time from byteStream. More...
 
bool canOverride
 Whether this AudioProvider should be allowed to interrupt/override another AudioProvider. More...
 
bool canBeOverridden
 Whether this AudioProvider should allow another AudioProvider to interrupt it. More...
 

Detailed Description

Wrapper for an audio input ByteStream which includes information about the audio format and policies for using it.

Constructor & Destructor Documentation

◆ AudioProvider()

alexaClientSDK::capabilityAgents::aip::AudioProvider::AudioProvider ( std::shared_ptr< avsCommon::avs::AudioInputStream stream,
const avsCommon::utils::AudioFormat format,
ASRProfile  profile,
bool  alwaysReadable,
bool  canOverride,
bool  canBeOverridden 
)
inline

Initialization constructor.

Parameters
streamThe ByteStream to use for audio input.
formatThe AudioFormat of the data in byteStream.
profileThe AudioProfile describing the acoustic environment for the audio input.
alwaysReadableWhether new audio data can be read at any time from byteStream. This must be true for a stream to be automatically opened up by an ExpectSpeech directive.
canOverrideWhether this AudioProvider should be allowed to interrupt/override another AudioProvider.
canBeOverriddenWhether this AudioProvider allows another AudioProvider to interrupt it.

Member Function Documentation

◆ HoldAudioProvider()

AudioProvider alexaClientSDK::capabilityAgents::aip::AudioProvider::HoldAudioProvider ( std::shared_ptr< avsCommon::avs::AudioInputStream stream,
const avsCommon::utils::AudioFormat format 
)
inlinestatic

This function provides an AudioProvider for a HoldToTalk Interaction.

Parameters
streamThe ByteStream to use for audio input.
formatThe AudioFormat of the data in byteStream.
Returns
A HoldToTalk configured AudioProvider.

◆ null()

const AudioProvider & alexaClientSDK::capabilityAgents::aip::AudioProvider::null ( )
inlinestatic

This function provides an invalid AudioProvider which has no stream associated with it.

Returns
An invalid AudioProvider which has no stream associated with it.

◆ operator bool()

alexaClientSDK::capabilityAgents::aip::AudioProvider::operator bool ( ) const
inline

This function checks whether this is a valid AudioProvider. An AudioProvider is valid if it has a stream associated with it.

Returns
true if stream != nullptr, else false.

◆ TapAudioProvider()

AudioProvider alexaClientSDK::capabilityAgents::aip::AudioProvider::TapAudioProvider ( std::shared_ptr< avsCommon::avs::AudioInputStream stream,
const avsCommon::utils::AudioFormat format 
)
inlinestatic

This function provides an AudioProvider for a TapToTalk Interaction.

Parameters
streamThe ByteStream to use for audio input.
formatThe AudioFormat of the data in byteStream.
Returns
A TapToTalk configured AudioProvider.

◆ WakeAudioProvider()

AudioProvider alexaClientSDK::capabilityAgents::aip::AudioProvider::WakeAudioProvider ( std::shared_ptr< avsCommon::avs::AudioInputStream stream,
const avsCommon::utils::AudioFormat format 
)
inlinestatic

This function provides an AudioProvider for a Wakeword Interaction.

Parameters
streamThe ByteStream to use for audio input.
formatThe AudioFormat of the data in byteStream.
Returns
A Wakeword configured AudioProvider.

Member Data Documentation

◆ alwaysReadable

bool alexaClientSDK::capabilityAgents::aip::AudioProvider::alwaysReadable

Whether new audio data can be read at any time from byteStream.

◆ canBeOverridden

bool alexaClientSDK::capabilityAgents::aip::AudioProvider::canBeOverridden

Whether this AudioProvider should allow another AudioProvider to interrupt it.

◆ canOverride

bool alexaClientSDK::capabilityAgents::aip::AudioProvider::canOverride

Whether this AudioProvider should be allowed to interrupt/override another AudioProvider.

◆ format

avsCommon::utils::AudioFormat alexaClientSDK::capabilityAgents::aip::AudioProvider::format

The AudioFormat of the data in byteStream.

◆ profile

ASRProfile alexaClientSDK::capabilityAgents::aip::AudioProvider::profile

The ASRProfile describing the acoustic environment for the audio input.

◆ stream

std::shared_ptr<avsCommon::avs::AudioInputStream> alexaClientSDK::capabilityAgents::aip::AudioProvider::stream

The ByteStream to use for audio input.


The documentation for this struct was generated from the following file:

AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0