Improve type support a bit more (#333)
Also fix default voice for util.py Signed-off-by: rany <rany2@riseup.net>
This commit is contained in:
@@ -78,15 +78,24 @@ class Voice(TypedDict):
|
||||
VoiceTag: VoiceTag
|
||||
|
||||
|
||||
class VoiceManagerVoice(Voice):
|
||||
"""Voice data for VoiceManager."""
|
||||
class VoicesManagerVoice(Voice):
|
||||
"""Voice data for VoicesManager."""
|
||||
|
||||
Language: str
|
||||
|
||||
|
||||
class VoiceManagerFind(TypedDict):
|
||||
"""Voice data for VoiceManager.find()."""
|
||||
class VoicesManagerFind(TypedDict):
|
||||
"""Voice data for VoicesManager.find()."""
|
||||
|
||||
Gender: NotRequired[Literal["Female", "Male"]]
|
||||
Locale: NotRequired[str]
|
||||
Language: NotRequired[str]
|
||||
|
||||
|
||||
class CommunicateState(TypedDict):
|
||||
"""Communicate state data."""
|
||||
|
||||
partial_text: bytes
|
||||
offset_compensation: float
|
||||
last_duration_offset: float
|
||||
stream_was_called: bool
|
||||
|
||||
Reference in New Issue
Block a user