AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Classes | Namespaces | Typedefs | Functions | Variables
AudioInputProcessorTest.cpp File Reference
#include <cstring>
#include <climits>
#include <numeric>
#include <sstream>
#include <vector>
#include <gtest/gtest.h>
#include <rapidjson/document.h>
#include <rapidjson/error/en.h>
#include <rapidjson/stringbuffer.h>
#include <rapidjson/writer.h>
#include <acsdk/AudioEncoderInterfaces/BlockAudioEncoderInterface.h>
#include <acsdk/AudioEncoder/AudioEncoderFactory.h>
#include <AVSCommon/AVS/CapabilityChangeNotifier.h>
#include <AVSCommon/AVS/CapabilityChangeNotifierInterface.h>
#include <AVSCommon/AVS/Attachment/MockAttachmentManager.h>
#include <AVSCommon/SDKInterfaces/CapabilityConfigurationChangeObserverInterface.h>
#include <AVSCommon/SDKInterfaces/ConnectionStatusObserverInterface.h>
#include <AVSCommon/SDKInterfaces/ContextRequestToken.h>
#include <AVSCommon/SDKInterfaces/ExpectSpeechTimeoutHandlerInterface.h>
#include <AVSCommon/SDKInterfaces/MockAVSConnectionManager.h>
#include <AVSCommon/SDKInterfaces/MockDirectiveSequencer.h>
#include <AVSCommon/SDKInterfaces/MockMessageSender.h>
#include <AVSCommon/SDKInterfaces/MockContextManager.h>
#include <AVSCommon/SDKInterfaces/MockFocusManager.h>
#include <AVSCommon/SDKInterfaces/MockDirectiveHandlerResult.h>
#include <AVSCommon/SDKInterfaces/MockExceptionEncounteredSender.h>
#include <AVSCommon/SDKInterfaces/MockLocaleAssetsManager.h>
#include <AVSCommon/SDKInterfaces/MockSystemSoundPlayer.h>
#include <AVSCommon/SDKInterfaces/MockUserInactivityMonitor.h>
#include <AVSCommon/SDKInterfaces/MockPowerResourceManager.h>
#include <AVSCommon/Utils/JSON/JSONUtils.h>
#include <AVSCommon/Utils/Memory/Memory.h>
#include <AVSCommon/Utils/Metrics/MockMetricRecorder.h>
#include <AVSCommon/Utils/UUIDGeneration/UUIDGeneration.h>
#include <Settings/DeviceSettingsManager.h>
#include <Settings/MockDeviceSettingStorage.h>
#include <Settings/MockSettingEventSender.h>
#include <Settings/SettingEventSender.h>
#include <Settings/MockSetting.h>
#include "AIP/AudioInputProcessor.h"
#include "MockObserver.h"
Include dependency graph for AudioInputProcessorTest.cpp:

Classes

class  alexaClientSDK::capabilityAgents::aip::test::RecognizeEvent
 
class  alexaClientSDK::capabilityAgents::aip::test::TestDialogUXStateObserver
 Class to monitor DialogUXStateAggregator for the THINKING state and automatically move it to IDLE. More...
 
class  alexaClientSDK::capabilityAgents::aip::test::MockExpectSpeechTimeoutHandler
 
class  alexaClientSDK::capabilityAgents::aip::test::MockBlockAudioEncoder
 Mock class that implements the BlockAudioEncoderInterface. More...
 
class  alexaClientSDK::capabilityAgents::aip::test::MockCapabilityConfigurationChangeObserver
 Mock class that implements the CapabilityConfigurationChangeObserverInterface. More...
 
class  alexaClientSDK::capabilityAgents::aip::test::AudioInputProcessorTest
 Test harness for AudioInputProcessor class. More...
 

Namespaces

 alexaClientSDK
 Whether or not curl logs should be emitted.
 
 alexaClientSDK::capabilityAgents
 
 alexaClientSDK::capabilityAgents::aip
 
 alexaClientSDK::capabilityAgents::aip::test
 

Typedefs

using PowerResourceLevel = PowerResourceManagerInterface::PowerResourceLevel
 
