AlexaClientSDK  1.20.1
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Classes | Typedefs | Functions | Variables
alexaClientSDK::capabilityAgents::aip::test Namespace Reference

Classes

class  AudioInputProcessorTest
 Test harness for AudioInputProcessor class. More...
 
class  MockObserver
 Mock class that implements the Observer. More...
 
class  RecognizeEvent
 
class  TestDialogUXStateObserver
 Class to monitor DialogUXStateAggregator for the THINKING state and automatically move it to IDLE. More...
 

Typedefs

using Sample = uint16_t
 Integral type of a sample. More...
 

Functions

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

Variables

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

Typedef Documentation

◆ Sample

Integral type of a sample.

Function Documentation

◆ COMPONENT_NAME()

static const std::string alexaClientSDK::capabilityAgents::aip::test::COMPONENT_NAME ( "AudioInputProcessor"  )
static

Component name for power resource management.

◆ getInitiatorFromDirective()

static bool alexaClientSDK::capabilityAgents::aip::test::getInitiatorFromDirective ( const std::string  directive,
std::string *  initiator 
)
static

◆ getJsonInt64()

static int64_t alexaClientSDK::capabilityAgents::aip::test::getJsonInt64 ( const rapidjson::Value &  container,
const std::string &  key 
)
static

Utility function to look up a JSON 'long' in a container.

◆ getJsonString()

static std::string alexaClientSDK::capabilityAgents::aip::test::getJsonString ( const rapidjson::Value &  container,
const std::string &  key 
)
static

Utility function to look up a JSON string in a container.

◆ parseJson()

static rapidjson::Document alexaClientSDK::capabilityAgents::aip::test::parseJson ( const std::string &  json)
static

Utility function to parse a JSON document.

◆ TEST_F() [1/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_createWithoutDirectiveSequencer   
)

Function to verify that AudioInputProcessor::create() errors out with an invalid DirectiveSequencerInterface.

◆ TEST_F() [2/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_createWithoutMessageSender   
)

Function to verify that AudioInputProcessor::create() errors out with an invalid MessageSenderInterface.

◆ TEST_F() [3/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_createWithoutContextManager   
)

Function to verify that AudioInputProcessor::create() errors out with an invalid ContextManagerInterface.

◆ TEST_F() [4/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_createWithoutFocusManager   
)

Function to verify that AudioInputProcessor::create() errors out with an invalid FocusManagerInterface.

◆ TEST_F() [5/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_createWithoutStateAggregator   
)

Function to verify that AudioInputProcessor::create() errors out with an invalid DialogUXStateAggregator.

◆ TEST_F() [6/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_createWithoutExceptionSender   
)

Function to verify that AudioInputProcessor::create() errors out with an invalid ExceptionEncounteredSenderInterface.

◆ TEST_F() [7/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_createWithoutUserInactivityMonitor   
)

Function to verify that AudioInputProcessor::create() errors out with an invalid UserInactivityMonitorInterface.

◆ TEST_F() [8/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_createWithoutAudioProvider   
)

Function to verify that AudioInputProcessor::create() succeeds with a null AudioProvider.

◆ TEST_F() [9/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_createWithoutPowerResourceManager   
)

Function to verify that AudioInputProcessor::create() succeeds with a null PowerResourceManagerInterface.

◆ TEST_F() [10/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_createWithoutMetricRecorder   
)

Function to verify that AudioInputProcessor::create() succeeds with a null MetricRecorderInterface.

◆ TEST_F() [11/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_getConfiguration   
)

Function to verify that AudioInputProcessor::getconfiguration() returns the expected configuration data.

◆ TEST_F() [12/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_addRemoveObserver   
)

Function to verify that observers can be added/removed. Nothing is directly asserted here, but this test verifies that these functions work without crashing.

◆ TEST_F() [13/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_recognizeNullStream   
)

This function verifies that AudioInputProcessor::recognize() fails when given a null AudioProvider.

◆ TEST_F() [14/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_recognizeInvalidAudioFormat   
)

This function verifies that AudioInputProcessor::recognize() fails when given invalid AudioFormats.

◆ TEST_F() [15/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_recognizePressAndHold   
)

This function verifies that AudioInputProcessor::recognize() works with Initiator::PRESS_AND_HOLD.

◆ TEST_F() [16/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_recognizeTap   
)

This function verifies that AudioInputProcessor::recognize() works with Initiator::TAP.

◆ TEST_F() [17/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_recognizeWakewordWithoutKeyword   
)

This function verifies that AudioInputProcessor::recognize() fails with Initiator::WAKEWORD and no keyword.

◆ TEST_F() [18/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_recognizeWakewordWithBadBegin   
)

This function verifies that AudioInputProcessor::recognize() fails with Initiator::WAKEWORD and invalid begin index.

◆ TEST_F() [19/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_recognizeWakewordWithKeyword   
)

This function verifies that AudioInputProcessor::recognize() works with Initiator::WAKEWORD and keyword.

◆ TEST_F() [20/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_recognizeWakewordWithGoodBegin   
)

This function verifies that AudioInputProcessor::recognize() works with Initiator::WAKEWORD valid begin.

◆ TEST_F() [21/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_recognizeWakewordWithGoodBeginAndEnd   
)

