![]() |
AlexaClientSDK
1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <chrono>#include <deque>#include <fstream>#include <iostream>#include <mutex>#include <string>#include <gtest/gtest.h>#include <ADSL/DirectiveSequencer.h>#include <ADSL/MessageInterpreter.h>#include <AFML/FocusManager.h>#include <AIP/AudioInputProcessor.h>#include <AIP/AudioProvider.h>#include <AIP/Initiator.h>#include <acsdkAudioPlayer/AudioPlayer.h>#include <Audio/SystemSoundAudioFactory.h>#include <AVSCommon/AVS/Attachment/InProcessAttachmentWriter.h>#include <AVSCommon/AVS/CapabilityChangeNotifier.h>#include <AVSCommon/Utils/JSON/JSONUtils.h>#include <AVSCommon/Utils/LibcurlUtils/HTTPContentFetcherFactory.h>#include <AVSCommon/SDKInterfaces/MockChannelVolumeInterface.h>#include <AVSCommon/SDKInterfaces/MockLocaleAssetsManager.h>#include <AVSCommon/Utils/Logger/LogEntry.h>#include <AVSCommon/Utils/Metrics/MockMetricRecorder.h>#include <Captions/CaptionManagerInterface.h>#include "Integration/TestMediaPlayer.h"#include <PlaybackController/PlaybackController.h>#include <PlaybackController/PlaybackRouter.h>#include <SpeechSynthesizer/SpeechSynthesizer.h>#include <System/UserInactivityMonitor.h>#include <Settings/MockSetting.h>#include <Settings/SpeechConfirmationSettingType.h>#include <Settings/WakeWordConfirmationSettingType.h>#include <SystemSoundPlayer/SystemSoundPlayer.h>#include <AVSCommon/Utils/MediaPlayer/PooledMediaResourceProvider.h>#include "Integration/ACLTestContext.h"#include "Integration/ObservableMessageRequest.h"#include "Integration/TestDirectiveHandler.h"#include "Integration/TestExceptionEncounteredSender.h"#include "Integration/TestMessageSender.h"#include "Integration/TestSpeechSynthesizerObserver.h"
Classes | |
| class | alexaClientSDK::integration::test::TestClient |
| A test observer that mocks out the ChannelObserverInterface#onFocusChanged() call. More... | |
| class | alexaClientSDK::integration::test::holdToTalkButton |
| class | alexaClientSDK::integration::test::AudioPlayerTest |
Namespaces | |
| alexaClientSDK | |
| Whether or not curl logs should be emitted. | |
| alexaClientSDK::integration | |
| alexaClientSDK::integration::test | |
Macros | |
| #define | LX(event) alexaClientSDK::avsCommon::utils::logger::LogEntry(TAG, event) |
Functions | |
| static const std::chrono::seconds | alexaClientSDK::integration::test::WAIT_FOR_TIMEOUT_DURATION (15) |
| static const std::chrono::seconds | alexaClientSDK::integration::test::NO_TIMEOUT_DURATION (0) |
| static const std::chrono::seconds | alexaClientSDK::integration::test::SONG_TIMEOUT_DURATION (120) |
| static const std::string | alexaClientSDK::integration::test::TAG ("AudioPlayerIntegrationTest") |
| String to identify log entries originating from this file. More... | |
| alexaClientSDK::integration::test::TEST_F (AudioPlayerTest, test_singASong) | |
| alexaClientSDK::integration::test::TEST_F (AudioPlayerTest, DISABLED_test_flashBriefing) | |
| int | main (int argc, char **argv) |
Variables | |
| static const std::string | alexaClientSDK::integration::test::RECOGNIZE_SING_FILE_NAME = "/recognize_sing_song_test.wav" |
| static const std::string | alexaClientSDK::integration::test::RECOGNIZE_FLASHBRIEFING_FILE_NAME = "/recognize_flashbriefing_test.wav" |
| static const std::string | alexaClientSDK::integration::test::NAME_PLAYBACK_STARTED = "PlaybackStarted" |
| static const std::string | alexaClientSDK::integration::test::NAME_PLAYBACK_NEARLY_FINISHED = "PlaybackNearlyFinished" |
| static const std::string | alexaClientSDK::integration::test::NAME_PLAYBACK_FINISHED = "PlaybackFinished" |
| static const std::string | alexaClientSDK::integration::test::NAME_PLAYBACK_STOPPED = "PlaybackStopped" |
| static const std::string | alexaClientSDK::integration::test::NAME_SYNC_STATE = "SynchronizeState" |
| static const std::string | alexaClientSDK::integration::test::NAME_RECOGNIZE = "Recognize" |
| static const std::string | alexaClientSDK::integration::test::NAME_SPEECH_STARTED = "SpeechStarted" |
| static const std::string | alexaClientSDK::integration::test::NAME_SPEECH_FINISHED = "SpeechFinished" |
| static const std::string | alexaClientSDK::integration::test::DIALOG_CHANNEL_NAME = "Dialog" |
| The dialog Channel name used in intializing the FocusManager. More... | |
| static const std::string | alexaClientSDK::integration::test::CONTENT_CHANNEL_NAME = "Content" |
| The content Channel name used in intializing the FocusManager. More... | |
| static const std::string | alexaClientSDK::integration::test::TEST_CHANNEL_NAME = "Test" |
| An incorrect Channel name that is never initialized as a Channel. More... | |
| static const unsigned int | alexaClientSDK::integration::test::DIALOG_CHANNEL_PRIORITY = 100 |
| The priority of the dialog Channel used in intializing the FocusManager. More... | |
| static const unsigned int | alexaClientSDK::integration::test::CONTENT_CHANNEL_PRIORITY = 300 |
| The priority of the content Channel used in intializing the FocusManager. More... | |
| static const unsigned int | alexaClientSDK::integration::test::TEST_CHANNEL_PRIORITY = 400 |
| The priority of the content Channel used in intializing the FocusManager. More... | |
| static const std::string | alexaClientSDK::integration::test::DIALOG_ACTIVITY_ID = "dialog" |
| Sample dialog activity id. More... | |
| static const std::string | alexaClientSDK::integration::test::CONTENT_ACTIVITY_ID = "content" |
| Sample content activity id. More... | |
| static const std::string | alexaClientSDK::integration::test::TEST_ACTIVITY_ID = "test" |
| Sample content activity id. More... | |
| static const avsCommon::utils::AudioFormat::Encoding | alexaClientSDK::integration::test::COMPATIBLE_ENCODING |
| The compatible encoding for AIP. More... | |
| static const avsCommon::utils::AudioFormat::Endianness | alexaClientSDK::integration::test::COMPATIBLE_ENDIANNESS |
| The compatible endianness for AIP. More... | |
| static const unsigned int | alexaClientSDK::integration::test::COMPATIBLE_SAMPLE_RATE = 16000 |
| The compatible sample rate for AIP. More... | |
| static const unsigned int | alexaClientSDK::integration::test::COMPATIBLE_SAMPLE_SIZE_IN_BITS = 16 |
| The compatible bits per sample. More... | |
| static const unsigned int | alexaClientSDK::integration::test::COMPATIBLE_NUM_CHANNELS = 1 |
| The compatible number of channels. More... | |
| static const std::string | alexaClientSDK::integration::test::JSON_MESSAGE_EVENT_KEY = "event" |
| JSON key to get the event object of a message. More... | |
| static const std::string | alexaClientSDK::integration::test::JSON_MESSAGE_DIRECTIVE_KEY = "directive" |
| JSON key to get the directive object of a message. More... | |
| static const std::string | alexaClientSDK::integration::test::JSON_MESSAGE_HEADER_KEY = "header" |
| JSON key to get the header object of a message. More... | |
| static const std::string | alexaClientSDK::integration::test::JSON_MESSAGE_NAMESPACE_KEY = "namespace" |
| JSON key to get the namespace value of a header. More... | |
| static const std::string | alexaClientSDK::integration::test::JSON_MESSAGE_NAME_KEY = "name" |
| JSON key to get the name value of a header. More... | |
| static const std::string | alexaClientSDK::integration::test::JSON_MESSAGE_MESSAGE_ID_KEY = "messageId" |
| JSON key to get the messageId value of a header. More... | |
| static const std::string | alexaClientSDK::integration::test::JSON_MESSAGE_DIALOG_REQUEST_ID_KEY = "dialogRequestId" |
| JSON key to get the dialogRequestId value of a header. More... | |
| static const std::string | alexaClientSDK::integration::test::JSON_MESSAGE_PAYLOAD_KEY = "payload" |
| JSON key to get the payload object of a message. More... | |
| static std::string | alexaClientSDK::integration::test::g_configPath |
| Path to the AlexaClientSDKConfig.json file (from command line arguments). More... | |
| static std::string | alexaClientSDK::integration::test::g_inputPath |
| Path to resources (e.g. audio files) for tests (from command line arguments). More... | |
| #define LX | ( | event | ) | alexaClientSDK::avsCommon::utils::logger::LogEntry(TAG, event) |
Create a LogEntry using this file's TAG and the specified event string.
| The | event string for this LogEntry. |
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
AlexaClientSDK 1.26.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0