using alexaClientSDK::capabilityAgents::aip::test::Bytes = audioEncoderInterfaces::BlockAudioEncoderInterface::Bytes
 Byte array for audio sample data passing. More...
 
using alexaClientSDK::capabilityAgents::aip::test::Sample = uint16_t
 Integral type of a sample. More...
 

Functions

static const std::chrono::seconds alexaClientSDK::capabilityAgents::aip::test::TEST_TIMEOUT (10)
 General timeout for tests to fail. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::COMPONENT_NAME ("AudioInputProcessor")
 Component name for power resource management. More...
 
static rapidjson::Document alexaClientSDK::capabilityAgents::aip::test::parseJson (const std::string &json)
 Utility function to parse a JSON document. More...
 
 alexaClientSDK::capabilityAgents::aip::test::MATCHER_P (IsSamePowerResource, id, "")
 A matcher to compare PowerResourceId. More...
 
static std::string alexaClientSDK::capabilityAgents::aip::test::getJsonString (const rapidjson::Value &container, const std::string &key)
 Utility function to look up a JSON string in a container. More...
 
static int64_t alexaClientSDK::capabilityAgents::aip::test::getJsonInt64 (const rapidjson::Value &container, const std::string &key)
 Utility function to look up a JSON 'long' in a container. More...
 
