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 IAsyncClient

interface IAsyncClient
Extends com.amazon.apmf.IStandard Interface representing the TTS client that interfaces with the system TTS service. This interface offers methods for fetching voice and profile managers, and for initiating and aborting the speech synthesis process. It enables asynchronous interaction with the system TTS service. Note: Asynchronous code execution will be handled in different way once it is available in OmniKit. At that time we provide final IClient interface.

Methods

getOrMakeVoiceManager()

IVoiceManager* getOrMakeVoiceManager()
Fetches the voice manager.

Returns

IVoiceManager* The voice manager object.

Throws


getOrMakeProfileManager()

IProfileManager* getOrMakeProfileManager()
Fetches the profile manager.

Returns

IProfileManager* The profile manager object.

Throws


speak()

IUtteranceContext* speak(IUtterance* utterance, AudioPlaybackSettings? audioPlaybackSettings)
Synthesize speech using the provided input parameters and speech configuration, and play back the result using the default audio system. Playback is provided as a convenience for the client. The client is responsible for coordinating the audio system resources and utilization required by media playback. Note: Playback will begin immediately after the synthesis results are received and sufficiently buffered. Multiple synthesis requests could be queued up by the system TTS Service. Event listeners should be used to identify when a specific synthesis or playback request starts and finishes.

Parameters

utterance
IUtterance* — Required The IUtterance object containing the text to synthesize and speech attributes.
audioPlaybackSettings
AudioPlaybackSettings? — Optional The AudioPlaybackSettings object defining the features of the resulting audio. In case of null the default settings will be used.

Returns

IUtteranceContext* Context object describing the synthesis request.

Throws


synthesize()

IUtteranceContext* synthesize(IUtterance* utterance)
Initiate the speech synthesis process in an asynchronous manner. Multiple synthesis requests could be queued up by the system TTS Service. Event listeners should be used to identify when a specific synthesis request starts and finishes.

Parameters

utterance
IUtterance* — Required The IUtterance object containing the text to be synthesized and speech attributes.

Returns

IUtteranceContext* Context object describing the synthesis request.

Throws


cancelAll()

void cancelAll()
Aborts all syntheses requested by the current client.

Throws


Last modified on October 29, 2026