AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Classes | Public Types | Static Public Member Functions | List of all members
alexaClientSDK::kwd::KeywordDetectorProvider Class Reference

#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::AbstractKeywordDetectorcreate (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)
 

Detailed Description

A class that creates a keyword detector.

Member Typedef Documentation

◆ KWDCreateMethod

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)

Member Function Documentation

◆ create()

static std::unique_ptr<acsdkKWDImplementations::AbstractKeywordDetector> alexaClientSDK::kwd::KeywordDetectorProvider::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 
)
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.

Parameters
streamThe 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.
audioFormatThe format of the audio data located within the stream.
keyWordObserversThe observers to notify of keyword detections.
keyWordDetectorStateObserversThe observers to notify of state changes in the engine.
Returns
An KeywordDetector based on CMake configurations on success or nullptr if creation failed.

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

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