This function verifies that AudioInputProcessor::recognize() works with Initiator::WAKEWORD valid begin and end indices.

◆ TEST_F() [22/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_recognizeCloseTalk   
)

This function verifies that AudioInputProcessor::recognize() works with ASRProfile::CLOSE_TALK.

◆ TEST_F() [23/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_recognizeNearField   
)

This function verifies that AudioInputProcessor::recognize() works with ASRProfile::NEAR_FIELD.

◆ TEST_F() [24/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_recognizeFarField   
)

This function verifies that AudioInputProcessor::recognize() works with ASRProfile::FAR_FIELD.

◆ TEST_F() [25/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_recognizeWhileExpectingSpeech   
)

This function verifies that AudioInputProcessor::recognize() works in State::EXPECTING_SPEECH.

◆ TEST_F() [26/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_recognizeStopAfterRecognize   
)

This function verifies that AudioInputProcessor::recognize() works with a call to stopCapture() immediately after the recognize() call.

◆ TEST_F() [27/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_recognizeStopAfterContext   
)

This function verifies that AudioInputProcessor::recognize() works with a call to stopCapture() immediately after the onContextAvailable() call.

◆ TEST_F() [28/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_recognizeStopAfterFocus   
)

This function verifies that AudioInputProcessor::recognize() works with a call to stopCapture() immediately after the onFocusChanged() call.

◆ TEST_F() [29/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_recognizeStopAfterSend   
)

This function verifies that AudioInputProcessor::recognize() works with a call to stopCapture() immediately after the message is sent.

◆ TEST_F() [30/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_recognizeBargeInWhileRecognizingCloseTalk   
)

This function verifies that AudioInputProcessor::recognize() works in State::RECOGNIZING when the previous recognize used the CLOSE_TALK profile.

◆ TEST_F() [31/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_recognizeBargeInWhileRecognizingNearField   
)

This function verifies that AudioInputProcessor::recognize() works in State::RECOGNIZING when the previous recognize used the NEAR_FIELD profile.

◆ TEST_F() [32/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_recognizeBargeInWhileRecognizingFarField   
)

This function verifies that AudioInputProcessor::recognize() works in State::RECOGNIZING when the previous recognize used the FAR_FIELD profile.

◆ TEST_F() [33/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_recognizeBargeInWhileRecognizingCantOverride   
)

This function verifies that AudioInputProcessor::recognize() fails in State::RECOGNIZING when the second AudioProvider can't override.

◆ TEST_F() [34/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_recognizeBargeInWhileRecognizingCantBeOverridden   
)

This function verifies that AudioInputProcessor::recognize() fails in State::RECOGNIZING when the first AudioProvider can't be overridden.

◆ TEST_F() [35/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureWhenIdle   
)

This function verifies that AudioInputProcessor::stopCapture() fails in State::IDLE.

◆ TEST_F() [36/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureWhenExpectingSpeech   
)

This function verifies that AudioInputProcessor::stopCapture() fails in State::EXPECTING_SPEECH.

◆ TEST_F() [37/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureWhenRecognizing   
)

This function verifies that AudioInputProcessor::stopCapture() works in State::RECOGNIZING.

◆ TEST_F() [38/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureWhenRecognizingFollowByStopCaptureDirective   
)

◆ TEST_F() [39/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_resetStateWhenIdle   
)

This function verifies that AudioInputProcessor::resetState() works in State::IDLE.

◆ TEST_F() [40/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_resetStateWhenExpectingSpeech   
)

This function verifies that AudioInputProcessor::resetState() works in State::EXPECTING_SPEECH.

◆ TEST_F() [41/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_resetStateWhenRecognizing   
)

This function verifies that AudioInputProcessor::resetState() works in State::RECOGNIZING.

◆ TEST_F() [42/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_contextFailureStateProviderTimedout   
)

This function verifies that AudioInputProcessor responds correctly to ContextRequestError::STATE_PROVIDER_TIMEDOUT.

◆ TEST_F() [43/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_contextFailureBuildContextError   
)

This function verifies that AudioInputProcessor responds correctly to ContextRequestError::BUILD_CONTEXT_ERROR.

◆ TEST_F() [44/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_preHandleAndHandleDirectiveStopCaptureWhenIdle   
)

This function verifies that StopCapture directives fail in State::IDLE.

◆ TEST_F() [45/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_preHandleAndHandleDirectiveStopCaptureWhenRecognizing   
)

This function verifies that StopCapture directives with dialog request ID work in State::RECOGNIZING.

◆ TEST_F() [46/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_preHandleAndHandleDirectiveStopCaptureWhenExpectingSpeech   
)

This function verifies that StopCapture directives fail in State::EXPECTING_SPEECH.

◆ TEST_F() [47/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_handleDirectiveImmediatelyStopCaptureWhenRecognizing   
)

This function verifies that StopCapture directives without dialog request ID work in State::RECOGNIZING.

◆ TEST_F() [48/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_preHandleAndHandleDirectiveExpectSpeechWhenIdle   
)

This function verifies that ExpectSpeech directives with dialog request ID work in State::IDLE.

◆ TEST_F() [49/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_handleDirectiveImmediatelyExpectSpeechWhenIdle   
)

This function verifies that ExpectSpeech directives without dialog request ID work in State::IDLE.

