AlexaClientSDK  3.0.0
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

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
virtual void onASRProfileChanged (const std::string &profile)

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.


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


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


In this state, the AudioInputProcessor is actively streaming speech.


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


Member Function Documentation

◆ onASRProfileChanged()

virtual void alexaClientSDK::avsCommon::sdkInterfaces::AudioInputProcessorObserverInterface::onASRProfileChanged ( const std::string &  profile)

This function is called when the active ASRProfile changes.

profileThe string representation of the active ASRProfile. Use the associated getASRProfile to retrieve the ASRProfile value.

Reimplemented in alexaClientSDK::sampleApplications::ipcServerSampleApp::liveViewController::LiveViewControllerPresentationAdapter.

◆ 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.

stateThe new state of the AudioInputProcessor.

Implemented in alexaClientSDK::avsCommon::avs::DialogUXStateAggregator, and alexaClientSDK::sampleApplications::ipcServerSampleApp::liveViewController::LiveViewControllerPresentationAdapter.

◆ stateToString()

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

This function converts the provided State to a string.

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

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

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