![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <KeywordDetectorProvider.h>
Classes | |
class | KWDRegistration |
Public Types | |
using | KWDCreateMethod = std::unique_ptr< acsdkKWDImplementations::AbstractKeywordDetector >(*)(std::shared_ptr< avsCommon::avs::AudioInputStream > stream, avsCommon::utils::AudioFormat audioFormat, std::unordered_set< std::shared_ptr< avsCommon::sdkInterfaces::KeyWordObserverInterface > > keyWordObservers, std::unordered_set< std::shared_ptr< avsCommon::sdkInterfaces::KeyWordDetectorStateObserverInterface > > keyWordDetectorStateObservers) |
Static Public Member Functions | |
static std::unique_ptr< acsdkKWDImplementations::AbstractKeywordDetector > | create (std::shared_ptr< avsCommon::avs::AudioInputStream > stream, avsCommon::utils::AudioFormat audioFormat, std::unordered_set< std::shared_ptr< avsCommon::sdkInterfaces::KeyWordObserverInterface >> keyWordObservers, std::unordered_set< std::shared_ptr< avsCommon::sdkInterfaces::KeyWordDetectorStateObserverInterface >> keyWordDetectorStateObservers) |
A class that creates a keyword detector.
using alexaClientSDK::kwd::KeywordDetectorProvider::KWDCreateMethod = std::unique_ptr<acsdkKWDImplementations::AbstractKeywordDetector> (*)( std::shared_ptr<avsCommon::avs::AudioInputStream> stream, avsCommon::utils::AudioFormat audioFormat, std::unordered_set<std::shared_ptr<avsCommon::sdkInterfaces::KeyWordObserverInterface> > keyWordObservers, std::unordered_set<std::shared_ptr<avsCommon::sdkInterfaces::KeyWordDetectorStateObserverInterface> > keyWordDetectorStateObservers) |
|
static |
Creates a KeywordDetector
. The KeywordDetector
that is created is determined by the create method registered by the KWDRegistration
Class. Only one KeywordDetector
can be registered at a time to the KeywordDetectorProvider
.
stream | The stream of audio data. This should be formatted in LPCM encoded with 16 bits per sample and have a sample rate of 16 kHz. Additionally, the data should be in little endian format. |
audioFormat | The format of the audio data located within the stream. |
keyWordObservers | The observers to notify of keyword detections. |
keyWordDetectorStateObservers | The observers to notify of state changes in the engine. |
KeywordDetector
based on CMake configurations on success or nullptr
if creation failed. AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0