QtTextToSpeech.pyi 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. # Copyright (C) 2022 The Qt Company Ltd.
  2. # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
  3. """
  4. This file contains the exact signatures for all functions in module
  5. PySide6.QtTextToSpeech, except for defaults which are replaced by "...".
  6. """
  7. # mypy: disable-error-code="override, overload-overlap"
  8. # Module `PySide6.QtTextToSpeech`
  9. import PySide6.QtTextToSpeech
  10. import PySide6.QtCore
  11. import enum
  12. import typing
  13. from PySide6.QtCore import Signal
  14. from shiboken6 import Shiboken
  15. class QIntList: ...
  16. class QTextToSpeech(PySide6.QtCore.QObject):
  17. aboutToSynthesize : typing.ClassVar[Signal] = ... # aboutToSynthesize(qsizetype)
  18. engineChanged : typing.ClassVar[Signal] = ... # engineChanged(QString)
  19. errorOccurred : typing.ClassVar[Signal] = ... # errorOccurred(QTextToSpeech::ErrorReason,QString)
  20. localeChanged : typing.ClassVar[Signal] = ... # localeChanged(QLocale)
  21. pitchChanged : typing.ClassVar[Signal] = ... # pitchChanged(double)
  22. rateChanged : typing.ClassVar[Signal] = ... # rateChanged(double)
  23. sayingWord : typing.ClassVar[Signal] = ... # sayingWord(QString,qsizetype,qsizetype,qsizetype)
  24. stateChanged : typing.ClassVar[Signal] = ... # stateChanged(QTextToSpeech::State)
  25. voiceChanged : typing.ClassVar[Signal] = ... # voiceChanged(QVoice)
  26. volumeChanged : typing.ClassVar[Signal] = ... # volumeChanged(double)
  27. class BoundaryHint(enum.Enum):
  28. Default = 0x0
  29. Immediate = 0x1
  30. Word = 0x2
  31. Sentence = 0x3
  32. Utterance = 0x4
  33. class Capability(enum.Flag):
  34. None_ = 0x0
  35. Speak = 0x1
  36. PauseResume = 0x2
  37. WordByWordProgress = 0x4
  38. Synthesize = 0x8
  39. class ErrorReason(enum.Enum):
  40. NoError = 0x0
  41. Initialization = 0x1
  42. Configuration = 0x2
  43. Input = 0x3
  44. Playback = 0x4
  45. class State(enum.Enum):
  46. Ready = 0x0
  47. Speaking = 0x1
  48. Paused = 0x2
  49. Error = 0x3
  50. Synthesizing = 0x4
  51. @typing.overload
  52. def __init__(self, engine: str, params: typing.Dict[str, typing.Any], /, parent: PySide6.QtCore.QObject | None = ..., *, state: PySide6.QtTextToSpeech.QTextToSpeech.State | None = ..., volume: float | None = ..., rate: float | None = ..., pitch: float | None = ..., locale: PySide6.QtCore.QLocale | None = ..., voice: PySide6.QtTextToSpeech.QVoice | None = ..., engineCapabilities: PySide6.QtTextToSpeech.QTextToSpeech.Capability | None = ...) -> None: ...
  53. @typing.overload
  54. def __init__(self, engine: str, /, parent: PySide6.QtCore.QObject | None = ..., *, state: PySide6.QtTextToSpeech.QTextToSpeech.State | None = ..., volume: float | None = ..., rate: float | None = ..., pitch: float | None = ..., locale: PySide6.QtCore.QLocale | None = ..., voice: PySide6.QtTextToSpeech.QVoice | None = ..., engineCapabilities: PySide6.QtTextToSpeech.QTextToSpeech.Capability | None = ...) -> None: ...
  55. @typing.overload
  56. def __init__(self, /, parent: PySide6.QtCore.QObject | None = ..., *, engine: str | None = ..., state: PySide6.QtTextToSpeech.QTextToSpeech.State | None = ..., volume: float | None = ..., rate: float | None = ..., pitch: float | None = ..., locale: PySide6.QtCore.QLocale | None = ..., voice: PySide6.QtTextToSpeech.QVoice | None = ..., engineCapabilities: PySide6.QtTextToSpeech.QTextToSpeech.Capability | None = ...) -> None: ...
  57. def allVoices(self, locale: PySide6.QtCore.QLocale | PySide6.QtCore.QLocale.Language, /) -> typing.List[PySide6.QtTextToSpeech.QVoice]: ...
  58. @staticmethod
  59. def availableEngines() -> typing.List[str]: ...
  60. def availableLocales(self, /) -> typing.List[PySide6.QtCore.QLocale]: ...
  61. def availableVoices(self, /) -> typing.List[PySide6.QtTextToSpeech.QVoice]: ...
  62. def engine(self, /) -> str: ...
  63. def engineCapabilities(self, /) -> PySide6.QtTextToSpeech.QTextToSpeech.Capability: ...
  64. def enqueue(self, text: str, /) -> int: ...
  65. def errorReason(self, /) -> PySide6.QtTextToSpeech.QTextToSpeech.ErrorReason: ...
  66. def errorString(self, /) -> str: ...
  67. def locale(self, /) -> PySide6.QtCore.QLocale: ...
  68. def pause(self, /, boundaryHint: PySide6.QtTextToSpeech.QTextToSpeech.BoundaryHint = ...) -> None: ...
  69. def pitch(self, /) -> float: ...
  70. def rate(self, /) -> float: ...
  71. def resume(self, /) -> None: ...
  72. def say(self, text: str, /) -> None: ...
  73. def setEngine(self, engine: str, /, params: typing.Dict[str, typing.Any] = ...) -> bool: ...
  74. def setLocale(self, locale: PySide6.QtCore.QLocale | PySide6.QtCore.QLocale.Language, /) -> None: ...
  75. def setPitch(self, pitch: float, /) -> None: ...
  76. def setRate(self, rate: float, /) -> None: ...
  77. def setVoice(self, voice: PySide6.QtTextToSpeech.QVoice, /) -> None: ...
  78. def setVolume(self, volume: float, /) -> None: ...
  79. def state(self, /) -> PySide6.QtTextToSpeech.QTextToSpeech.State: ...
  80. def stop(self, /, boundaryHint: PySide6.QtTextToSpeech.QTextToSpeech.BoundaryHint = ...) -> None: ...
  81. def voice(self, /) -> PySide6.QtTextToSpeech.QVoice: ...
  82. def volume(self, /) -> float: ...
  83. class QTextToSpeechEngine(PySide6.QtCore.QObject):
  84. errorOccurred : typing.ClassVar[Signal] = ... # errorOccurred(QTextToSpeech::ErrorReason,QString)
  85. sayingWord : typing.ClassVar[Signal] = ... # sayingWord(QString,qsizetype,qsizetype)
  86. stateChanged : typing.ClassVar[Signal] = ... # stateChanged(QTextToSpeech::State)
  87. synthesized : typing.ClassVar[Signal] = ... # synthesized(QAudioFormat,QByteArray)
  88. def __init__(self, /, parent: PySide6.QtCore.QObject | None = ...) -> None: ...
  89. def availableLocales(self, /) -> typing.List[PySide6.QtCore.QLocale]: ...
  90. def availableVoices(self, /) -> typing.List[PySide6.QtTextToSpeech.QVoice]: ...
  91. def capabilities(self, /) -> PySide6.QtTextToSpeech.QTextToSpeech.Capability: ...
  92. @staticmethod
  93. def createVoice(name: str, locale: PySide6.QtCore.QLocale | PySide6.QtCore.QLocale.Language, gender: PySide6.QtTextToSpeech.QVoice.Gender, age: PySide6.QtTextToSpeech.QVoice.Age, data: typing.Any, /) -> PySide6.QtTextToSpeech.QVoice: ...
  94. def errorReason(self, /) -> PySide6.QtTextToSpeech.QTextToSpeech.ErrorReason: ...
  95. def errorString(self, /) -> str: ...
  96. def locale(self, /) -> PySide6.QtCore.QLocale: ...
  97. def pause(self, boundaryHint: PySide6.QtTextToSpeech.QTextToSpeech.BoundaryHint, /) -> None: ...
  98. def pitch(self, /) -> float: ...
  99. def rate(self, /) -> float: ...
  100. def resume(self, /) -> None: ...
  101. def say(self, text: str, /) -> None: ...
  102. def setLocale(self, locale: PySide6.QtCore.QLocale | PySide6.QtCore.QLocale.Language, /) -> bool: ...
  103. def setPitch(self, pitch: float, /) -> bool: ...
  104. def setRate(self, rate: float, /) -> bool: ...
  105. def setVoice(self, voice: PySide6.QtTextToSpeech.QVoice, /) -> bool: ...
  106. def setVolume(self, volume: float, /) -> bool: ...
  107. def state(self, /) -> PySide6.QtTextToSpeech.QTextToSpeech.State: ...
  108. def stop(self, boundaryHint: PySide6.QtTextToSpeech.QTextToSpeech.BoundaryHint, /) -> None: ...
  109. def synthesize(self, text: str, /) -> None: ...
  110. def voice(self, /) -> PySide6.QtTextToSpeech.QVoice: ...
  111. @staticmethod
  112. def voiceData(voice: PySide6.QtTextToSpeech.QVoice, /) -> typing.Any: ...
  113. def volume(self, /) -> float: ...
  114. class QVoice(Shiboken.Object):
  115. class Age(enum.Enum):
  116. Child = 0x0
  117. Teenager = 0x1
  118. Adult = 0x2
  119. Senior = 0x3
  120. Other = 0x4
  121. class Gender(enum.Enum):
  122. Male = 0x0
  123. Female = 0x1
  124. Unknown = 0x2
  125. @typing.overload
  126. def __init__(self, other: PySide6.QtTextToSpeech.QVoice, /, *, name: str | None = ..., gender: PySide6.QtTextToSpeech.QVoice.Gender | None = ..., age: PySide6.QtTextToSpeech.QVoice.Age | None = ..., locale: PySide6.QtCore.QLocale | None = ..., language: PySide6.QtCore.QLocale.Language | None = ...) -> None: ...
  127. @typing.overload
  128. def __init__(self, /, *, name: str | None = ..., gender: PySide6.QtTextToSpeech.QVoice.Gender | None = ..., age: PySide6.QtTextToSpeech.QVoice.Age | None = ..., locale: PySide6.QtCore.QLocale | None = ..., language: PySide6.QtCore.QLocale.Language | None = ...) -> None: ...
  129. def __copy__(self, /) -> typing.Self: ...
  130. def __eq__(self, rhs: PySide6.QtTextToSpeech.QVoice, /) -> bool: ...
  131. def __lshift__(self, str: PySide6.QtCore.QDataStream, /) -> PySide6.QtCore.QDataStream: ...
  132. def __ne__(self, rhs: PySide6.QtTextToSpeech.QVoice, /) -> bool: ...
  133. def __repr__(self, /) -> str: ...
  134. def __rshift__(self, str: PySide6.QtCore.QDataStream, /) -> PySide6.QtCore.QDataStream: ...
  135. def age(self, /) -> PySide6.QtTextToSpeech.QVoice.Age: ...
  136. @staticmethod
  137. def ageName(age: PySide6.QtTextToSpeech.QVoice.Age, /) -> str: ...
  138. def gender(self, /) -> PySide6.QtTextToSpeech.QVoice.Gender: ...
  139. @staticmethod
  140. def genderName(gender: PySide6.QtTextToSpeech.QVoice.Gender, /) -> str: ...
  141. def language(self, /) -> PySide6.QtCore.QLocale.Language: ...
  142. def locale(self, /) -> PySide6.QtCore.QLocale: ...
  143. def name(self, /) -> str: ...
  144. def swap(self, other: PySide6.QtTextToSpeech.QVoice, /) -> None: ...
  145. # eof