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 ISpeechStream

interface ISpeechStream
Extends com.amazon.apmf.IStandard The ISpeechStream interface provides methods to access and manage a synthesized speech audio stream, including its configuration and state.

Methods

getAudioConfig()

com.amazon.kepler.audio.AudioConfig getAudioConfig()
Retrieves the audio configuration for the speech stream. It is available only if the stream has been already initialized, otherwise, it throws AudioStreamNotInitializedError.

Returns

com.amazon.kepler.audio.AudioConfig An AudioConfig detailing the stream’s audio format and properties.

getState()

StreamState getState()
Retrieves the current state of the speech stream.

Returns

StreamState A StreamState representing the current state of the stream.

addSpeechStreamListener()

com.amazon.apmf.ISubscription* addSpeechStreamListener(ISpeechStreamListener* listener)
Attaches a listener for receiving speech stream event notifications.

Parameters

listener
ISpeechStreamListener* — Required The ISpeechStreamListener to be notified of stream events.

Returns

com.amazon.apmf.ISubscription* An instance of ISubscription that can be used to cancel the listener from being called back for speech stream changes.
Last modified on October 29, 2026