16 #ifndef ACSDKKWDIMPLEMENTATIONS_ABSTRACTKEYWORDDETECTOR_H_ 17 #define ACSDKKWDIMPLEMENTATIONS_ABSTRACTKEYWORDDETECTOR_H_ 20 #include <unordered_set> 30 namespace acsdkKWDImplementations {
39 void addKeyWordObserver(std::shared_ptr<avsCommon::sdkInterfaces::KeyWordObserverInterface> keyWordObserver);
46 void removeKeyWordObserver(std::shared_ptr<avsCommon::sdkInterfaces::KeyWordObserverInterface> keyWordObserver);
55 std::shared_ptr<avsCommon::sdkInterfaces::KeyWordDetectorStateObserverInterface> keyWordDetectorStateObserver);
63 std::shared_ptr<avsCommon::sdkInterfaces::KeyWordDetectorStateObserverInterface> keyWordDetectorStateObserver);
79 std::unordered_set<std::shared_ptr<avsCommon::sdkInterfaces::KeyWordObserverInterface>> keyWordObservers =
80 std::unordered_set<std::shared_ptr<avsCommon::sdkInterfaces::KeyWordObserverInterface>>(),
81 std::unordered_set<std::shared_ptr<avsCommon::sdkInterfaces::KeyWordDetectorStateObserverInterface>>
82 keyWordDetectorStateObservers =
83 std::unordered_set<std::shared_ptr<avsCommon::sdkInterfaces::KeyWordDetectorStateObserverInterface>>(),
84 bool supportsDavs =
false);
94 std::shared_ptr<acsdkKWDInterfaces::KeywordNotifierInterface> keywordNotifier,
95 std::shared_ptr<acsdkKWDInterfaces::KeywordDetectorStateNotifierInterface> keyWordDetectorStateNotifier,
96 bool supportsDavs =
false);
108 std::shared_ptr<avsCommon::avs::AudioInputStream> stream,
112 std::shared_ptr<
const std::vector<char>> KWDMetadata =
nullptr)
const;
134 std::shared_ptr<avsCommon::avs::AudioInputStream::Reader> reader,
135 std::shared_ptr<avsCommon::avs::AudioInputStream> stream,
138 std::chrono::milliseconds timeout,
139 bool* errorOccurred);
160 std::shared_ptr<acsdkKWDInterfaces::KeywordNotifierInterface> m_keywordNotifier;
166 std::shared_ptr<acsdkKWDInterfaces::KeywordDetectorStateNotifierInterface> m_keywordDetectorStateNotifier;
175 mutable std::mutex m_detectorStateMutex;
184 #endif // ACSDKKWDIMPLEMENTATIONS_ABSTRACTKEYWORDDETECTOR_H_
KeyWordDetectorState
Definition: KeyWordDetectorStateObserverInterface.h:32
ssize_t readFromStream(std::shared_ptr< avsCommon::avs::AudioInputStream::Reader > reader, std::shared_ptr< avsCommon::avs::AudioInputStream > stream, void *buf, size_t nWords, std::chrono::milliseconds timeout, bool *errorOccurred)
static bool isByteswappingRequired(avsCommon::utils::AudioFormat audioFormat)
::std::string string
Definition: gtest-port.h:1097
void addKeyWordObserver(std::shared_ptr< avsCommon::sdkInterfaces::KeyWordObserverInterface > keyWordObserver)
void notifyKeyWordDetectorStateObservers(avsCommon::sdkInterfaces::KeyWordDetectorStateObserverInterface::KeyWordDetectorState state)
void removeKeyWordDetectorStateObserver(std::shared_ptr< avsCommon::sdkInterfaces::KeyWordDetectorStateObserverInterface > keyWordDetectorStateObserver)
void addKeyWordDetectorStateObserver(std::shared_ptr< avsCommon::sdkInterfaces::KeyWordDetectorStateObserverInterface > keyWordDetectorStateObserver)
Index
Index used for setting access.
Definition: StateReportGeneratorTest.cpp:41
virtual ~AbstractKeywordDetector()=default
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
Definition: AbstractKeywordDetector.h:32
AbstractKeywordDetector(std::unordered_set< std::shared_ptr< avsCommon::sdkInterfaces::KeyWordObserverInterface >> keyWordObservers=std::unordered_set< std::shared_ptr< avsCommon::sdkInterfaces::KeyWordObserverInterface >>(), std::unordered_set< std::shared_ptr< avsCommon::sdkInterfaces::KeyWordDetectorStateObserverInterface >> keyWordDetectorStateObservers=std::unordered_set< std::shared_ptr< avsCommon::sdkInterfaces::KeyWordDetectorStateObserverInterface >>(), bool supportsDavs=false)
void removeKeyWordObserver(std::shared_ptr< avsCommon::sdkInterfaces::KeyWordObserverInterface > keyWordObserver)
void notifyKeyWordObservers(std::shared_ptr< avsCommon::avs::AudioInputStream > stream, std::string keyword, avsCommon::avs::AudioInputStream::Index beginIndex, avsCommon::avs::AudioInputStream::Index endIndex, std::shared_ptr< const std::vector< char >> KWDMetadata=nullptr) const