AlexaClientSDK  1.20.1
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Namespaces | Classes | Typedefs | Functions | Variables
alexaClientSDK::capabilityAgents::speechSynthesizer Namespace Reference

Namespaces

 test
 

Classes

class  SpeechSynthesizer
 

Typedefs

using MediaPlayerState = avsCommon::utils::mediaPlayer::MediaPlayerState
 

Functions

static std::shared_ptr< avsCommon::avs::CapabilityConfigurationgetSpeechSynthesizerCapabilityConfiguration ()
 

Variables

static const std::string SPEECHSYNTHESIZER_CAPABILITY_INTERFACE_TYPE = "AlexaInterface"
 
static const std::string SPEECHSYNTHESIZER_CAPABILITY_INTERFACE_NAME = "SpeechSynthesizer"
 SpeechSynthesizer interface name. More...
 
static const std::string SPEECHSYNTHESIZER_CAPABILITY_INTERFACE_VERSION = "1.3"
 SpeechSynthesizer interface version. More...
 
static const std::string TAG {"SpeechSynthesizer"}
 String to identify log entries originating from this file. More...
 
static const std::string NAMESPACE {"SpeechSynthesizer"}
 The namespace for the SpeechSynthesizer capability agent. More...
 
static const NamespaceAndName SPEAK {NAMESPACE, "Speak"}
 The Speak directive signature. More...
 
static const NamespaceAndName CONTEXT_MANAGER_SPEECH_STATE {NAMESPACE, "SpeechState"}
 The state information NamespaceAndName to send to the ContextManager. More...
 
static const std::string CHANNEL_NAME = FocusManagerInterface::DIALOG_CHANNEL_NAME
 The name of the FocusManager channel used by the SpeechSynthesizer. More...
 
static std::string SPEECH_STARTED_EVENT_NAME {"SpeechStarted"}
 The name of the event to send to the AVS server once audio starting playing. More...
 
static std::string SPEECH_FINISHED_EVENT_NAME {"SpeechFinished"}
 The name of the event to send to the AVS server once audio finishes playing. More...
 
static std::string SPEECH_INTERRUPTED_EVENT_NAME {"SpeechInterrupted"}
 The name of the event to send to the AVS server once audio playing has been interrupted. More...
 
static const char KEY_URL [] = "url"
 The key used to look up the "url" property in the directive payload. More...
 
static const char KEY_TOKEN [] = "token"
 The key for the "token" property in the directive payload string and "SpeechState" string. More...
 
static const char KEY_FORMAT [] = "format"
 The key used to look the "format" property in the directive payload string. More...
 
static const char KEY_CAPTION [] = "caption"
 The key for the "captionData" property in the directive payload. More...
 
static const char KEY_CAPTION_TYPE [] = "type"
 The key under "captionData" containing the caption type. More...
 
static const char KEY_CAPTION_CONTENT [] = "content"
 The key under "captionData" containing the caption content. More...
 
static const char KEY_PLAY_BEHAVIOR [] = "playBehavior"
 The key used to look the "playBehavior" property in the directive payload string. More...
 
static const std::string FORMAT {"AUDIO_MPEG"}
 The expected format value in the directive payload. More...
 
static const std::string CID_PREFIX {"cid:"}
 Prefix for content ID prefix in the url property of the directive payload. More...
 
static const char KEY_OFFSET_IN_MILLISECONDS [] = "offsetInMilliseconds"
 The key for the "offsetInMilliseconds" property in the event context. More...
 
static const char KEY_PLAYER_ACTIVITY [] = "playerActivity"
 The "playerActivity" key used to build "SpeechState" string. More...
 
static const char KEY_ANALYZERS [] = "analyzers"
 The "analyzers" key used to retrieve analyzer data from directive. More...
 
static const char KEY_ANALYZERS_INTERFACE [] = "interface"
 The key used to retrieve the audio analyzer name from directive. More...
 
static const char KEY_ANALYZERS_ENABLED [] = "enabled"
 The key used to retrieve the audio analyzer enabled state from directive. More...
 
static const char PLAYER_STATE_PLAYING [] = "PLAYING"
 The player activity value used to build the "SpeechState" string. More...
 
static const char PLAYER_STATE_FINISHED [] = "FINISHED"
 The player activity value used to build the "SpeechState" string. More...
 
static const char PLAYER_STATE_INTERRUPTED [] = "INTERRUPTED"
 The player activity value used to build the "SpeechState" string. More...
 
static const std::chrono::seconds STATE_CHANGE_TIMEOUT {5}
 The duration to wait for a state change in onFocusChanged before failing. More...
 
static const std::string POWER_RESOURCE_COMPONENT_NAME {"SpeechSynthesizer"}
 The component name of power resource. More...
 
static const std::string SPEECH_SYNTHESIZER_METRIC_PREFIX = "SPEECH_SYNTHESIZER-"
 Metric prefix for SpeechSynthesizer metric source. More...
 
static const std::string FIRST_BYTES_AUDIO = "FIRST_BYTES_AUDIO"
 Metric to emit when received first audio bytes. More...
 