◆ TEST_F() [50/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_preHandleAndHandleDirectiveExpectSpeechWhenRecognizing   
)

This function verifies that ExpectSpeech directives fail in State::RECOGNIZING.

◆ TEST_F() [51/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_preHandleAndHandleDirectiveExpectSpeechWhenExpectingSpeech   
)

This function verifies that ExpectSpeech directives fail in State::EXPECTING_SPEECH.

◆ TEST_F() [52/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_expectSpeechNoDefaultNoPrevious   
)

This function verifies that ExpectSpeech directives wait with no default and no previous AudioProvider.

◆ TEST_F() [53/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_expectSpeechUnreadableDefaultNoPrevious   
)

This function verifies that ExpectSpeech directives wait with unreadable default and no previous AudioProvider.

◆ TEST_F() [54/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_expectSpeechUnreadableDefaultUnreadablePrevious   
)

This function verifies that ExpectSpeech directives wait with unreadable default and unreadable previous AudioProvider.

◆ TEST_F() [55/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_expectSpeechNoDefaultReadablePrevious   
)

This function verifies that ExpectSpeech directives work with no default and readable previous AudioProvider.

◆ TEST_F() [56/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_expectSpeechWithInitiator   
)

This function verifies that the initiator from an ExpectSpeech is passed to a subsequent Recognize.

◆ TEST_F() [57/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_expectSpeechWithNoInitiator   
)

This function verifies that if the ExpectSpeech does not have an initiator, no initiator is present in the subsequent Recognize.

◆ TEST_F() [58/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_expectSpeechWithInitiatorTimedOut   
)

This function verifies that if the ExpectSpeech times out, the next user initiated Recognize will send the standard initiator and not the one passed from AVS.

◆ TEST_F() [59/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_focusChangedBackground   
)

This function verifies that a focus change to FocusState::BACKGROUND causes the AudioInputProcessor to release the channel and go back to State::IDLE.

◆ TEST_F() [60/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_focusChangedNone   
)

This function verifies that a focus change to FocusState::NONE causes the AudioInputProcessor to release the channel and go back to State::IDLE.

◆ TEST_F() [61/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_resetStateOnTimeOut   
)

Test that the AudioInputProcessor correctly transitions to State::IDLE if Status::TIMEDOUT is received

◆ TEST_F() [62/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_recognizeWakewordWithESPWithKeyword   
)

◆ TEST_F() [63/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_recognizeWakewordWithInvalidESPWithKeyword   
)

◆ TEST_F() [64/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_recognizeOPUSWithTap   
)

◆ TEST_F() [65/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_recognizeOPUSWithPressAndHold   
)

◆ TEST_F() [66/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_recognizeOPUSWithWakeWord   
)

This function verifies that AudioInputProcessor::recognize() works with OPUS encoding used with Initiator::WAKEWORD valid begin and end indices.

◆ TEST_F() [67/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_recognizeWakewordWithKWDMetadata   
)

This function verifies that AudioInputProcessor::recognize() creates a MessageRequest with KWDMetadata When metadata has been received

◆ TEST_F() [68/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_recognizeInvalidWakeWord   
)

This function verifies that AudioInputProcessor::recognize() does not generate an event for invalid keyword detections (ex. "STOP")

◆ TEST_F() [69/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnStreamSuccess   
)

This function verifies that AudioInputProcessor state will stop listening when the recognize event stream has been successfully sent.

◆ TEST_F() [70/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnStreamSuccessNoContent   
)

This function verifies that AudioInputProcessor state will stop listening when the recognize event stream has been successfully sent but received no HTTP/2 content.

◆ TEST_F() [71/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnStreamSuccessNotConnected   
)

This function verifies that AudioInputProcessor state will stop listening when the recognize event stream has not been sent due to connection to AVS has been severed.

◆ TEST_F() [72/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnStreamNotSynchronized   
)

This function verifies that AudioInputProcessor state will stop listening when the recognize event stream has not been sent due to AVS is not synchronized.

◆ TEST_F() [73/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnStreamInternalrror   
)

This function verifies that AudioInputProcessor state will stop listening when the recognize event stream has not been sent due to an internal error within ACL.

◆ TEST_F() [74/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnStreamProtocolError   
)

This function verifies that AudioInputProcessor state will stop listening when the recognize event stream has not been sent due to an underlying protocol error.

◆ TEST_F() [75/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnStreamServerInternalError   
)

This function verifies that AudioInputProcessor state will stop listening when the recognize event stream has not been sent due to an internal error on the server which sends code 500.

◆ TEST_F() [76/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnStreamRefused   
)

This function verifies that AudioInputProcessor state will stop listening when the recognize event stream has not been sent due to server refusing the request.

◆ TEST_F() [77/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnStreamCanceled   
)

This function verifies that AudioInputProcessor state will stop listening when the recognize event stream has not been sent due to server canceling it before the transmission completed.

◆ TEST_F() [78/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnStreamThrottled   
)

This function verifies that AudioInputProcessor state will stop listening when the recognize event stream has not been sent due to excessive load on the server.

◆ TEST_F() [79/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnStreamInvalidAuth   
)

This function verifies that AudioInputProcessor state will stop listening when the recognize event stream has not been sent due to the access credentials provided to ACL were invalid.

