vocalstack 1.0.0a10__tar.gz → 1.0.0a11__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {vocalstack-1.0.0a10 → vocalstack-1.0.0a11}/PKG-INFO +1 -1
- {vocalstack-1.0.0a10 → vocalstack-1.0.0a11}/pyproject.toml +1 -1
- {vocalstack-1.0.0a10 → vocalstack-1.0.0a11}/src/vocalstack/__init__.py +1 -1
- {vocalstack-1.0.0a10 → vocalstack-1.0.0a11}/src/vocalstack/_models.py +1 -1
- {vocalstack-1.0.0a10 → vocalstack-1.0.0a11}/src/vocalstack/realtime.py +6 -1
- {vocalstack-1.0.0a10 → vocalstack-1.0.0a11}/.gitignore +0 -0
- {vocalstack-1.0.0a10 → vocalstack-1.0.0a11}/LICENSE +0 -0
- {vocalstack-1.0.0a10 → vocalstack-1.0.0a11}/README.md +0 -0
- {vocalstack-1.0.0a10 → vocalstack-1.0.0a11}/SKILL.md +0 -0
- {vocalstack-1.0.0a10 → vocalstack-1.0.0a11}/skills/vocalstack/SKILL.md +0 -0
- {vocalstack-1.0.0a10 → vocalstack-1.0.0a11}/src/vocalstack/_http.py +0 -0
- {vocalstack-1.0.0a10 → vocalstack-1.0.0a11}/src/vocalstack/client.py +0 -0
- {vocalstack-1.0.0a10 → vocalstack-1.0.0a11}/src/vocalstack/errors.py +0 -0
- {vocalstack-1.0.0a10 → vocalstack-1.0.0a11}/src/vocalstack/resources.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: vocalstack
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.0a11
|
|
4
4
|
Summary: VocalStack speech API SDK (asyncio): one client grouped by resource, typed models from the API contract, realtime WebSocket streaming.
|
|
5
5
|
Project-URL: Homepage, https://vocalstack.com
|
|
6
6
|
License-Expression: MIT
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "vocalstack"
|
|
7
|
-
version = "1.0.
|
|
7
|
+
version = "1.0.0a11"
|
|
8
8
|
description = "VocalStack speech API SDK (asyncio): one client grouped by resource, typed models from the API contract, realtime WebSocket streaming."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
@@ -1516,7 +1516,6 @@ class SessionOptions(_Base):
|
|
|
1516
1516
|
translate: Optional[List[str]] = None
|
|
1517
1517
|
voice: Optional[List[str]] = None
|
|
1518
1518
|
voice_by_lang: Optional[Dict[str, str]] = Field(default=None, alias="voiceByLang")
|
|
1519
|
-
voice_cast: Optional[bool] = Field(default=None, alias="voiceCast")
|
|
1520
1519
|
voice_cloning: Optional[bool] = Field(default=None, alias="voiceCloning")
|
|
1521
1520
|
|
|
1522
1521
|
|
|
@@ -1874,6 +1873,7 @@ class VoiceCatalogue(_Base):
|
|
|
1874
1873
|
|
|
1875
1874
|
|
|
1876
1875
|
class VoiceTrack(_Base):
|
|
1876
|
+
chosen_for: Optional[List[str]] = Field(default=None, alias="chosenFor")
|
|
1877
1877
|
clip_dur: Optional[Dict[str, float]] = Field(default=None, alias="clipDur")
|
|
1878
1878
|
clip_parts: Optional[Dict[str, int]] = Field(default=None, alias="clipParts")
|
|
1879
1879
|
clip_rev: Optional[Dict[str, str]] = Field(default=None, alias="clipRev")
|
|
@@ -57,6 +57,7 @@ RESTART_CLOSE = 1012
|
|
|
57
57
|
LOST_WAITS_S = [1.0, 2.0, 4.0, 8.0, 15.0, 15.0, 15.0, 15.0]
|
|
58
58
|
RESTART_TRIES = 3
|
|
59
59
|
STEADY_S = 30.0
|
|
60
|
+
EARLY_RECOVERIES = 1
|
|
60
61
|
MAX_PENDING_BYTES = 4 * 1024 * 1024
|
|
61
62
|
|
|
62
63
|
|
|
@@ -91,6 +92,7 @@ class RealtimeSession:
|
|
|
91
92
|
self._reconnecting = False
|
|
92
93
|
self._reconnects = 0
|
|
93
94
|
self._opened_at = time.monotonic()
|
|
95
|
+
self._early_recoveries = 0
|
|
94
96
|
self._pending: List[Union[str, bytes]] = []
|
|
95
97
|
self._pending_bytes = 0
|
|
96
98
|
|
|
@@ -354,7 +356,10 @@ class RealtimeSession:
|
|
|
354
356
|
self._error = err
|
|
355
357
|
raise
|
|
356
358
|
continue
|
|
357
|
-
|
|
359
|
+
young = time.monotonic() - self._opened_at < STEADY_S
|
|
360
|
+
if e.rcvd is None and (not young or self._early_recoveries < EARLY_RECOVERIES):
|
|
361
|
+
if young:
|
|
362
|
+
self._early_recoveries += 1
|
|
358
363
|
try:
|
|
359
364
|
await self._recover()
|
|
360
365
|
except VocalStackError as err:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|