SpeechFilePlayer

Interface for playing speech files.

This interface provides methods to play, stop, adjust volume, and release resources for handling remote voice announcements.

Functions

Link copied to clipboard
open fun fadePlay(remoteAnnouncement: VoiceAnnouncement.Remote, callback: PlayerCallback)

Plays the given remote voice announcement with a fade-in effect.

Link copied to clipboard
open suspend fun fadeStop()

Stops the currently playing audio with a fade-out effect.

Link copied to clipboard
abstract fun play(remoteAnnouncement: VoiceAnnouncement.Remote, callback: PlayerCallback)

Plays the given remote voice announcement.

Link copied to clipboard
abstract fun release()

Releases any resources held by the player.

Link copied to clipboard
abstract fun stop()

Stops the currently playing audio.

Link copied to clipboard
abstract fun volume(level: Float)

Adjusts the playback volume.