AlexaClientSDK
1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
Classes | |
class | SensoryKeywordTest |
class | testKeyWordObserver |
A test observer that mocks out the KeyWordObserverInterface#onKeyWordDetected() call. More... | |
class | testStateObserver |
A test observer that mocks out the KeyWordDetectorStateObserverInterface#onStateChanged() call. More... | |
Functions | |
TEST_F (SensoryKeywordTest, test_createDetectorDeprecated) | |
Test that we create a valid detector using deprecated Create method. More... | |
TEST_F (SensoryKeywordTest, test_invalidStream) | |
Tests that we don't get back a valid detector if an invalid stream is passed in. More... | |
TEST_F (SensoryKeywordTest, test_incompatibleEndianness) | |
Tests that we don't get back a valid detector if an invalid endianness is passed in. More... | |
TEST_F (SensoryKeywordTest, test_getExpectedNumberOfDetectionsInFourAlexasAudioFileForOneObserver) | |
Tests that we get back the expected number of keywords for the four_alexa.wav file for one keyword observer. More... | |
TEST_F (SensoryKeywordTest, test_getExpectedNumberOfDetectionsInFourAlexasAudioFileForTwoObservers) | |
Tests that we get back the expected number of keywords for the four_alexa.wav file for two keyword observers. More... | |
TEST_F (SensoryKeywordTest, test_getExpectedNumberOfDetectionsInAlexaStopAlexaJokeAudioFileForOneObserver) | |
TEST_F (SensoryKeywordTest, test_getActiveState) | |
Tests that the detector state changes to ACTIVE when the detector is initialized properly. More... | |
TEST_F (SensoryKeywordTest, test_getStreamClosedState) | |
TEST_F (SensoryKeywordTest, test_getExpectedNumberOfDetectionsInAlexaStopAlexaJokeAudioFileWithRandomDataAtBeginning) | |
Variables | |
std::string | inputsDirPath |
The path to the inputs folder that should be passed in via command line argument. More... | |
static const std::string | MODEL_FILE = "/SensoryModels/spot-alexa-rpi-31000.snsr" |
The name of the Alexa model file for Sensory. More... | |
static const std::string | KEYWORD = "alexa" |
The keyword that Sensory emits for the above model file. More... | |
static const std::string | FOUR_ALEXAS_AUDIO_FILE = "/four_alexa.wav" |
The name of a test audio file. More... | |
static const std::string | ALEXA_STOP_ALEXA_JOKE_AUDIO_FILE = "/alexa_stop_alexa_joke.wav" |
The name of a test audio file. More... | |
static const int | SAMPLES_PER_MS = 16 |
The number of samples per millisecond, assuming a sample rate of 16 kHz. More... | |
static const std::chrono::milliseconds | MARGIN = std::chrono::milliseconds(250) |
The margin in milliseconds for testing indices of keyword detections. More... | |
static const AudioInputStream::Index | MARGIN_IN_SAMPLES = MARGIN.count() * SAMPLES_PER_MS |
The margin in samples for testing indices of keyword detections. More... | |
static const size_t | NUM_ALEXAS_IN_FOUR_ALEXAS_AUDIO_FILE = 4 |
The number of "Alexa" keywords in the four_alexa.wav file. More... | |
std::vector< AudioInputStream::Index > | BEGIN_INDICES_OF_ALEXAS_IN_FOUR_ALEXAS_AUDIO_FILE = {7520, 39680, 58880, 77120} |
The approximate begin indices of the four "Alexa" keywords in the four_alexa.wav file. More... | |
std::vector< AudioInputStream::Index > | END_INDICES_OF_ALEXAS_IN_FOUR_ALEXAS_AUDIO_FILE = {21440, 52800, 72480, 91552} |
The approximate end indices of the four "Alexa" hotwords in the four_alexa.wav file. More... | |
static const size_t | NUM_ALEXAS_IN_ALEXA_STOP_ALEXA_JOKE_AUDIO_FILE = 2 |
The number of "Alexa" keywords in the alexa_stop_alexa_joke.wav file. More... | |
std::vector< AudioInputStream::Index > | BEGIN_INDICES_OF_ALEXAS_IN_ALEXA_STOP_ALEXA_JOKE_AUDIO_FILE = {8000, 38240} |
The approximate begin indices of the two "Alexa" keywords in the alexa_stop_alexa_joke.wav file. More... | |
std::vector< AudioInputStream::Index > | END_INDICES_OF_ALEXAS_IN_ALEXA_STOP_ALEXA_JOKE_AUDIO_FILE = {20960, 51312} |
The approximate end indices of the two "Alexa" keywords in the alexa_stop_alexa_joke.wav file. More... | |
static const avsCommon::utils::AudioFormat::Encoding | COMPATIBLE_ENCODING |
The compatible encoding for Sensory. More... | |
static const avsCommon::utils::AudioFormat::Endianness | COMPATIBLE_ENDIANNESS |
The compatible endianness for Sensory. More... | |
static const unsigned int | COMPATIBLE_SAMPLE_RATE = 16000 |
The compatible sample rate for Sensory. More... | |
static const unsigned int | COMPATIBLE_SAMPLE_SIZE_IN_BITS = 16 |
The compatible bits per sample for Sensory. More... | |
static const unsigned int | COMPATIBLE_NUM_CHANNELS = 1 |
The compatible number of channels for Sensory. More... | |
static const auto | DEFAULT_TIMEOUT = std::chrono::milliseconds(4000) |
Timeout for expected callbacks. More... | |
alexaClientSDK::kwd::test::TEST_F | ( | SensoryKeywordTest | , |
test_createDetectorDeprecated | |||
) |
Test that we create a valid detector using deprecated Create method.
alexaClientSDK::kwd::test::TEST_F | ( | SensoryKeywordTest | , |
test_getActiveState | |||
) |
Tests that the detector state changes to ACTIVE when the detector is initialized properly.
alexaClientSDK::kwd::test::TEST_F | ( | SensoryKeywordTest | , |
test_getExpectedNumberOfDetectionsInAlexaStopAlexaJokeAudioFileForOneObserver | |||
) |
Tests that we get back the expected number of keywords for the alexa_stop_alexa_joke.wav file for one keyword observer.
alexaClientSDK::kwd::test::TEST_F | ( | SensoryKeywordTest | , |
test_getExpectedNumberOfDetectionsInAlexaStopAlexaJokeAudioFileWithRandomDataAtBeginning | |||
) |
Tests that we get back the expected number of keywords for the alexa_stop_alexa_joke.wav file for one keyword observer even when SDS has other data prior to the audio file in it. This tests that the reference point that the Sensory wrapper uses is working as expected.
alexaClientSDK::kwd::test::TEST_F | ( | SensoryKeywordTest | , |
test_getExpectedNumberOfDetectionsInFourAlexasAudioFileForOneObserver | |||
) |
Tests that we get back the expected number of keywords for the four_alexa.wav file for one keyword observer.
alexaClientSDK::kwd::test::TEST_F | ( | SensoryKeywordTest | , |
test_getExpectedNumberOfDetectionsInFourAlexasAudioFileForTwoObservers | |||
) |
Tests that we get back the expected number of keywords for the four_alexa.wav file for two keyword observers.
alexaClientSDK::kwd::test::TEST_F | ( | SensoryKeywordTest | , |
test_getStreamClosedState | |||
) |
Tests that the stream is closed and that the detector state changes to STREAM_CLOSED when we close the only writer of the SDS passed in and all keyword detections have occurred.
alexaClientSDK::kwd::test::TEST_F | ( | SensoryKeywordTest | , |
test_incompatibleEndianness | |||
) |
Tests that we don't get back a valid detector if an invalid endianness is passed in.
alexaClientSDK::kwd::test::TEST_F | ( | SensoryKeywordTest | , |
test_invalidStream | |||
) |
Tests that we don't get back a valid detector if an invalid stream is passed in.
|
static |
The name of a test audio file.
std::vector<AudioInputStream::Index> alexaClientSDK::kwd::test::BEGIN_INDICES_OF_ALEXAS_IN_ALEXA_STOP_ALEXA_JOKE_AUDIO_FILE = {8000, 38240} |
The approximate begin indices of the two "Alexa" keywords in the alexa_stop_alexa_joke.wav file.
std::vector<AudioInputStream::Index> alexaClientSDK::kwd::test::BEGIN_INDICES_OF_ALEXAS_IN_FOUR_ALEXAS_AUDIO_FILE = {7520, 39680, 58880, 77120} |
The approximate begin indices of the four "Alexa" keywords in the four_alexa.wav file.
|
static |
The compatible encoding for Sensory.
|
static |
The compatible endianness for Sensory.
|
static |
The compatible number of channels for Sensory.
|
static |
The compatible sample rate for Sensory.
|
static |
The compatible bits per sample for Sensory.
|
static |
Timeout for expected callbacks.
std::vector<AudioInputStream::Index> alexaClientSDK::kwd::test::END_INDICES_OF_ALEXAS_IN_ALEXA_STOP_ALEXA_JOKE_AUDIO_FILE = {20960, 51312} |
The approximate end indices of the two "Alexa" keywords in the alexa_stop_alexa_joke.wav file.
std::vector<AudioInputStream::Index> alexaClientSDK::kwd::test::END_INDICES_OF_ALEXAS_IN_FOUR_ALEXAS_AUDIO_FILE = {21440, 52800, 72480, 91552} |
The approximate end indices of the four "Alexa" hotwords in the four_alexa.wav file.
|
static |
The name of a test audio file.
std::string alexaClientSDK::kwd::test::inputsDirPath |
The path to the inputs folder that should be passed in via command line argument.
|
static |
The keyword that Sensory emits for the above model file.
|
static |
The margin in milliseconds for testing indices of keyword detections.
|
static |
The margin in samples for testing indices of keyword detections.
|
static |
The name of the Alexa model file for Sensory.
|
static |
The number of "Alexa" keywords in the alexa_stop_alexa_joke.wav file.
|
static |
The number of "Alexa" keywords in the four_alexa.wav file.
|
static |
The number of samples per millisecond, assuming a sample rate of 16 kHz.
AlexaClientSDK 1.26.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0