probeTtsVoices

suspend fun probeTtsVoices(context: Context, timeoutMs: Long): List<String>

Enumerates installed text-to-speech voices by briefly initializing a TextToSpeech engine.

TTS init is asynchronous and must run on the main thread; this bridges the init callback into a cancellable coroutine, caps results at 24 voices and always shuts the engine down.

Privacy: the installed voice/locale set is a stable fingerprint that varies by OEM and user installs. No permission is required.

Return

List of languageTag:voiceName strings, or empty on failure/timeout.

Parameters

context

Context used to construct the TTS engine (application context is used).

timeoutMs

Maximum time to wait for engine init before returning empty.