static bool alexaClientSDK::capabilityAgents::aip::test::getInitiatorFromDirective (const std::string directive, std::string *initiator)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_createWithoutDirectiveSequencer)
 Function to verify that AudioInputProcessor::create() errors out with an invalid DirectiveSequencerInterface. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_createWithoutMessageSender)
 Function to verify that AudioInputProcessor::create() errors out with an invalid MessageSenderInterface. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_createWithoutContextManager)
 Function to verify that AudioInputProcessor::create() errors out with an invalid ContextManagerInterface. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_createWithoutFocusManager)
 Function to verify that AudioInputProcessor::create() errors out with an invalid FocusManagerInterface. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_createWithoutStateAggregator)
 Function to verify that AudioInputProcessor::create() errors out with an invalid DialogUXStateAggregator. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_createWithoutExceptionSender)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_createWithoutUserInactivityMonitor)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_createWithoutCapabilityChangeNotifier)
 Function to verify that AudioInputProcessor::create() errors out with an invalid CapabilityChangeNotifier. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_createWithoutAudioProvider)
 Function to verify that AudioInputProcessor::create() succeeds with a null AudioProvider. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_createWithoutPowerResourceManager)
 Function to verify that AudioInputProcessor::create() succeeds with a null PowerResourceManagerInterface. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_createWithoutMetricRecorder)
 Function to verify that AudioInputProcessor::create() succeeds with a null MetricRecorderInterface. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_getConfiguration)
 Function to verify that AudioInputProcessor::getconfiguration() returns the expected configuration data. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_addRemoveObserver)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeNullStream)
 This function verifies that AudioInputProcessor::recognize() fails when given a null AudioProvider. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeInvalidAudioFormat)
 This function verifies that AudioInputProcessor::recognize() fails when given invalid AudioFormats. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizePressAndHold)
 This function verifies that AudioInputProcessor::recognize() works with Initiator::PRESS_AND_HOLD. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeTap)
 This function verifies that AudioInputProcessor::recognize() works with Initiator::TAP. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeWakewordWithoutKeyword)
 This function verifies that AudioInputProcessor::recognize() fails with Initiator::WAKEWORD and no keyword. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeWakewordWithBadBegin)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeWakewordWithKeyword)
 This function verifies that AudioInputProcessor::recognize() works with Initiator::WAKEWORD and keyword. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeWakewordWithGoodBegin)
 This function verifies that AudioInputProcessor::recognize() works with Initiator::WAKEWORD valid begin. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeWakewordWithGoodBeginAndEnd)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeCloseTalk)
 This function verifies that AudioInputProcessor::recognize() works with ASRProfile::CLOSE_TALK. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeNearField)
 This function verifies that AudioInputProcessor::recognize() works with ASRProfile::NEAR_FIELD. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeFarField)
 This function verifies that AudioInputProcessor::recognize() works with ASRProfile::FAR_FIELD. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeFarFieldWithEncoder)
 Test if AudioInputProcessor::recognize() works with an audio encoder. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeFarFieldWithEncoderDisabled)
 Test if AudioInputProcessor::recognize() works with an audio encoder. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeFarFieldWithEncoderReEnabled)
 Test if AudioInputProcessor::recognize() works with an audio encoder. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeWhileExpectingSpeech)
 This function verifies that AudioInputProcessor::recognize() works in State::EXPECTING_SPEECH. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeStopAfterRecognize)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeStopAfterContext)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeStopAfterFocus)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeStopAfterSend)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeBargeInWhileRecognizingCloseTalk)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeBargeInWhileRecognizingNearField)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeBargeInWhileRecognizingFarField)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeBargeInWhileRecognizingCantOverride)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeBargeInWhileRecognizingCantBeOverridden)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureWhenIdle)
 This function verifies that AudioInputProcessor::stopCapture() fails in State::IDLE. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureWhenExpectingSpeech)
 This function verifies that AudioInputProcessor::stopCapture() fails in State::EXPECTING_SPEECH. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureWhenRecognizing)
 This function verifies that AudioInputProcessor::stopCapture() works in State::RECOGNIZING. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureWhenRecognizingFollowByStopCaptureDirective)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_resetStateWhenIdle)
 This function verifies that AudioInputProcessor::resetState() works in State::IDLE. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_resetStateWhenExpectingSpeech)
 This function verifies that AudioInputProcessor::resetState() works in State::EXPECTING_SPEECH. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_resetStateWhenRecognizing)
 This function verifies that AudioInputProcessor::resetState() works in State::RECOGNIZING. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_contextFailureStateProviderTimedout)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_contextFailureBuildContextError)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_preHandleAndHandleDirectiveStopCaptureWhenIdle)
 This function verifies that StopCapture directives fail in State::IDLE. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_preHandleAndHandleDirectiveStopCaptureWhenRecognizing)
 This function verifies that StopCapture directives with dialog request ID work in State::RECOGNIZING. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_preHandleAndHandleDirectiveStopCaptureWhenExpectingSpeech)
 This function verifies that StopCapture directives fail in State::EXPECTING_SPEECH. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_handleDirectiveImmediatelyStopCaptureWhenRecognizing)
 This function verifies that StopCapture directives without dialog request ID work in State::RECOGNIZING. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_preHandleAndHandleDirectiveExpectSpeechWhenIdle)
 This function verifies that ExpectSpeech directives with dialog request ID work in State::IDLE. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_handleDirectiveImmediatelyExpectSpeechWhenIdle)
 This function verifies that ExpectSpeech directives without dialog request ID work in State::IDLE. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_preHandleAndHandleDirectiveExpectSpeechWhenRecognizing)
 This function verifies that ExpectSpeech directives fail in State::RECOGNIZING. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_preHandleAndHandleDirectiveExpectSpeechWhenExpectingSpeech)
 This function verifies that ExpectSpeech directives fail in State::EXPECTING_SPEECH. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_expectSpeechNoDefaultNoPrevious)
 This function verifies that ExpectSpeech directives wait with no default and no previous AudioProvider. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_expectSpeechUnreadableDefaultNoPrevious)
 This function verifies that ExpectSpeech directives wait with unreadable default and no previous AudioProvider. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_expectSpeechUnreadableDefaultUnreadablePrevious)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_expectSpeechNoDefaultReadablePrevious)
 This function verifies that ExpectSpeech directives work with no default and readable previous AudioProvider. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_expectSpeechWithInitiator)
 This function verifies that the initiator from an ExpectSpeech is passed to a subsequent Recognize. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_expectSpeechWithNoInitiator)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_expectSpeechWithInitiatorTimedOut)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, handleExpectSpeechTimeoutExternallyWithTimeout)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, handleExpectSpeechTimeoutExternallyWithoutTimeout)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, handleExpectSpeechTimeoutInternallyWithAlwaysReadableAudioProviderResultsInRecognize)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, handleExpectSpeechTimeoutExternallyWithAlwaysReadableAudioProviderResultsInRecognize)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_focusChangedBackground)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_focusChangedNone)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_resetStateOnTimeOut)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeWakewordWithESPWithKeyword)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeWakewordWithInvalidESPWithKeyword)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeOPUSWithTap)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeOPUSWithPressAndHold)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeOPUSWithWakeWord)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeWakewordWithKWDMetadata)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeInvalidWakeWord)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnStreamSuccessBeforeClose)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnStreamSuccess)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnStreamSuccessNoContentBeforeClose)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnStreamPendingBeforeClose)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnStreamSuccessNoContent)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnStreamSuccessNotConnected)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnStreamNotSynchronized)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnStreamInternalrror)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnStreamProtocolError)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnStreamServerInternalError)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnStreamRefused)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnStreamCanceled)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnStreamThrottled)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnStreamInvalidAuth)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnStreamBadRequest)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnStreamUnknownServerError)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnDirectiveAndStreamSuccess)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnDirectiveAndStreamSuccessNoContent)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnDirectiveAndStreamSuccessNotConnected)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnDirectiveAndStreamNotSynchronized)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnDirectiveAndStreamInternalrror)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnDirectiveAndStreamProtocolError)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnDirectiveAndStreamServerInternalError)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnDirectiveAndStreamRefused)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnDirectiveAndStreamCanceled)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnDirectiveAndStreamThrottled)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnDirectiveAndStreamInvalidAuth)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnDirectiveAndStreamBadRequest)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnDirectiveAndStreamUnknownServerError)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnStreamSuccessAndDirectiveBeforeClose)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnStreamSuccessAndDirective)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnStreamSuccessNoContentAndDirective)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnStreamSuccessNotConnectedAndDirective)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnStreamNotSynchronizedAndDirective)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnStreamInternalrrorAndDirective)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnStreamProtocolErrorAndDirective)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnStreamServerInternalErrorAndDirective)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnStreamRefusedAndDirective)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnStreamCanceledAndDirective)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnStreamThrottledAndDirective)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnStreamInvalidAuthAndDirective)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnStreamBadRequestAndDirective)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureOnStreamUnknownServerErrorAndDirective)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_handleSetEndOfSpeechOffsetSuccess)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_handleSetEndOfSpeechOffsetFailureInvalid)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_handleSetEndOfSpeechOffsetFailureMissing)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_handleSetWakeWordConfirmation)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_setSpeechConfirmation)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_setWakeWordsDirectiveSuccess)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_publishedCapabiltiesContainsSupportedWakeWords)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_localeAssetsChanged)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_requestEncodingAudioFormatsSuccess)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_requestEncodingAudioFormatsWithFallbackAndUnsupportedFormats)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_requestEncodingAudioFormatsFails)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeWakewordWithKeywordForMultiStreams)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeWakewordWithMetadataForMultipleAudioStreams)
 This function verifies that recognize() works with KWD metadata for multiple audio streams. More...
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeWakewordStopAfterSendForMultiStreams)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeWakewordStopAfterRecognizeForMultiStreams)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeWakewordStopAfterContextForMultiStreams)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeWakewordStopCaptureAfterFocusForMultiStreams)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeWakewordWithGoodBeginAndEndForMultiStreams)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeBargeInWhileRecognizingCloseTalkForMultiStreams)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_stopCaptureWhenRecognizingForMultiStreams)
 
 alexaClientSDK::capabilityAgents::aip::test::TEST_F (AudioInputProcessorTest, test_recognizeWorksWithOneFormatInRequestEncodingAudioFormats)
 

