Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Interface IUtteranceContext

interface IUtteranceContext
Extends com.amazon.apmf.IStandard IUtteranceContext is an interface for managing a speech synthesis request. It provides methods to fetch the utterance used, to check if the synthesis is completed, and to fetch error details if an error occurs.

Methods

getUtterance()

IUtterance* getUtterance()
Retrieves the utterance used for the synthesis request.

Returns

IUtterance* The IUtterance object associated with the request.

getAudioPlaybackSettings()

AudioPlaybackSettings? getAudioPlaybackSettings()
Fetches the optional audio playback settings associated with the related utterance.

Returns

AudioPlaybackSettings? The return value is optional and might be absent. The audio playback settings used for utterance playback on the device, or null if not provided.

isCompleted()

bool isCompleted()
Checks if the related request has been completed (finished or cancelled).

Returns

bool The result of the check.

Throws


getCompletedReason()

UtteranceCompletedReason getCompletedReason()
Fetches the reason for the completion of the related request.

Returns

UtteranceCompletedReason The reason for completion or null if the equest has not concluded yet.

Throws


getError()

com.amazon.apmf.IError? getError()
Fetches any error which has occurred during the request.

Returns

com.amazon.apmf.IError? The return value is optional and might be absent. An error encountered during the request, or null if no error has occurred.

Throws


join()

void join()
Halts the current thread execution until the related synthesis request is completed.

Throws


cancel()

void cancel()
Cancels the synthesis request if it’s in progress or has not started yet.

Throws


Last modified on October 29, 2026