PySide6.QtTextToSpeech.QVoice¶
- class QVoice¶
The
QVoiceclass represents a particular voice.Details
To get a voice that is supported by the current text-to-speech engine, use
availableVoices()orfindVoices().Synopsis¶
Properties¶
Methods¶
def
__init__()def
age()def
gender()def
language()def
locale()def
name()def
__ne__()def
__eq__()def
swap()
Static functions¶
def
ageName()def
genderName()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
- class Gender¶
The gender of a voice.
Constant
Description
QVoice.Gender.Male
Voice of a male
QVoice.Gender.Female
Voice of a female
QVoice.Gender.Unknown
Voice of unknown gender
- class Age¶
The age of a voice.
Constant
Description
QVoice.Age.Child
Voice of a child
QVoice.Age.Teenager
Voice of a teenager
QVoice.Age.Adult
Voice of an adult
QVoice.Age.Senior
Voice of a senior
QVoice.Age.Other
Voice of unknown age
Note
Properties can be used directly when
from __feature__ import true_propertyis used or via accessor functions otherwise.- property ageᅟ: QVoice.Age¶
This property holds the age of a voice.
- Access functions:
- property genderᅟ: QVoice.Gender¶
This property holds the gender of a voice.
- Access functions:
- property languageᅟ: QLocale.Language¶
This property holds the language of the voice.
This is the language attribute of the voice’s
locale.- Access functions:
This property holds the locale of the voice.
The locale includes the language and the territory (i.e. accent or dialect) of the voice.
- Access functions:
- property nameᅟ: str¶
This property holds the name of a voice.
- Access functions:
- __init__()¶
Constructs an empty
QVoice.Application code cannot construct arbitrary voice instances. Use
availableVoices()orfindVoices()instead to select a supported voice.- __init__(other)
- Parameters:
other –
QVoice
Copy-constructs a
QVoicefromother.Getter of property
ageᅟ.Returns a string representing the
ageclass of a voice.Getter of property
genderᅟ.̈́ Returns the
gendername of a voice.Getter of property
languageᅟ.Getter of property
localeᅟ.- name()¶
- Return type:
str
Getter of property
nameᅟ.Swaps
otherwith this voice. This operation is very fast and never fails.