TextToSpeech

expect object TextToSpeech(source)

Functions and properties that can be used to create new TTS instances and check for compatibility issues.

Functions

Link copied to clipboard
expect fun create(context: Context, callback: (Result<TextToSpeechInstance>) -> Unit)

Creates a new TextToSpeechInstance.

Link copied to clipboard
expect fun createOrNothing(context: Context, callback: (TextToSpeechInstance) -> Unit)

Creates a new TextToSpeechInstance. Will do nothing and will not execute callback when TTS is not supported.

Link copied to clipboard
expect suspend fun createOrNull(context: Context): TextToSpeechInstance?

Creates a new TextToSpeechInstance. Will return null if TTS is not supported.

expect fun createOrNull(context: Context, callback: (TextToSpeechInstance?) -> Unit)

Creates a new TextToSpeechInstance. Will call callback with null if TTS is not supported.

Link copied to clipboard
expect suspend fun createOrThrow(context: Context): TextToSpeechInstance

Creates a new TextToSpeechInstance.

Properties

Link copied to clipboard
Link copied to clipboard
expect val isSupported: Boolean