AlexaClientSDK  1.22.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | List of all members
alexaClientSDK::avsCommon::sdkInterfaces::ExpectSpeechTimeoutHandlerInterface Class Referenceabstract

#include <ExpectSpeechTimeoutHandlerInterface.h>

Inheritance diagram for alexaClientSDK::avsCommon::sdkInterfaces::ExpectSpeechTimeoutHandlerInterface:
Inheritance graph

Public Member Functions

virtual ~ExpectSpeechTimeoutHandlerInterface ()=default
virtual bool handleExpectSpeechTimeout (std::chrono::milliseconds timeout, const std::function< std::future< bool >()> &expectSpeechTimedOut)=0

Detailed Description

Offers implementations the ability to handle the ExpectSpeech timeout. As an example, this may be useful to applications with remote microphones.

Constructor & Destructor Documentation

◆ ~ExpectSpeechTimeoutHandlerInterface()

virtual alexaClientSDK::avsCommon::sdkInterfaces::ExpectSpeechTimeoutHandlerInterface::~ExpectSpeechTimeoutHandlerInterface ( )


Member Function Documentation

◆ handleExpectSpeechTimeout()

virtual bool alexaClientSDK::avsCommon::sdkInterfaces::ExpectSpeechTimeoutHandlerInterface::handleExpectSpeechTimeout ( std::chrono::milliseconds  timeout,
const std::function< std::future< bool >()> &  expectSpeechTimedOut 
pure virtual

This function allows applications to tell the AudioInputProcessor that the ExpectSpeech directive's timeout will be handled externally and stops the AudioInputProcessor from starting an internal timer to handle it.

timeoutThe timeout of the ExpectSpeech directive.
expectSpeechTimedOutAn std::function that applications may call if the timeout expires. This results in an ExpectSpeechTimedOut event being sent to AVS if no recognize() call is made prior to the timeout expiring. This function will return a future which is true if called in the correct state and an ExpectSpeechTimeout Event was sent successfully, or false otherwise.
true if the ExpectSpeech directive's timeout will be handled externally and should not be handled via an internal timer owned by the AudioInputProcessor.
This function will be called after any calls to the AudioInputProcessorObserverInterface's onStateChanged() method to notify of a state change to EXPECTING_SPEECH.
Implementations are not required to be thread-safe.
If the @cAudioInputProcessor object that this call came from is destroyed, the expectSpeechTimedOut parameter is no longer valid.

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

AlexaClientSDK 1.22.0 - Copyright 2016-2020, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0