VoiceSelector QML Type
为选择TextToSpeech 元素的声音提供附加属性。更多
Import Statement: | import QtTextToSpeech |
Since: | Qt 6.6 |
属性
方法
- void select()
详细说明
该类型提供了一组默认未设置的属性。TextToSpeech 元素将选择第一个符合所有设定属性值的语音。如果找不到符合所有条件的语音,则语音不会改变。
如果在TextToSpeech 对象初始化后设置该组中的单个属性,则必须调用select() 方法来触发语音选择。
另请参阅 TextToSpeech::voice 和TextToSpeech::availableVoices()。
属性文档
age : enumerator |
该属性指定所选语音应具有的age 。
gender : enumerator |
该属性指定所选语音应具有的gender 。
language : locale |
locale : locale |
name : variant |
该属性指定所选语音的名称。
该属性可以是字符串或正则表达式。
方法文档
void select() |
根据指定条件激活语音选择。
注: 只有在TextToSpeech 对象实例化后修改了选择标准时,才需要调用此方法。
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.