◆ TEST_F() [80/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnStreamBadRequest   
)

This function verifies that AudioInputProcessor state will stop listening when the recognize event stream has not been sent due to invalid request sent by the user.

◆ TEST_F() [81/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnStreamUnknownServerError   
)

This function verifies that AudioInputProcessor state will stop listening when the recognize event stream has not been sent due to unknown server error.

◆ TEST_F() [82/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnDirectiveAndStreamSuccess   
)

This function verifies that AudioInputProcessor state is correct after receiving a stop capture directive and the recognize event stream has been successfully sent.

◆ TEST_F() [83/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnDirectiveAndStreamSuccessNoContent   
)

This function verifies that AudioInputProcessor state is correct after receiving a stop capture directive and the recognize event stream has been successfully sent but received no HTTP/2 content.

◆ TEST_F() [84/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnDirectiveAndStreamSuccessNotConnected   
)

This function verifies that AudioInputProcessor state is correct after receiving a stop capture directive and the recognize event stream has not been sent due to connection to AVS has been severed.

◆ TEST_F() [85/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnDirectiveAndStreamNotSynchronized   
)

This function verifies that AudioInputProcessor state is correct after receiving a stop capture directive and the recognize event stream has not been sent due to AVS is not synchronized.

◆ TEST_F() [86/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnDirectiveAndStreamInternalrror   
)

This function verifies that AudioInputProcessor state is correct after receiving a stop capture directive and the recognize event stream has not been sent due to an internal error within ACL.

◆ TEST_F() [87/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnDirectiveAndStreamProtocolError   
)

This function verifies that AudioInputProcessor state is correct after receiving a stop capture directive and the recognize event stream has not been sent due to an underlying protocol error.

◆ TEST_F() [88/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnDirectiveAndStreamServerInternalError   
)

This function verifies that AudioInputProcessor state is correct after receiving a stop capture directive and the recognize event stream has not been sent due to an internal error on the server which sends code 500.

◆ TEST_F() [89/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnDirectiveAndStreamRefused   
)

This function verifies that AudioInputProcessor state is correct after receiving a stop capture directive and the recognize event stream has not been sent due to server refusing the request.

◆ TEST_F() [90/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnDirectiveAndStreamCanceled   
)

This function verifies that AudioInputProcessor state is correct after receiving a stop capture directive and the recognize event stream has not been sent due to server canceling it before the transmission completed.

◆ TEST_F() [91/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnDirectiveAndStreamThrottled   
)

This function verifies that AudioInputProcessor state is correct after receiving a stop capture directive and the recognize event stream has not been sent due to excessive load on the server.

◆ TEST_F() [92/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnDirectiveAndStreamInvalidAuth   
)

This function verifies that AudioInputProcessor state is correct after receiving a stop capture directive and the recognize event stream has not been sent due to the access credentials provided to ACL were invalid.

◆ TEST_F() [93/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnDirectiveAndStreamBadRequest   
)

This function verifies that AudioInputProcessor state is correct after receiving a stop capture directive and the recognize event stream has not been sent due to invalid request sent by the user.

◆ TEST_F() [94/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnDirectiveAndStreamUnknownServerError   
)

This function verifies that AudioInputProcessor state is correct after receiving a stop capture directive and the recognize event stream has not been sent due to unknown server error.

◆ TEST_F() [95/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnStreamSuccessAndDirective   
)

This function verifies that AudioInputProcessor state is correct after the recognize event stream has been successfully sent and a stop capture directive is received.

◆ TEST_F() [96/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnStreamSuccessNoContentAndDirective   
)

This function verifies that AudioInputProcessor state is correct after the recognize event stream has been successfully sent but received no HTTP/2 content and a stop capture directive is received.

◆ TEST_F() [97/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnStreamSuccessNotConnectedAndDirective   
)

This function verifies that AudioInputProcessor state is correct after the recognize event stream has not been sent due to connection to AVS has been severed and a stop capture directive is received.

◆ TEST_F() [98/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnStreamNotSynchronizedAndDirective   
)

This function verifies that AudioInputProcessor state is correct after the recognize event stream has not been sent due to AVS is not synchronized and a stop capture directive is received.

◆ TEST_F() [99/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnStreamInternalrrorAndDirective   
)

This function verifies that AudioInputProcessor state is correct after the recognize event stream has not been sent due to an internal error within ACL and a stop capture directive is received.

◆ TEST_F() [100/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnStreamProtocolErrorAndDirective   
)

This function verifies that AudioInputProcessor state is correct after the recognize event stream has not been sent due to an underlying protocol error and a stop capture directive is received.

◆ TEST_F() [101/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnStreamServerInternalErrorAndDirective   
)

This function verifies that AudioInputProcessor state is correct after the recognize event stream has not been sent due to an internal error on the server which sends code 500 and a stop capture directive is received.

◆ TEST_F() [102/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnStreamRefusedAndDirective   
)

This function verifies that AudioInputProcessor state is correct after the recognize event stream has not been sent due to server refusing the request and a stop capture directive is received.

◆ TEST_F() [103/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnStreamCanceledAndDirective   
)

This function verifies that AudioInputProcessor state is correct after the recognize event stream has not been sent due to server canceling it before the transmission completed and a stop capture directive is received.