Variables

static const std::string alexaClientSDK::capabilityAgents::aip::test::CHANNEL_NAME = avsCommon::sdkInterfaces::FocusManagerInterface::DIALOG_CHANNEL_NAME
 The name of the FocusManager channel used by AudioInputProvider. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::NAMESPACE = "SpeechRecognizer"
 The namespace for this capability agent. More...
 
static const avsCommon::avs::NamespaceAndName alexaClientSDK::capabilityAgents::aip::test::STOP_CAPTURE {NAMESPACE, "StopCapture"}
 The StopCapture directive signature. More...
 
static const avsCommon::avs::NamespaceAndName alexaClientSDK::capabilityAgents::aip::test::EXPECT_SPEECH {NAMESPACE, "ExpectSpeech"}
 The ExpectSpeech directive signature. More...
 
static const avsCommon::avs::NamespaceAndName alexaClientSDK::capabilityAgents::aip::test::SET_END_OF_SPEECH_OFFSET {NAMESPACE, "SetEndOfSpeechOffset"}
 The SetEndOfSpeechOffset directive signature. More...
 
static const avsCommon::avs::NamespaceAndName alexaClientSDK::capabilityAgents::aip::test::SET_WAKE_WORD_CONFIRMATION {NAMESPACE, "SetWakeWordConfirmation"}
 The SetWakeWordConfirmation directive signature. More...
 
