AlexaClientSDK  1.20.1
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 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

◆ 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.

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 1.20.1 - Copyright 2016-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0