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

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

◆ onASRProfileChanged()

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

This function is called when the active ASRProfile changes.

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

Parameters
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)
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 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0