AlexaClientSDK  1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Protected Member Functions | Protected Attributes | List of all members
alexaClientSDK::kwd::test::SensoryKeywordTest Class Reference
Inheritance diagram for alexaClientSDK::kwd::test::SensoryKeywordTest:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::kwd::test::SensoryKeywordTest:
Collaboration graph
[legend]

Protected Member Functions

bool readAudioFromFileIntoStream (const std::string &fileName)
 
bool isResultPresent (std::vector< testKeyWordObserver::detectionResult > &results, AudioInputStream::Index expectedBeginIndex, AudioInputStream::Index expectedEndIndex, const std::string &expectedKeyword)
 
virtual void SetUp ()
 

Protected Attributes

std::shared_ptr< acsdkKWDInterfaces::KeywordNotifierInterfacem_keywordNotifier
 
std::shared_ptr< acsdkKWDInterfaces::KeywordDetectorStateNotifierInterfacem_keywordDetectorStateNotifier
 
std::shared_ptr< testKeyWordObserverm_keyWordObserver1
 
std::shared_ptr< testKeyWordObserverm_keyWordObserver2
 
std::shared_ptr< testStateObserverm_stateObserver
 
std::shared_ptr< AudioFormatm_compatibleAudioFormat
 
std::shared_ptr< avsCommon::avs::AudioInputStream::Buffer > m_buffer
 
std::shared_ptr< avsCommon::avs::AudioInputStreamm_sds
 
std::unique_ptr< AudioInputStream::Writer > m_writer
 
std::unique_ptr< SensoryKeywordDetectorm_detector
 

Member Function Documentation

◆ isResultPresent()

bool alexaClientSDK::kwd::test::SensoryKeywordTest::isResultPresent ( std::vector< testKeyWordObserver::detectionResult > &  results,
AudioInputStream::Index  expectedBeginIndex,
AudioInputStream::Index  expectedEndIndex,
const std::string &  expectedKeyword 
)
inlineprotected

Checks to see that the expected keyword detection results are present.

Parameters
resultsA vector of detectionResult.
expectedBeginIndexThe expected begin index of the keyword.
expectedEndIndexThe expected end index of the keyword.
expectedKeywordThe expected keyword.
Returns
true if the result is present within the margin and false otherwise.

◆ readAudioFromFileIntoStream()

bool alexaClientSDK::kwd::test::SensoryKeywordTest::readAudioFromFileIntoStream ( const std::string &  fileName)
inlineprotected

Reads audio from a WAV file and write into audio input stream.

Parameters
fileNameThe path of the file to read from.
Returns
True if successfully read and written into stream.

◆ SetUp()

virtual void alexaClientSDK::kwd::test::SensoryKeywordTest::SetUp ( )
inlineprotectedvirtual

Member Data Documentation

◆ m_buffer

std::shared_ptr<avsCommon::avs::AudioInputStream::Buffer> alexaClientSDK::kwd::test::SensoryKeywordTest::m_buffer
protected

◆ m_compatibleAudioFormat

std::shared_ptr<AudioFormat> alexaClientSDK::kwd::test::SensoryKeywordTest::m_compatibleAudioFormat
protected

◆ m_detector

std::unique_ptr<SensoryKeywordDetector> alexaClientSDK::kwd::test::SensoryKeywordTest::m_detector
protected

◆ m_keywordDetectorStateNotifier

std::shared_ptr<acsdkKWDInterfaces::KeywordDetectorStateNotifierInterface> alexaClientSDK::kwd::test::SensoryKeywordTest::m_keywordDetectorStateNotifier
protected

◆ m_keywordNotifier

std::shared_ptr<acsdkKWDInterfaces::KeywordNotifierInterface> alexaClientSDK::kwd::test::SensoryKeywordTest::m_keywordNotifier
protected

◆ m_keyWordObserver1

std::shared_ptr<testKeyWordObserver> alexaClientSDK::kwd::test::SensoryKeywordTest::m_keyWordObserver1
protected

◆ m_keyWordObserver2

std::shared_ptr<testKeyWordObserver> alexaClientSDK::kwd::test::SensoryKeywordTest::m_keyWordObserver2
protected

◆ m_sds

std::shared_ptr<avsCommon::avs::AudioInputStream> alexaClientSDK::kwd::test::SensoryKeywordTest::m_sds
protected

◆ m_stateObserver

std::shared_ptr<testStateObserver> alexaClientSDK::kwd::test::SensoryKeywordTest::m_stateObserver
protected

◆ m_writer

std::unique_ptr<AudioInputStream::Writer> alexaClientSDK::kwd::test::SensoryKeywordTest::m_writer
protected

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

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