FrenchVoiceSelector

class FrenchVoiceSelector(preferredVoiceNames: List<String> = DEFAULT_PREFERRED_VOICES)

Selects the best available offline French voice from the device's TTS engine.

The selection algorithm:

  1. Filters voices to keep only offline French voices (fr-FR, fr-CA, fr-BE, fr-CH).

  2. Sorts by Voice.getQuality descending, then favours installed voices.

  3. Among the highest-quality voices, picks the first match from preferredVoiceNames.

  4. Falls back to the first available voice if no preferred name matches.

See also

Constructors

Link copied to clipboard
constructor(preferredVoiceNames: List<String> = DEFAULT_PREFERRED_VOICES)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Returns all offline French voices available on the device, sorted by quality (descending) then by installation status (installed first).

Link copied to clipboard

Returns the best offline French voice available on this device, or null if none is found.