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

Public Types

enum  SpeechSynthesizerState {
  SpeechSynthesizerState::PLAYING, SpeechSynthesizerState::FINISHED, SpeechSynthesizerState::INTERRUPTED, SpeechSynthesizerState::GAINING_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.


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


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


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


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


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


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.

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, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0