◆ TEST_F() [104/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnStreamThrottledAndDirective   
)

This function verifies that AudioInputProcessor state is correct after the recognize event stream has not been sent due to excessive load on the server and a stop capture directive is received.

◆ TEST_F() [105/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnStreamInvalidAuthAndDirective   
)

This function verifies that AudioInputProcessor state is correct after the recognize event stream has not been sent due to the access credentials provided to ACL were invalid and a stop capture directive is received.

◆ TEST_F() [106/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnStreamBadRequestAndDirective   
)

This function verifies that AudioInputProcessor state is correct after the recognize event stream has not been sent due to invalid request sent by the user and a stop capture directive is received.

◆ TEST_F() [107/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_stopCaptureOnStreamUnknownServerErrorAndDirective   
)

This function verifies that AudioInputProcessor state is correct after the recognize event stream has not been sent due to unknown server error and a stop capture directive is received.

◆ TEST_F() [108/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_handleSetEndOfSpeechOffsetSuccess   
)

◆ TEST_F() [109/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_handleSetEndOfSpeechOffsetFailureInvalid   
)

This function verifies that the SET_END_OF_SPEECH_OFFSET directive gracefully handles invalid offset values

◆ TEST_F() [110/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_handleSetEndOfSpeechOffsetFailureMissing   
)

This function verifies that the SET_END_OF_SPEECH_OFFSET directive gracefully handles missing offset values

◆ TEST_F() [111/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_handleSetWakeWordConfirmation   
)

This function verifies that the SetWakeWordConfirmation directive can be handled successfully.

◆ TEST_F() [112/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_setSpeechConfirmation   
)

This function verifies that the SetSpeechConfirmation directive can be handled successfully.

◆ TEST_F() [113/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_setWakeWordsDirectiveSuccess   
)

Test if SetWakeWords directive is handled correctly.

◆ TEST_F() [114/114]

alexaClientSDK::capabilityAgents::aip::test::TEST_F ( AudioInputProcessorTest  ,
test_publishedCapabiltiesContainsSupportedWakeWords   
)

◆ TEST_TIMEOUT()

static const std::chrono::seconds alexaClientSDK::capabilityAgents::aip::test::TEST_TIMEOUT ( 10  )
static

General timeout for tests to fail.

Variable Documentation

◆ ALWAYS_READABLE

const bool alexaClientSDK::capabilityAgents::aip::test::ALWAYS_READABLE = true
static

Boolean value to indicate an AudioProvider is always readable.

◆ ASR_PROFILE_KEY

const std::string alexaClientSDK::capabilityAgents::aip::test::ASR_PROFILE_KEY = "profile"
static

JSON key for the ASR profile field of a recognize event.

◆ AUDIO_ATTACHMENT_FIELD_NAME

const std::string alexaClientSDK::capabilityAgents::aip::test::AUDIO_ATTACHMENT_FIELD_NAME = "audio"
static

The field name for the user voice attachment.

◆ AUDIO_FORMAT_KEY

const std::string alexaClientSDK::capabilityAgents::aip::test::AUDIO_FORMAT_KEY = "format"
static

JSON key for the audio format field of a recognize event.

◆ AUDIO_FORMAT_VALUES

const std::unordered_set<std::string> alexaClientSDK::capabilityAgents::aip::test::AUDIO_FORMAT_VALUES = {"AUDIO_L16_RATE_16000_CHANNELS_1", "OPUS"}
static

Accepted JSON values for a recognize event's audio format.

◆ CAN_BE_OVERRIDDEN

const bool alexaClientSDK::capabilityAgents::aip::test::CAN_BE_OVERRIDDEN = true
static

Boolean value to indicate an AudioProvider can be overridden by another AudioProvider.

◆ CAN_OVERRIDE

const bool alexaClientSDK::capabilityAgents::aip::test::CAN_OVERRIDE = true
static

Boolean value to indicate an AudioProvider can override another AudioProvider.

◆ CAPABILITY_INTERFACE_CONFIGURATIONS_KEY

const std::string alexaClientSDK::capabilityAgents::aip::test::CAPABILITY_INTERFACE_CONFIGURATIONS_KEY = "configurations"
static

Capability configuration key used to give more details about the device configuration.

◆ CHANNEL_NAME

const std::string alexaClientSDK::capabilityAgents::aip::test::CHANNEL_NAME = avsCommon::sdkInterfaces::FocusManagerInterface::DIALOG_CHANNEL_NAME
static

The name of the FocusManager channel used by AudioInputProvider.

◆ CONTEXT_REQUEST_TOKEN

const ContextRequestToken alexaClientSDK::capabilityAgents::aip::test::CONTEXT_REQUEST_TOKEN {1}
static

◆ DEFAULT_LOCALE

const std::string alexaClientSDK::capabilityAgents::aip::test::DEFAULT_LOCALE = "en-CA"
static

Default locale.

◆ DIRECTIVES