static const avsCommon::avs::NamespaceAndName alexaClientSDK::capabilityAgents::aip::test::SET_SPEECH_CONFIRMATION {NAMESPACE, "SetSpeechConfirmation"}
 The SetSpeechConfirmation directive signature. More...
 
static const avsCommon::avs::NamespaceAndName alexaClientSDK::capabilityAgents::aip::test::SET_WAKE_WORDS {NAMESPACE, "SetWakeWords"}
 The SetWakeWords directive signature. More...
 
static const avsCommon::avs::NamespaceAndName alexaClientSDK::capabilityAgents::aip::test::DIRECTIVES []
 The directives AudioInputProcessor should handle. More...
 
static const avsCommon::avs::NamespaceAndName alexaClientSDK::capabilityAgents::aip::test::RECOGNIZER_STATE {NAMESPACE, "RecognizerState"}
 The SpeechRecognizer context state signature. More...
 
static const unsigned int alexaClientSDK::capabilityAgents::aip::test::SAMPLE_RATE_HZ = 16000
 Sample rate for audio input stream. More...
 
static const size_t alexaClientSDK::capabilityAgents::aip::test::SDS_WORDSIZE = sizeof(Sample)
 Number of bytes per word in the SDS circular buffer. More...
 
static const unsigned int alexaClientSDK::capabilityAgents::aip::test::SAMPLE_SIZE_IN_BITS = SDS_WORDSIZE * CHAR_BIT
 Sample size for audio input stream. More...
 
static const unsigned int alexaClientSDK::capabilityAgents::aip::test::NUM_CHANNELS = 1
 Number of channels in audio input stream. More...
 
static const std::chrono::milliseconds alexaClientSDK::capabilityAgents::aip::test::PREROLL_MS = std::chrono::milliseconds(500)
 Number of milliseconds of preroll applied for cloud-based wakeword verification. More...
 
static const size_t alexaClientSDK::capabilityAgents::aip::test::PREROLL_WORDS = (SAMPLE_RATE_HZ / 1000) * PREROLL_MS.count()
 Number of words of preroll. More...
 
static const size_t alexaClientSDK::capabilityAgents::aip::test::WAKEWORD_WORDS = PREROLL_WORDS
 Number of words in wakeword. More...
 
static const size_t alexaClientSDK::capabilityAgents::aip::test::SDS_WORDS = PREROLL_WORDS + WAKEWORD_WORDS + 1000
 Number of words to hold in the SDS circular buffer. More...
 
static const size_t alexaClientSDK::capabilityAgents::aip::test::PATTERN_WORDS = SDS_WORDS / 2
 Number of test pattern words to write to the SDS circular buffer. More...
 
static const size_t alexaClientSDK::capabilityAgents::aip::test::SDS_MAXREADERS = 10
 Maximum number of readers to support in the SDS circular buffer. More...
 
static const bool alexaClientSDK::capabilityAgents::aip::test::ALWAYS_READABLE = true
 Boolean value to indicate an AudioProvider is always readable. More...
 
static const bool alexaClientSDK::capabilityAgents::aip::test::CAN_OVERRIDE = true
 Boolean value to indicate an AudioProvider can override another AudioProvider. More...
 