static const std::string TTS_STARTED = "TTS_STARTED"
 Metric to emit at the start of TTS. More...
 
static const std::string TTS_FINISHED = "TTS_FINISHED"
 Metric to emit when TTS finishes. More...
 
static const std::string DIALOG_REQUEST_ID_KEY = "DIALOG_REQUEST_ID"
 Key name for the dialogRequestId metric information. More...
 
static const std::string BUFFER_UNDERRUN = "ERROR.TTS_BUFFER_UNDERRUN"
 Metric to emit on TTS buffer underrrun. More...
 

Typedef Documentation

◆ MediaPlayerState

Function Documentation

◆ getSpeechSynthesizerCapabilityConfiguration()

std::shared_ptr< CapabilityConfiguration > alexaClientSDK::capabilityAgents::speechSynthesizer::getSpeechSynthesizerCapabilityConfiguration ( )
static

Creates the SpeechSynthesizer capability configuration.

Returns
The SpeechSynthesizer capability configuration.

Variable Documentation

◆ BUFFER_UNDERRUN

const std::string alexaClientSDK::capabilityAgents::speechSynthesizer::BUFFER_UNDERRUN = "ERROR.TTS_BUFFER_UNDERRUN"
static

Metric to emit on TTS buffer underrrun.

◆ CHANNEL_NAME

const std::string alexaClientSDK::capabilityAgents::speechSynthesizer::CHANNEL_NAME = FocusManagerInterface::DIALOG_CHANNEL_NAME
static

The name of the FocusManager channel used by the SpeechSynthesizer.

◆ CID_PREFIX

const std::string alexaClientSDK::capabilityAgents::speechSynthesizer::CID_PREFIX {"cid:"}
static

Prefix for content ID prefix in the url property of the directive payload.

◆ CONTEXT_MANAGER_SPEECH_STATE

const NamespaceAndName alexaClientSDK::capabilityAgents::speechSynthesizer::CONTEXT_MANAGER_SPEECH_STATE {NAMESPACE, "SpeechState"}
static

The state information NamespaceAndName to send to the ContextManager.

◆ DIALOG_REQUEST_ID_KEY

const std::string alexaClientSDK::capabilityAgents::speechSynthesizer::DIALOG_REQUEST_ID_KEY = "DIALOG_REQUEST_ID"
static

Key name for the dialogRequestId metric information.

◆ FIRST_BYTES_AUDIO

const std::string alexaClientSDK::capabilityAgents::speechSynthesizer::FIRST_BYTES_AUDIO = "FIRST_BYTES_AUDIO"
static

Metric to emit when received first audio bytes.

◆ FORMAT

const std::string alexaClientSDK::capabilityAgents::speechSynthesizer::FORMAT {"AUDIO_MPEG"}
static

The expected format value in the directive payload.

◆ KEY_ANALYZERS

const char alexaClientSDK::capabilityAgents::speechSynthesizer::KEY_ANALYZERS[] = "analyzers"
static

The "analyzers" key used to retrieve analyzer data from directive.

◆ KEY_ANALYZERS_ENABLED

const char alexaClientSDK::capabilityAgents::speechSynthesizer::KEY_ANALYZERS_ENABLED[] = "enabled"
static

The key used to retrieve the audio analyzer enabled state from directive.

◆ KEY_ANALYZERS_INTERFACE

const char alexaClientSDK::capabilityAgents::speechSynthesizer::KEY_ANALYZERS_INTERFACE[] = "interface"
static

The key used to retrieve the audio analyzer name from directive.

◆ KEY_CAPTION

const char alexaClientSDK::capabilityAgents::speechSynthesizer::KEY_CAPTION[] = "caption"
static

The key for the "captionData" property in the directive payload.

◆ KEY_CAPTION_CONTENT

const char alexaClientSDK::capabilityAgents::speechSynthesizer::KEY_CAPTION_CONTENT[] = "content"
static

The key under "captionData" containing the caption content.

◆ KEY_CAPTION_TYPE

const char alexaClientSDK::capabilityAgents::speechSynthesizer::KEY_CAPTION_TYPE[] = "type"
static

The key under "captionData" containing the caption type.

◆ KEY_FORMAT

const char alexaClientSDK::capabilityAgents::speechSynthesizer::KEY_FORMAT[] = "format"
static

The key used to look the "format" property in the directive payload string.

◆ KEY_OFFSET_IN_MILLISECONDS

const char alexaClientSDK::capabilityAgents::speechSynthesizer::KEY_OFFSET_IN_MILLISECONDS[] = "offsetInMilliseconds"
static

The key for the "offsetInMilliseconds" property in the event context.

◆ KEY_PLAY_BEHAVIOR

const char alexaClientSDK::capabilityAgents::speechSynthesizer::KEY_PLAY_BEHAVIOR[] = "playBehavior"
static

The key used to look the "playBehavior" property in the directive payload string.

◆ KEY_PLAYER_ACTIVITY