const avsCommon::avs::NamespaceAndName alexaClientSDK::capabilityAgents::aip::test::DIRECTIVES[]
static
Initial value:
static const avsCommon::avs::NamespaceAndName SET_WAKE_WORDS
The SetWakeWords directive signature.
Definition: AudioInputProcessorTest.cpp:97
static const avsCommon::avs::NamespaceAndName SET_WAKE_WORD_CONFIRMATION
The SetWakeWordConfirmation directive signature.
Definition: AudioInputProcessorTest.cpp:91
static const avsCommon::avs::NamespaceAndName SET_SPEECH_CONFIRMATION
The SetSpeechConfirmation directive signature.
Definition: AudioInputProcessorTest.cpp:94
static const avsCommon::avs::NamespaceAndName SET_END_OF_SPEECH_OFFSET
The SetEndOfSpeechOffset directive signature.
Definition: AudioInputProcessorTest.cpp:88
static const avsCommon::avs::NamespaceAndName STOP_CAPTURE
The StopCapture directive signature.
Definition: AudioInputProcessorTest.cpp:82
static const avsCommon::avs::NamespaceAndName EXPECT_SPEECH
The ExpectSpeech directive signature.
Definition: AudioInputProcessorTest.cpp:85

The directives AudioInputProcessor should handle.

◆ END_INDEX_KEY

const std::string alexaClientSDK::capabilityAgents::aip::test::END_INDEX_KEY = "endIndexInSamples"
static

JSON key for the end index field of a wakeword recognize event's payload.

◆ END_OF_SPEECH_OFFSET_FIELD_NAME

const std::string alexaClientSDK::capabilityAgents::aip::test::END_OF_SPEECH_OFFSET_FIELD_NAME = "endOfSpeechOffsetInMilliseconds"
static

The field name for the end of speech offset, reported in milliseconds. This field comes in the payload of the SetEndOfSpeechOffset directive.

◆ END_OF_SPEECH_OFFSET_IN_MILLISECONDS

const int64_t alexaClientSDK::capabilityAgents::aip::test::END_OF_SPEECH_OFFSET_IN_MILLISECONDS = 1526
static

Value used in the tests for an end of speech offset.

◆ ESP_AMBIENT_ENERGY_KEY

const std::string alexaClientSDK::capabilityAgents::aip::test::ESP_AMBIENT_ENERGY_KEY = "ambientEnergy"
static

JSON key for the ambient energy field of a ReportEchoSpatialPerceptionData event.

◆ ESP_EVENT_NAME

const std::string alexaClientSDK::capabilityAgents::aip::test::ESP_EVENT_NAME = "ReportEchoSpatialPerceptionData"
static

JSON value for a ReportEchoSpatialPerceptionData event's name.

◆ ESP_VOICE_ENERGY_KEY

const std::string alexaClientSDK::capabilityAgents::aip::test::ESP_VOICE_ENERGY_KEY = "voiceEnergy"
static

JSON key for the voice energy field of a ReportEchoSpatialPerceptionData event.

◆ EXPECT_SPEECH

const avsCommon::avs::NamespaceAndName alexaClientSDK::capabilityAgents::aip::test::EXPECT_SPEECH {NAMESPACE, "ExpectSpeech"}
static

The ExpectSpeech directive signature.

◆ EXPECT_SPEECH_INITIATOR

const std::string alexaClientSDK::capabilityAgents::aip::test::EXPECT_SPEECH_INITIATOR = R"({"opaque":"expectSpeechInitiator"})"
static

Value used in the tests for an expect speech initiator.

◆ EXPECT_SPEECH_INITIATOR_KEY

const std::string alexaClientSDK::capabilityAgents::aip::test::EXPECT_SPEECH_INITIATOR_KEY = "initiator"
static

JSON key for the initiator field of an expect speech directive.

◆ EXPECT_SPEECH_TIMED_OUT_EVENT_NAME

const std::string alexaClientSDK::capabilityAgents::aip::test::EXPECT_SPEECH_TIMED_OUT_EVENT_NAME = "ExpectSpeechTimedOut"
static

JSON value for a expect speech timed out event's name.

◆ EXPECT_SPEECH_TIMEOUT_IN_MILLISECONDS

const int64_t alexaClientSDK::capabilityAgents::aip::test::EXPECT_SPEECH_TIMEOUT_IN_MILLISECONDS = 100
static

Value used in the tests for an expect speech timeout.

◆ EXPECT_SPEECH_TIMEOUT_KEY

const std::string alexaClientSDK::capabilityAgents::aip::test::EXPECT_SPEECH_TIMEOUT_KEY = "timeoutInMilliseconds"
static

JSON key for the timeout field of an expect speech directive.

◆ INITIATOR_PAYLOAD_KEY

const std::string alexaClientSDK::capabilityAgents::aip::test::INITIATOR_PAYLOAD_KEY = "payload"
static

JSON key for the type field of a recognize event's payload.

◆ INITIATOR_TYPE_KEY

const std::string alexaClientSDK::capabilityAgents::aip::test::INITIATOR_TYPE_KEY = "type"
static

JSON key for the type field of a recognize event's initiator.

◆ KEYWORD_TEXT

const std::string alexaClientSDK::capabilityAgents::aip::test::KEYWORD_TEXT = "ALEXA"
static

Value used in the tests for a wakeword recognize event.

◆ KWD_METADATA_EXAMPLE

const std::string alexaClientSDK::capabilityAgents::aip::test::KWD_METADATA_EXAMPLE = "Wakeword engine metadata example"
static

Sample Wakeword engine metadata to compare with the @ AttachmentReader.