static const bool alexaClientSDK::capabilityAgents::aip::test::CAN_BE_OVERRIDDEN = true
 Boolean value to indicate an AudioProvider can be overridden by another AudioProvider. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::MESSAGE_CONTEXT_KEY = "context"
 JSON key for the context section of a message. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::MESSAGE_EVENT_KEY = "event"
 JSON key for the event section of a message. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::MESSAGE_DIRECTIVE_KEY = "directive"
 JSON key for the directive section of a message. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::MESSAGE_HEADER_KEY = "header"
 JSON key for the header section of a message. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::MESSAGE_PAYLOAD_KEY = "payload"
 JSON key for the payload section of an message. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::MESSAGE_NAMESPACE_KEY = "namespace"
 JSON key for the namespace field of a message header. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::MESSAGE_NAME_KEY = "name"
 JSON key for the name field of a message header. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::MESSAGE_MESSAGE_ID_KEY = "messageId"
 JSON key for the message ID field of a message header. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::MESSAGE_DIALOG_REQUEST_ID_KEY = "dialogRequestId"
 JSON key for the dialog request ID field of a message header. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::RECOGNIZE_EVENT_NAME = "Recognize"
 JSON value for a recognize event's name. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::ASR_PROFILE_KEY = "profile"
 JSON key for the ASR profile field of a recognize event. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::AUDIO_FORMAT_KEY = "format"
 JSON key for the audio format field of a recognize event. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::AUDIO_FORMAT_OPUS = "OPUS"
 JSON value for audio format OPUS. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::AUDIO_FORMAT_LPCM = "AUDIO_L16_RATE_16000_CHANNELS_1"
 JSON value for audio format LPCM. More...
 
static const std::unordered_set< std::string > alexaClientSDK::capabilityAgents::aip::test::AUDIO_FORMAT_VALUES = {AUDIO_FORMAT_LPCM, AUDIO_FORMAT_OPUS}
 Accepted JSON values for a recognize event's audio format. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::RECOGNIZE_INITIATOR_KEY = "initiator"
 JSON key for the initiator field of a recognize event. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::INITIATOR_TYPE_KEY = "type"
 JSON key for the type field of a recognize event's initiator. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::INITIATOR_PAYLOAD_KEY = "payload"
 JSON key for the type field of a recognize event's payload. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::WAKE_WORD_INDICES_KEY = "wakeWordIndices"
 JSON key for the wakeword indices field of a wakeword recognize event's payload. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::START_INDEX_KEY = "startIndexInSamples"
 JSON key for the start index field of a wakeword recognize event's payload. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::END_INDEX_KEY = "endIndexInSamples"
 JSON key for the end index field of a wakeword recognize event's payload. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::EXPECT_SPEECH_INITIATOR = R"({"opaque":"expectSpeechInitiator"})"
 Value used in the tests for an expect speech initiator. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::EXPECT_SPEECH_TIMEOUT_KEY = "timeoutInMilliseconds"
 JSON key for the timeout field of an expect speech directive. More...
 
static const int64_t alexaClientSDK::capabilityAgents::aip::test::EXPECT_SPEECH_TIMEOUT_IN_MILLISECONDS = 100
 Value used in the tests for an expect speech timeout. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::EXPECT_SPEECH_INITIATOR_KEY = "initiator"
 JSON key for the initiator field of an expect speech directive. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::EXPECT_SPEECH_TIMED_OUT_EVENT_NAME = "ExpectSpeechTimedOut"
 JSON value for a expect speech timed out event's name. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::KEYWORD_TEXT = "ALEXA"
 Value used in the tests for a wakeword recognize event. More...
 
static const bool alexaClientSDK::capabilityAgents::aip::test::WITH_DIALOG_REQUEST_ID = true
 Boolean value to indicate a directive being tested has a dialog request ID. More...
 
