VoiceSelector QML Type

Provides attached properties for selecting the voice of a TextToSpeech 元素。 更多...

import 语句: import QtTextToSpeech
Since: Qt 6.6

特性

方法

详细描述

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.

另请参阅 TextToSpeech::voice and TextToSpeech::availableVoices ().

特性文档编制

age : enumerator

This property specifies which age the selected voice should have.

gender : enumerator

This property specifies which gender the selected voice should have.

语言 : 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.

另请参阅 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.

另请参阅 语言 .

name : variant

This property specifies which name the selected voice should have.

The property can be a string, or a regular expression.

方法文档编制

void select ()

Activates the selection of the voice based on the specified criteria.

注意: This method only needs to be called if the selection criteria are modified after the TextToSpeech object has been instantiated.