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

#include <SpeechSynthesizerObserverInterface.h>

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

Public Types

enum  SpeechSynthesizerState {
  SpeechSynthesizerState::PLAYING, SpeechSynthesizerState::FINISHED, SpeechSynthesizerState::INTERRUPTED, SpeechSynthesizerState::GAINING_FOCUS,
  SpeechSynthesizerState::LOSING_FOCUS
}
 

Public Member Functions

virtual ~SpeechSynthesizerObserverInterface ()=default
 
virtual void onStateChanged (SpeechSynthesizerState state, const avsCommon::utils::mediaPlayer::MediaPlayerInterface::SourceId mediaSourceId, const avsCommon::utils::Optional< avsCommon::utils::mediaPlayer::MediaPlayerState > &mediaPlayerState, const std::vector< avsCommon::utils::audioAnalyzer::AudioAnalyzerState > &audioAnalyzerState)=0
 

Detailed Description

Interface for observing a SpeechSynthesizer.

Member Enumeration Documentation

◆ SpeechSynthesizerState

This is an enum class used to indicate the state of the SpeechSynthesizer.

Enumerator
PLAYING 

In this state, the SpeechSynthesizer is playing back the speech.

FINISHED 

In this state, the SpeechSynthesizer is idle and not playing speech.

INTERRUPTED 

In this state, the SpeechSynthesizer is idle due to a barge in.

GAINING_FOCUS 

In this state, the SpeechSynthesizer is gaining the channel focus while still not playing anything.

LOSING_FOCUS 

In this state, the SpeechSynthesizer is losing the channel focus but not yet considered FINISHED.

Constructor & Destructor Documentation

◆ ~SpeechSynthesizerObserverInterface()

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

Destructor.

Member Function Documentation

◆ onStateChanged()

virtual void alexaClientSDK::avsCommon::sdkInterfaces::SpeechSynthesizerObserverInterface::onStateChanged ( SpeechSynthesizerState  state,
const avsCommon::utils::mediaPlayer::MediaPlayerInterface::SourceId  mediaSourceId,
const avsCommon::utils::Optional< avsCommon::utils::mediaPlayer::MediaPlayerState > &  mediaPlayerState,
const std::vector< avsCommon::utils::audioAnalyzer::AudioAnalyzerState > &  audioAnalyzerState 
)
pure virtual

Notification that the SpeechSynthesizer state has changed. Callback functions must return as soon as possible.

Parameters
stateThe new state of the speechSynthesizer.
mediaSourceIdThe current media source id for SpeechSynthesizer
mediaPlayerStateOptional state of the media player as of this state change. The Optional is blank if the state is unavailable.
audioAnalyzerStatestates of the audio analyzers related to the speech output.

Implemented in alexaClientSDK::avsCommon::avs::DialogUXStateAggregator.


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