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

A state observer for an AudioInputProcessor. More...

#include <AudioInputProcessorObserverInterface.h>

Inheritance diagram for alexaClientSDK::avsCommon::sdkInterfaces::AudioInputProcessorObserverInterface:
Inheritance graph
[legend]

Public Types

enum  State { State::IDLE, State::EXPECTING_SPEECH, State::RECOGNIZING, State::BUSY }
 The different states the AudioInputProcessor can be in. More...
 

Public Member Functions

virtual ~AudioInputProcessorObserverInterface ()=default
 Destructor. More...
 
virtual void onStateChanged (State state)=0
 

Static Public Member Functions

static std::string stateToString (State state)
 

Detailed Description

A state observer for an AudioInputProcessor.

Member Enumeration Documentation

◆ State

The different states the AudioInputProcessor can be in.

Enumerator
IDLE 

In this state, the AudioInputProcessor is not waiting for or transmitting speech.

EXPECTING_SPEECH 

In this state, the AudioInputProcessor is waiting for a call to recognize().

RECOGNIZING 

In this state, the AudioInputProcessor is actively streaming speech.

BUSY 

In this state, the AudioInputProcessor has finished streaming and is waiting for completion of an Event. Note that recognize() calls are not permitted while in the BUSY state.

Constructor & Destructor Documentation

◆ ~AudioInputProcessorObserverInterface()

virtual alexaClientSDK::avsCommon::sdkInterfaces::AudioInputProcessorObserverInterface::~AudioInputProcessorObserverInterface ( )
virtualdefault

Destructor.

Member Function Documentation

◆ onStateChanged()

virtual void alexaClientSDK::avsCommon::sdkInterfaces::AudioInputProcessorObserverInterface::onStateChanged ( State  state)
pure virtual

This function is called when the state of the observed AudioInputProcessor changes. This function will block processing of audio inputs, so implementations should return quickly.

Parameters
stateThe new state of the AudioInputProcessor.

Implemented in alexaClientSDK::avsCommon::avs::DialogUXStateAggregator, and alexaClientSDK::integration::AipStateObserver.

◆ stateToString()

static std::string alexaClientSDK::avsCommon::sdkInterfaces::AudioInputProcessorObserverInterface::stateToString ( State  state)
inlinestatic

This function converts the provided State to a string.

Parameters
stateThe State to convert to a string.
Returns
The string conversion of state.

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

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