QtTextToSpeech.pyi 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. # The PEP 484 type hints stub file for the QtTextToSpeech module.
  2. #
  3. # Generated by SIP 6.15.3
  4. #
  5. # Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
  6. #
  7. # This file is part of PyQt6.
  8. #
  9. # This file may be used under the terms of the GNU General Public License
  10. # version 3.0 as published by the Free Software Foundation and appearing in
  11. # the file LICENSE included in the packaging of this file. Please review the
  12. # following information to ensure the GNU General Public License version 3.0
  13. # requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  14. #
  15. # If you do not wish to use this file under the terms of the GPL version 3.0
  16. # then you may purchase a commercial license. For more information contact
  17. # info@riverbankcomputing.com.
  18. #
  19. # This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  20. # WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  21. import collections, re, typing, enum
  22. try:
  23. from warnings import deprecated
  24. except ImportError:
  25. pass
  26. import PyQt6.sip
  27. from PyQt6 import QtCore
  28. # Support for QDate, QDateTime and QTime.
  29. import datetime
  30. # Convenient type aliases.
  31. PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal]
  32. PYQT_SLOT = typing.Union[collections.abc.Callable[..., Any], QtCore.pyqtBoundSignal]
  33. class QTextToSpeech(QtCore.QObject):
  34. class Capability(enum.Enum):
  35. None_ = ... # type: QTextToSpeech.Capability
  36. Speak = ... # type: QTextToSpeech.Capability
  37. PauseResume = ... # type: QTextToSpeech.Capability
  38. WordByWordProgress = ... # type: QTextToSpeech.Capability
  39. Synthesize = ... # type: QTextToSpeech.Capability
  40. class State(enum.Enum):
  41. Ready = ... # type: QTextToSpeech.State
  42. Speaking = ... # type: QTextToSpeech.State
  43. Paused = ... # type: QTextToSpeech.State
  44. Error = ... # type: QTextToSpeech.State
  45. Synthesizing = ... # type: QTextToSpeech.State
  46. class ErrorReason(enum.Enum):
  47. NoError = ... # type: QTextToSpeech.ErrorReason
  48. Initialization = ... # type: QTextToSpeech.ErrorReason
  49. Configuration = ... # type: QTextToSpeech.ErrorReason
  50. Input = ... # type: QTextToSpeech.ErrorReason
  51. Playback = ... # type: QTextToSpeech.ErrorReason
  52. class BoundaryHint(enum.Enum):
  53. Default = ... # type: QTextToSpeech.BoundaryHint
  54. Immediate = ... # type: QTextToSpeech.BoundaryHint
  55. Word = ... # type: QTextToSpeech.BoundaryHint
  56. Sentence = ... # type: QTextToSpeech.BoundaryHint
  57. Utterance = ... # type: QTextToSpeech.BoundaryHint
  58. @typing.overload
  59. def __init__(self, engine: str|None, params: dict[str|None, typing.Any], parent: QtCore.QObject|None = ...) -> None: ...
  60. @typing.overload
  61. def __init__(self, parent: QtCore.QObject|None = ...) -> None: ...
  62. @typing.overload
  63. def __init__(self, engine: str|None, parent: QtCore.QObject|None = ...) -> None: ...
  64. aboutToSynthesize: typing.ClassVar[QtCore.pyqtSignal]
  65. sayingWord: typing.ClassVar[QtCore.pyqtSignal]
  66. def enqueue(self, text: str|None) -> int: ...
  67. def engineCapabilities(self) -> 'QTextToSpeech.Capability': ...
  68. errorOccurred: typing.ClassVar[QtCore.pyqtSignal]
  69. engineChanged: typing.ClassVar[QtCore.pyqtSignal]
  70. voiceChanged: typing.ClassVar[QtCore.pyqtSignal]
  71. volumeChanged: typing.ClassVar[QtCore.pyqtSignal]
  72. pitchChanged: typing.ClassVar[QtCore.pyqtSignal]
  73. rateChanged: typing.ClassVar[QtCore.pyqtSignal]
  74. localeChanged: typing.ClassVar[QtCore.pyqtSignal]
  75. stateChanged: typing.ClassVar[QtCore.pyqtSignal]
  76. def setVoice(self, voice: 'QVoice') -> None: ...
  77. def setVolume(self, volume: float) -> None: ...
  78. def setPitch(self, pitch: float) -> None: ...
  79. def setRate(self, rate: float) -> None: ...
  80. def setLocale(self, locale: QtCore.QLocale) -> None: ...
  81. def resume(self) -> None: ...
  82. def pause(self, boundaryHint: 'QTextToSpeech.BoundaryHint' = ...) -> None: ...
  83. def stop(self, boundaryHint: 'QTextToSpeech.BoundaryHint' = ...) -> None: ...
  84. def say(self, text: str|None) -> None: ...
  85. @staticmethod
  86. def availableEngines() -> list[str]: ...
  87. def volume(self) -> float: ...
  88. def pitch(self) -> float: ...
  89. def rate(self) -> float: ...
  90. def availableVoices(self) -> list['QVoice']: ...
  91. def voice(self) -> 'QVoice': ...
  92. def locale(self) -> QtCore.QLocale: ...
  93. def availableLocales(self) -> list[QtCore.QLocale]: ...
  94. def state(self) -> 'QTextToSpeech.State': ...
  95. def errorString(self) -> str: ...
  96. def errorReason(self) -> 'QTextToSpeech.ErrorReason': ...
  97. def engine(self) -> str: ...
  98. def setEngine(self, engine: str|None, params: dict[str|None, typing.Any] = ...) -> bool: ...
  99. class QVoice(PyQt6.sip.simplewrapper):
  100. class Age(enum.Enum):
  101. Child = ... # type: QVoice.Age
  102. Teenager = ... # type: QVoice.Age
  103. Adult = ... # type: QVoice.Age
  104. Senior = ... # type: QVoice.Age
  105. Other = ... # type: QVoice.Age
  106. class Gender(enum.Enum):
  107. Male = ... # type: QVoice.Gender
  108. Female = ... # type: QVoice.Gender
  109. Unknown = ... # type: QVoice.Gender
  110. @typing.overload
  111. def __init__(self) -> None: ...
  112. @typing.overload
  113. def __init__(self, other: 'QVoice') -> None: ...
  114. def __eq__(self, other: object): ...
  115. def __ne__(self, other: object): ...
  116. def language(self) -> QtCore.QLocale.Language: ...
  117. def locale(self) -> QtCore.QLocale: ...
  118. def swap(self, other: 'QVoice') -> None: ...
  119. @staticmethod
  120. def ageName(age: 'QVoice.Age') -> str: ...
  121. @staticmethod
  122. def genderName(gender: 'QVoice.Gender') -> str: ...
  123. def age(self) -> 'QVoice.Age': ...
  124. def gender(self) -> 'QVoice.Gender': ...
  125. def name(self) -> str: ...