AlexaClientSDK  1.25.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

std::vector< int16_t > readAudioFromFile (const std::string &fileName, bool *errorOccurred)
 
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< testKeyWordObserverkeyWordObserver1
 
std::shared_ptr< testKeyWordObserverkeyWordObserver2
 
std::shared_ptr< testStateObserverstateObserver
 
AudioFormat compatibleAudioFormat
 
std::string modelFilePath
 

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.

◆ readAudioFromFile()

std::vector<int16_t> alexaClientSDK::kwd::test::SensoryKeywordTest::readAudioFromFile ( const std::string &  fileName,
bool *  errorOccurred 
)
inlineprotected

Reads audio from a WAV file.

Parameters
fileNameThe path of the file to read from.
[out]errorOccurredLets users know if any errors occurred while parsing the file.
Returns
A vector of int16_t containing the raw audio data of the WAV file without the RIFF header.

◆ SetUp()

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

Member Data Documentation

◆ compatibleAudioFormat

AudioFormat alexaClientSDK::kwd::test::SensoryKeywordTest::compatibleAudioFormat
protected

◆ keyWordObserver1

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

◆ keyWordObserver2

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

◆ modelFilePath

std::string alexaClientSDK::kwd::test::SensoryKeywordTest::modelFilePath
protected

◆ stateObserver

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

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

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