Skip to content

TextToSpeech

Base classes

Name Children Inherits
ObjectMixin
prettyqt.core.object
QTextToSpeech
PySide6.QtTextToSpeech
QTextToSpeech(self, engine: str, params: Dict[str, Any], /, parent: PySide6.QtCore.QObject | None \= None, *, state: PySide6.QtTextToSpeech.QTextToSpeech.State | None \= None, volume: float | None \= None, rate: float | None \= None, pitch: float | None \= None, locale: PySide6.QtCore.QLocale | None \= None, voice: PySide6.QtTextToSpeech.QVoice | None \= None, engineCapabilities: PySide6.QtTextToSpeech.QTextToSpeech.Capability | None \= None) -> None

⋔ Inheritance diagram

graph TD
  486623622["texttospeech.TextToSpeech"]
  3227531497["core.ObjectMixin"]
  2751680898["builtins.object"]
  1833772926["QtTextToSpeech.QTextToSpeech"]
  3984060476["QtCore.QObject"]
  37984305["Shiboken.Object"]
  3227531497 --> 486623622
  2751680898 --> 3227531497
  1833772926 --> 486623622
  3984060476 --> 1833772926
  37984305 --> 3984060476
  2751680898 --> 37984305

🛈 DocStrings

Bases: ObjectMixin, QTextToSpeech

Source code in prettyqt/texttospeech/texttospeech.py
class TextToSpeech(core.ObjectMixin, texttospeech.QTextToSpeech):
    def get_state(self) -> StateStr:
        return STATE.inverse[self.state()]

    def get_locale(self) -> core.Locale:
        return core.Locale(self.locale())

    def get_available_locales(self) -> list[core.Locale]:
        return [core.Locale(locale) for locale in self.availableLocales()]

    def get_voice(self) -> texttospeech.Voice:
        return texttospeech.Voice(self.voice())

    def get_available_voices(self) -> list[texttospeech.Voice]:
        return [texttospeech.Voice(voice) for voice in self.availableVoices()]

:fa-brands-github: Show source on GitHub