VoiceSelector QML Type
Provides attached properties for selecting the voice of a TextToSpeech element. More...
Import Statement: | import QtTextToSpeech |
Since: | Qt 6.6 |
Properties
Methods
- void select()
Detailed Description
The type provides a set of properties that are by default unset. The TextToSpeech element will choose the first voice that matches all the set property values. If no voice is found that matches all criteria, then the voice doesn't change.
When setting individual properties within this group after the TextToSpeech object has been initialized, then you have to call the select() method to trigger the selection of a voice.
See also TextToSpeech::voice and TextToSpeech::availableVoices().
Property Documentation
age : enumerator |
This property specifies which age the selected voice should have.
gender : enumerator |
This property specifies which gender the selected voice should have.
language : locale |
This property specifies which language the selected voice should have.
The property is of type locale, but only the language component of the locale will be considered, the territory will be ignored.
See also locale.
locale : locale |
This property specifies which locale the selected voice should have.
If this property is set, then both the language and the territory of the voice need to match.
See also language.
name : variant |
This property specifies which name the selected voice should have.
The property can be a string, or a regular expression.
Method Documentation
void select() |
Activates the selection of the voice based on the specified criteria.
Note: This method only needs to be called if the selection criteria are modified after the TextToSpeech object has been instantiated.