◆ KWD_METADATA_FIELD_NAME

const std::string alexaClientSDK::capabilityAgents::aip::test::KWD_METADATA_FIELD_NAME = "wakewordEngineMetadata"
static

The field name for the wake word engine metadata.

◆ MESSAGE_ATTACHMENT_KWD_METADATA_INDEX

const size_t alexaClientSDK::capabilityAgents::aip::test::MESSAGE_ATTACHMENT_KWD_METADATA_INDEX = 0
static

The index of the Wakeword engine metadata in the MessageRequest.

◆ MESSAGE_CONTEXT_KEY

const std::string alexaClientSDK::capabilityAgents::aip::test::MESSAGE_CONTEXT_KEY = "context"
static

JSON key for the context section of a message.

◆ MESSAGE_DIALOG_REQUEST_ID_KEY

const std::string alexaClientSDK::capabilityAgents::aip::test::MESSAGE_DIALOG_REQUEST_ID_KEY = "dialogRequestId"
static

JSON key for the dialog request ID field of a message header.

◆ MESSAGE_DIRECTIVE_KEY

const std::string alexaClientSDK::capabilityAgents::aip::test::MESSAGE_DIRECTIVE_KEY = "directive"
static

JSON key for the directive section of a message.

◆ MESSAGE_EVENT_KEY

const std::string alexaClientSDK::capabilityAgents::aip::test::MESSAGE_EVENT_KEY = "event"
static

JSON key for the event section of a message.

◆ MESSAGE_HEADER_KEY

const std::string alexaClientSDK::capabilityAgents::aip::test::MESSAGE_HEADER_KEY = "header"
static

JSON key for the header section of a message.

◆ MESSAGE_MESSAGE_ID_KEY

const std::string alexaClientSDK::capabilityAgents::aip::test::MESSAGE_MESSAGE_ID_KEY = "messageId"
static

JSON key for the message ID field of a message header.

◆ MESSAGE_NAME_KEY

const std::string alexaClientSDK::capabilityAgents::aip::test::MESSAGE_NAME_KEY = "name"
static

JSON key for the name field of a message header.

◆ MESSAGE_NAMESPACE_KEY

const std::string alexaClientSDK::capabilityAgents::aip::test::MESSAGE_NAMESPACE_KEY = "namespace"
static

JSON key for the namespace field of a message header.

◆ MESSAGE_PAYLOAD_KEY

const std::string alexaClientSDK::capabilityAgents::aip::test::MESSAGE_PAYLOAD_KEY = "payload"
static

JSON key for the payload section of an message.

◆ NAMESPACE

const std::string alexaClientSDK::capabilityAgents::aip::test::NAMESPACE = "SpeechRecognizer"
static

The namespace for this capability agent.

◆ NUM_CHANNELS

const unsigned int alexaClientSDK::capabilityAgents::aip::test::NUM_CHANNELS = 1
static

Number of channels in audio input stream.

◆ PATTERN_WORDS

const size_t alexaClientSDK::capabilityAgents::aip::test::PATTERN_WORDS = SDS_WORDS / 2
static

Number of test pattern words to write to the SDS circular buffer.

◆ PREROLL_MS

const std::chrono::milliseconds alexaClientSDK::capabilityAgents::aip::test::PREROLL_MS = std::chrono::milliseconds(500)
static

Number of milliseconds of preroll applied for cloud-based wakeword verification.

◆ PREROLL_WORDS

const size_t alexaClientSDK::capabilityAgents::aip::test::PREROLL_WORDS = (SAMPLE_RATE_HZ / 1000) * PREROLL_MS.count()
static

Number of words of preroll.

◆ RECOGNIZE_EVENT_NAME

const std::string alexaClientSDK::capabilityAgents::aip::test::RECOGNIZE_EVENT_NAME = "Recognize"
static

JSON value for a recognize event's name.

◆ RECOGNIZE_INITIATOR_KEY

const std::string alexaClientSDK::capabilityAgents::aip::test::RECOGNIZE_INITIATOR_KEY = "initiator"
static

JSON key for the initiator field of a recognize event.

◆ RECOGNIZER_STATE

const avsCommon::avs::NamespaceAndName alexaClientSDK::capabilityAgents::aip::test::RECOGNIZER_STATE {NAMESPACE, "RecognizerState"}
static

The SpeechRecognizer context state signature.

◆ SAMPLE_RATE_HZ

const unsigned int alexaClientSDK::capabilityAgents::aip::test::SAMPLE_RATE_HZ = 16000
static

Sample rate for audio input stream.

◆ SAMPLE_SIZE_IN_BITS

const unsigned int alexaClientSDK::capabilityAgents::aip::test::SAMPLE_SIZE_IN_BITS = SDS_WORDSIZE * CHAR_BIT
static

Sample size for audio input stream.

◆ SDS_MAXREADERS

const size_t alexaClientSDK::capabilityAgents::aip::test::SDS_MAXREADERS = 3
static

Maximum number of readers to support in the SDS circular buffer.

◆ SDS_WORDS

const size_t alexaClientSDK::capabilityAgents::aip::test::SDS_WORDS = PREROLL_WORDS + WAKEWORD_WORDS + 1000
static

Number of words to hold in the SDS circular buffer.

◆ SDS_WORDSIZE

