VoicesScreenViewModel

State holder for the Voices screen.

Exposes reactive voice data and action methods for the UI layer. The default implementation is DefaultVoicesScreenViewModel.

This can be used standalone (without NavigationControlsState) to build a custom voices UI.

See also

Inheritors

Properties

Link copied to clipboard
abstract val availableLanguages: StateFlow<List<String>>

Distinct languages available across all compatible voices.

Link copied to clipboard
abstract val selectedLanguage: StateFlow<String?>

Currently selected language filter, or null for all languages.

Link copied to clipboard
abstract val voices: StateFlow<List<VoiceUiModel>>

All compatible voices, filtered by selectedLanguage when set.

Functions

Link copied to clipboard
abstract fun install(voiceName: String)

Start downloading a voice package.

Link copied to clipboard
abstract fun onCleared()

Release resources. Must be called when the screen is destroyed.

Link copied to clipboard
abstract fun playWelcome(voiceName: String)

Play the welcome/demo audio for a voice.

Link copied to clipboard
abstract fun selectLanguage(language: String?)

Filter voices by language. Pass null to show all languages.

Link copied to clipboard
abstract fun selectVoice(voiceName: String)

Select a voice for navigation by name. Persists the choice.

Link copied to clipboard
abstract fun uninstall(voiceName: String)

Remove a downloaded voice package.