AlexaClientSDK  3.0.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
[legend]

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 ( )
virtualdefault

Destructor.

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.

Parameters
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.
Returns
true if the ExpectSpeech directive's timeout will be handled externally and should not be handled via an internal timer owned by the AudioInputProcessor.
Note
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 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 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0