const size_t alexaClientSDK::capabilityAgents::aip::test::SDS_WORDSIZE = sizeof(Sample)
static

Number of bytes per word in the SDS circular buffer.

◆ SET_END_OF_SPEECH_OFFSET

const avsCommon::avs::NamespaceAndName alexaClientSDK::capabilityAgents::aip::test::SET_END_OF_SPEECH_OFFSET {NAMESPACE, "SetEndOfSpeechOffset"}
static

The SetEndOfSpeechOffset directive signature.

◆ SET_SPEECH_CONFIRMATION

const avsCommon::avs::NamespaceAndName alexaClientSDK::capabilityAgents::aip::test::SET_SPEECH_CONFIRMATION {NAMESPACE, "SetSpeechConfirmation"}
static

The SetSpeechConfirmation directive signature.

◆ SET_WAKE_WORD_CONFIRMATION

const avsCommon::avs::NamespaceAndName alexaClientSDK::capabilityAgents::aip::test::SET_WAKE_WORD_CONFIRMATION {NAMESPACE, "SetWakeWordConfirmation"}
static

The SetWakeWordConfirmation directive signature.

◆ SET_WAKE_WORDS

const avsCommon::avs::NamespaceAndName alexaClientSDK::capabilityAgents::aip::test::SET_WAKE_WORDS {NAMESPACE, "SetWakeWords"}
static

The SetWakeWords directive signature.

◆ SPEECH_CONFIRMATION_PAYLOAD_KEY

const std::string alexaClientSDK::capabilityAgents::aip::test::SPEECH_CONFIRMATION_PAYLOAD_KEY = "speechConfirmation"
static

The value of the payload key for speechConfirmation.

◆ START_INDEX_KEY

const std::string alexaClientSDK::capabilityAgents::aip::test::START_INDEX_KEY = "startIndexInSamples"
static

JSON key for the start index field of a wakeword recognize event's payload.

◆ START_OF_SPEECH_TIMESTAMP

const auto alexaClientSDK::capabilityAgents::aip::test::START_OF_SPEECH_TIMESTAMP = std::chrono::steady_clock::now()
static

Value used in the tests for an start of speech timestamp.

◆ START_OF_SPEECH_TIMESTAMP_FIELD_NAME

const std::string alexaClientSDK::capabilityAgents::aip::test::START_OF_SPEECH_TIMESTAMP_FIELD_NAME = "startOfSpeechTimestamp"
static

The field name for the start of speech timestamp. It is sent during Recognize event and received as part of SetEndOfSpeechOffset directive.

◆ START_OF_SPEECH_TIMESTAMP_STR

const auto alexaClientSDK::capabilityAgents::aip::test::START_OF_SPEECH_TIMESTAMP_STR = std::to_string(START_OF_SPEECH_TIMESTAMP.time_since_epoch().count())
static

String value used for start of speech timestamp string representation.

◆ STOP_CAPTURE

const avsCommon::avs::NamespaceAndName alexaClientSDK::capabilityAgents::aip::test::STOP_CAPTURE {NAMESPACE, "StopCapture"}
static

The StopCapture directive signature.

◆ SUPPORTED_LOCALES

const std::set<std::string> alexaClientSDK::capabilityAgents::aip::test::SUPPORTED_LOCALES = {"en-CA", "en-US"}
static

A list of test supported locales.

◆ SUPPORTED_WAKE_WORDS

const std::set<std::string> alexaClientSDK::capabilityAgents::aip::test::SUPPORTED_WAKE_WORDS = {"ALEXA", "ECHO"}
static

A list of test supported wake words.

◆ VERIFY_TIMEOUT

const bool alexaClientSDK::capabilityAgents::aip::test::VERIFY_TIMEOUT = true
static

Boolean value to indicate an expect speech directive should time out.

◆ WAKE_WORD_CONFIRMATION_PAYLOAD_KEY

const std::string alexaClientSDK::capabilityAgents::aip::test::WAKE_WORD_CONFIRMATION_PAYLOAD_KEY = "wakeWordConfirmation"
static

The value of the payload key for wakeWordConfirmation.

◆ WAKE_WORD_INDICES_KEY

const std::string alexaClientSDK::capabilityAgents::aip::test::WAKE_WORD_INDICES_KEY = "wakeWordIndices"
static

JSON key for the wakeword indices field of a wakeword recognize event's payload.

◆ WAKEWORD_FIELD_NAME

const std::string alexaClientSDK::capabilityAgents::aip::test::WAKEWORD_FIELD_NAME = "wakeWord"
static

The field name for the wake word detected.

◆ WAKEWORD_WORDS

const size_t alexaClientSDK::capabilityAgents::aip::test::WAKEWORD_WORDS = PREROLL_WORDS
static

Number of words in wakeword.

◆ WAKEWORDS_PAYLOAD_KEY

const std::string alexaClientSDK::capabilityAgents::aip::test::WAKEWORDS_PAYLOAD_KEY = "wakeWords"
static

The value of the payload key for wake words.

◆ WITH_DIALOG_REQUEST_ID

const bool alexaClientSDK::capabilityAgents::aip::test::WITH_DIALOG_REQUEST_ID = true
static

Boolean value to indicate a directive being tested has a dialog request ID.

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