static const bool alexaClientSDK::capabilityAgents::aip::test::VERIFY_TIMEOUT = true
 Boolean value to indicate an expect speech directive should time out. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::ESP_EVENT_NAME = "ReportEchoSpatialPerceptionData"
 JSON value for a ReportEchoSpatialPerceptionData event's name. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::ESP_VOICE_ENERGY_KEY = "voiceEnergy"
 JSON key for the voice energy field of a ReportEchoSpatialPerceptionData event. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::ESP_AMBIENT_ENERGY_KEY = "ambientEnergy"
 JSON key for the ambient energy field of a ReportEchoSpatialPerceptionData event. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::AUDIO_ATTACHMENT_FIELD_NAME = "audio"
 The field name for the user voice attachment. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::KWD_METADATA_FIELD_NAME = "wakewordEngineMetadata"
 The field name for the wake word engine metadata. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::WAKEWORD_FIELD_NAME = "wakeWord"
 The field name for the wake word detected. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::END_OF_SPEECH_OFFSET_FIELD_NAME = "endOfSpeechOffsetInMilliseconds"
 
static const int64_t alexaClientSDK::capabilityAgents::aip::test::END_OF_SPEECH_OFFSET_IN_MILLISECONDS = 1526
 Value used in the tests for an end of speech offset. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::START_OF_SPEECH_TIMESTAMP_FIELD_NAME = "startOfSpeechTimestamp"
 
static const auto alexaClientSDK::capabilityAgents::aip::test::START_OF_SPEECH_TIMESTAMP = std::chrono::steady_clock::now()
 Value used in the tests for an start of speech timestamp. More...
 
static const auto alexaClientSDK::capabilityAgents::aip::test::START_OF_SPEECH_TIMESTAMP_STR = std::to_string(START_OF_SPEECH_TIMESTAMP.time_since_epoch().count())
 String value used for start of speech timestamp string representation. More...
 
static const size_t alexaClientSDK::capabilityAgents::aip::test::MESSAGE_ATTACHMENT_KWD_METADATA_INDEX = 0
 The index of the Wakeword engine metadata in the MessageRequest. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::KWD_METADATA_EXAMPLE = "Wakeword engine metadata example"
 Sample Wakeword engine metadata to compare with the @ AttachmentReader. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::WAKE_WORD_CONFIRMATION_PAYLOAD_KEY = "wakeWordConfirmation"
 The value of the payload key for wakeWordConfirmation. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::SPEECH_CONFIRMATION_PAYLOAD_KEY = "speechConfirmation"
 The value of the payload key for speechConfirmation. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::WAKEWORDS_PAYLOAD_KEY = "wakeWords"
 The value of the payload key for wake words. More...
 
static const std::set< std::string > alexaClientSDK::capabilityAgents::aip::test::SUPPORTED_WAKE_WORDS = {"ALEXA", "ECHO"}
 A list of test supported wake words. More...
 
static const std::map< std::string, std::set< std::set< std::string > > > alexaClientSDK::capabilityAgents::aip::test::SUPPORTED_LOCALE_SPECIFIC_WAKEWORDS
 A list of test supported locale specific wakewords. More...
 
static const std::set< std::string > alexaClientSDK::capabilityAgents::aip::test::SUPPORTED_LOCALES = {"en-CA", "en-US"}
 A list of test supported locales. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::DEFAULT_LOCALE = "en-CA"
 Default locale. More...
 
static const std::string alexaClientSDK::capabilityAgents::aip::test::CAPABILITY_INTERFACE_CONFIGURATIONS_KEY = "configurations"
 Capability configuration key used to give more details about the device configuration. More...
 
static const ContextRequestToken alexaClientSDK::capabilityAgents::aip::test::CONTEXT_REQUEST_TOKEN {1}
 
static const AudioInputProcessor::EncodingFormatRequest alexaClientSDK::capabilityAgents::aip::test::ENCODING_FORMAT_REQ
 Request to configure AIP to produce multiple audio streams with different encoding formats. More...
 
static const AudioInputProcessor::EncodingFormatResponse alexaClientSDK::capabilityAgents::aip::test::ENCODING_FORMAT_RSP
 Response for the request to AIP to produce multiple audio streams. More...
 
static const std::map< std::string, std::string > alexaClientSDK::capabilityAgents::aip::test::EXPECTED_ENCODING_FORMATS
 Expected resolve key to encoding format strings. More...
 

Typedef Documentation

◆ PowerResourceLevel

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