const char alexaClientSDK::capabilityAgents::speechSynthesizer::KEY_PLAYER_ACTIVITY[] = "playerActivity"
static

The "playerActivity" key used to build "SpeechState" string.

◆ KEY_TOKEN

const char alexaClientSDK::capabilityAgents::speechSynthesizer::KEY_TOKEN[] = "token"
static

The key for the "token" property in the directive payload string and "SpeechState" string.

◆ KEY_URL

const char alexaClientSDK::capabilityAgents::speechSynthesizer::KEY_URL[] = "url"
static

The key used to look up the "url" property in the directive payload.

◆ NAMESPACE

const std::string alexaClientSDK::capabilityAgents::speechSynthesizer::NAMESPACE {"SpeechSynthesizer"}
static

The namespace for the SpeechSynthesizer capability agent.

◆ PLAYER_STATE_FINISHED

const char alexaClientSDK::capabilityAgents::speechSynthesizer::PLAYER_STATE_FINISHED[] = "FINISHED"
static

The player activity value used to build the "SpeechState" string.

◆ PLAYER_STATE_INTERRUPTED

const char alexaClientSDK::capabilityAgents::speechSynthesizer::PLAYER_STATE_INTERRUPTED[] = "INTERRUPTED"
static

The player activity value used to build the "SpeechState" string.

◆ PLAYER_STATE_PLAYING

const char alexaClientSDK::capabilityAgents::speechSynthesizer::PLAYER_STATE_PLAYING[] = "PLAYING"
static

The player activity value used to build the "SpeechState" string.

◆ POWER_RESOURCE_COMPONENT_NAME

const std::string alexaClientSDK::capabilityAgents::speechSynthesizer::POWER_RESOURCE_COMPONENT_NAME {"SpeechSynthesizer"}
static

The component name of power resource.

◆ SPEAK

const NamespaceAndName alexaClientSDK::capabilityAgents::speechSynthesizer::SPEAK {NAMESPACE, "Speak"}
static

The Speak directive signature.

◆ SPEECH_FINISHED_EVENT_NAME

std::string alexaClientSDK::capabilityAgents::speechSynthesizer::SPEECH_FINISHED_EVENT_NAME {"SpeechFinished"}
static

The name of the event to send to the AVS server once audio finishes playing.

◆ SPEECH_INTERRUPTED_EVENT_NAME

std::string alexaClientSDK::capabilityAgents::speechSynthesizer::SPEECH_INTERRUPTED_EVENT_NAME {"SpeechInterrupted"}
static

The name of the event to send to the AVS server once audio playing has been interrupted.

◆ SPEECH_STARTED_EVENT_NAME

std::string alexaClientSDK::capabilityAgents::speechSynthesizer::SPEECH_STARTED_EVENT_NAME {"SpeechStarted"}
static

The name of the event to send to the AVS server once audio starting playing.

◆ SPEECH_SYNTHESIZER_METRIC_PREFIX

const std::string alexaClientSDK::capabilityAgents::speechSynthesizer::SPEECH_SYNTHESIZER_METRIC_PREFIX = "SPEECH_SYNTHESIZER-"
static

Metric prefix for SpeechSynthesizer metric source.

◆ SPEECHSYNTHESIZER_CAPABILITY_INTERFACE_NAME

const std::string alexaClientSDK::capabilityAgents::speechSynthesizer::SPEECHSYNTHESIZER_CAPABILITY_INTERFACE_NAME = "SpeechSynthesizer"
static

SpeechSynthesizer interface name.

◆ SPEECHSYNTHESIZER_CAPABILITY_INTERFACE_TYPE

const std::string alexaClientSDK::capabilityAgents::speechSynthesizer::SPEECHSYNTHESIZER_CAPABILITY_INTERFACE_TYPE = "AlexaInterface"
static

SpeechSynthesizer capability constants SpeechSynthesizer interface type

◆ SPEECHSYNTHESIZER_CAPABILITY_INTERFACE_VERSION

const std::string alexaClientSDK::capabilityAgents::speechSynthesizer::SPEECHSYNTHESIZER_CAPABILITY_INTERFACE_VERSION = "1.3"
static

SpeechSynthesizer interface version.

◆ STATE_CHANGE_TIMEOUT

const std::chrono::seconds alexaClientSDK::capabilityAgents::speechSynthesizer::STATE_CHANGE_TIMEOUT {5}
static

The duration to wait for a state change in onFocusChanged before failing.

◆ TAG

const std::string alexaClientSDK::capabilityAgents::speechSynthesizer::TAG {"SpeechSynthesizer"}
static

String to identify log entries originating from this file.

◆ TTS_FINISHED

const std::string alexaClientSDK::capabilityAgents::speechSynthesizer::TTS_FINISHED = "TTS_FINISHED"
static

Metric to emit when TTS finishes.

◆ TTS_STARTED

const std::string alexaClientSDK::capabilityAgents::speechSynthesizer::TTS_STARTED = "TTS_STARTED"
static

Metric to emit at the start of TTS.

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