spatialreal 0.3.0__tar.gz → 0.4.0__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.
- {spatialreal-0.3.0 → spatialreal-0.4.0}/PKG-INFO +35 -25
- {spatialreal-0.3.0 → spatialreal-0.4.0}/README.md +34 -24
- {spatialreal-0.3.0 → spatialreal-0.4.0}/spatialreal/config.py +13 -5
- spatialreal-0.4.0/spatialreal/version.py +1 -0
- spatialreal-0.3.0/spatialreal/version.py +0 -1
- {spatialreal-0.3.0 → spatialreal-0.4.0}/.gitignore +0 -0
- {spatialreal-0.3.0 → spatialreal-0.4.0}/LICENSE +0 -0
- {spatialreal-0.3.0 → spatialreal-0.4.0}/pyproject.toml +0 -0
- {spatialreal-0.3.0 → spatialreal-0.4.0}/spatialreal/__init__.py +0 -0
- {spatialreal-0.3.0 → spatialreal-0.4.0}/spatialreal/environments.py +0 -0
- {spatialreal-0.3.0 → spatialreal-0.4.0}/spatialreal/errors.py +0 -0
- {spatialreal-0.3.0 → spatialreal-0.4.0}/spatialreal/events.py +0 -0
- {spatialreal-0.3.0 → spatialreal-0.4.0}/spatialreal/logid.py +0 -0
- {spatialreal-0.3.0 → spatialreal-0.4.0}/spatialreal/proto/__init__.py +0 -0
- {spatialreal-0.3.0 → spatialreal-0.4.0}/spatialreal/proto/generated/__init__.py +0 -0
- {spatialreal-0.3.0 → spatialreal-0.4.0}/spatialreal/proto/generated/message_pb2.py +0 -0
- {spatialreal-0.3.0 → spatialreal-0.4.0}/spatialreal/proto/generated/message_pb2.pyi +0 -0
- {spatialreal-0.3.0 → spatialreal-0.4.0}/spatialreal/py.typed +0 -0
- {spatialreal-0.3.0 → spatialreal-0.4.0}/spatialreal/session.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: spatialreal
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: SpatialReal Python SDK — realtime avatar sessions (audio in, animation/egress out)
|
|
5
5
|
Project-URL: Documentation, https://docs.spatialreal.ai
|
|
6
6
|
Project-URL: Website, https://www.spatialreal.ai/
|
|
@@ -64,30 +64,33 @@ await session.interrupt() # interrupts the latest request
|
|
|
64
64
|
await session.close()
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
-
### Agora
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
`start()` requires
|
|
75
|
-
|
|
76
|
-
(`protocolError`, `websocket_handshake`,
|
|
77
|
-
|
|
78
|
-
retryable
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
`
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
67
|
+
### Agora playback defaults
|
|
68
|
+
|
|
69
|
+
`AgoraEgressConfig(channel_name=..., token=..., uid=...)` defaults to
|
|
70
|
+
`source_timeline_only=True` and `BOUNDED_BURST_V1`. Current SpatialReal Web SDK
|
|
71
|
+
viewers detect this profile from the actual media, so no playback flags are
|
|
72
|
+
needed on either side. Audio input formats and sample rates are unchanged.
|
|
73
|
+
|
|
74
|
+
Before sending audio, `start()` requires both `agora_source_timeline_only` and
|
|
75
|
+
`agora_source_burst_v1` in the server's actual confirmation. Missing acceptance
|
|
76
|
+
raises `UnsupportedConfigurationError` (`protocolError`, `websocket_handshake`,
|
|
77
|
+
not retryable) and closes the connection. Policy rejection (`1008`) is also not
|
|
78
|
+
retryable; ordinary transport failures retain their existing retry policy.
|
|
79
|
+
`session.capabilities` is the read-only tuple from the handshake.
|
|
80
|
+
|
|
81
|
+
For older viewers that require native audio, explicitly set
|
|
82
|
+
`source_timeline_only=False`; the omitted profile then resolves to
|
|
83
|
+
`RtcSourcePlaybackProfile.UNSPECIFIED`/0. An explicit `source_playback_profile=0`
|
|
84
|
+
with source-only enabled preserves the earlier source-only contract. `None`
|
|
85
|
+
selects the profile from `source_timeline_only`; booleans and unknown profile
|
|
86
|
+
values are rejected. Burst with source-only disabled is invalid.
|
|
87
|
+
|
|
88
|
+
This changes the default for Agora publishers and requires a compatible server
|
|
89
|
+
and viewer SDK. The publisher handshake cannot discover or upgrade room viewers.
|
|
90
|
+
An incompatible server fails explicitly rather than silently falling back. Use a
|
|
91
|
+
Web SDK build with automatic profile detection, or explicitly configure
|
|
92
|
+
`agora.sourcePlaybackProfile: "bounded-burst-v1"` on Web SDK 1.0.0-beta.6.
|
|
93
|
+
Upgrading the publisher alone does not upgrade existing viewers.
|
|
91
94
|
|
|
92
95
|
### Pause / resume (egress mode)
|
|
93
96
|
|
|
@@ -127,6 +130,13 @@ implements the server's WebSocket close-code contract (40xx: don't retry,
|
|
|
127
130
|
|
|
128
131
|
## What's new
|
|
129
132
|
|
|
133
|
+
- 0.4.0: **Behaviour change** — the Agora publisher default is now source-timeline-only
|
|
134
|
+
playback with the bounded burst profile: a plain `AgoraEgressConfig(channel_name=..., token=..., uid=...)`
|
|
135
|
+
requests `source_timeline_only=True` and `BOUNDED_BURST_V1`. Viewers need a Web SDK with
|
|
136
|
+
automatic profile detection (1.0.0-beta.7+), or must set
|
|
137
|
+
`agora.sourcePlaybackProfile: 'bounded-burst-v1'` explicitly on 1.0.0-beta.6. Pass
|
|
138
|
+
`source_timeline_only=False` for compatibility mode (older/native-audio viewers); the
|
|
139
|
+
omitted profile then resolves to zero. Server capability checks remain mandatory.
|
|
130
140
|
- 0.3.0: Agora source playback negotiation. `AgoraEgressConfig(source_timeline_only=True)`
|
|
131
141
|
requests source-timeline-only playback; `source_playback_profile=RtcSourcePlaybackProfile.BOUNDED_BURST_V1`
|
|
132
142
|
requests the bounded source playback profile. `start()` refuses the session
|
|
@@ -31,30 +31,33 @@ await session.interrupt() # interrupts the latest request
|
|
|
31
31
|
await session.close()
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
### Agora
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
`start()` requires
|
|
42
|
-
|
|
43
|
-
(`protocolError`, `websocket_handshake`,
|
|
44
|
-
|
|
45
|
-
retryable
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
`
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
34
|
+
### Agora playback defaults
|
|
35
|
+
|
|
36
|
+
`AgoraEgressConfig(channel_name=..., token=..., uid=...)` defaults to
|
|
37
|
+
`source_timeline_only=True` and `BOUNDED_BURST_V1`. Current SpatialReal Web SDK
|
|
38
|
+
viewers detect this profile from the actual media, so no playback flags are
|
|
39
|
+
needed on either side. Audio input formats and sample rates are unchanged.
|
|
40
|
+
|
|
41
|
+
Before sending audio, `start()` requires both `agora_source_timeline_only` and
|
|
42
|
+
`agora_source_burst_v1` in the server's actual confirmation. Missing acceptance
|
|
43
|
+
raises `UnsupportedConfigurationError` (`protocolError`, `websocket_handshake`,
|
|
44
|
+
not retryable) and closes the connection. Policy rejection (`1008`) is also not
|
|
45
|
+
retryable; ordinary transport failures retain their existing retry policy.
|
|
46
|
+
`session.capabilities` is the read-only tuple from the handshake.
|
|
47
|
+
|
|
48
|
+
For older viewers that require native audio, explicitly set
|
|
49
|
+
`source_timeline_only=False`; the omitted profile then resolves to
|
|
50
|
+
`RtcSourcePlaybackProfile.UNSPECIFIED`/0. An explicit `source_playback_profile=0`
|
|
51
|
+
with source-only enabled preserves the earlier source-only contract. `None`
|
|
52
|
+
selects the profile from `source_timeline_only`; booleans and unknown profile
|
|
53
|
+
values are rejected. Burst with source-only disabled is invalid.
|
|
54
|
+
|
|
55
|
+
This changes the default for Agora publishers and requires a compatible server
|
|
56
|
+
and viewer SDK. The publisher handshake cannot discover or upgrade room viewers.
|
|
57
|
+
An incompatible server fails explicitly rather than silently falling back. Use a
|
|
58
|
+
Web SDK build with automatic profile detection, or explicitly configure
|
|
59
|
+
`agora.sourcePlaybackProfile: "bounded-burst-v1"` on Web SDK 1.0.0-beta.6.
|
|
60
|
+
Upgrading the publisher alone does not upgrade existing viewers.
|
|
58
61
|
|
|
59
62
|
### Pause / resume (egress mode)
|
|
60
63
|
|
|
@@ -94,6 +97,13 @@ implements the server's WebSocket close-code contract (40xx: don't retry,
|
|
|
94
97
|
|
|
95
98
|
## What's new
|
|
96
99
|
|
|
100
|
+
- 0.4.0: **Behaviour change** — the Agora publisher default is now source-timeline-only
|
|
101
|
+
playback with the bounded burst profile: a plain `AgoraEgressConfig(channel_name=..., token=..., uid=...)`
|
|
102
|
+
requests `source_timeline_only=True` and `BOUNDED_BURST_V1`. Viewers need a Web SDK with
|
|
103
|
+
automatic profile detection (1.0.0-beta.7+), or must set
|
|
104
|
+
`agora.sourcePlaybackProfile: 'bounded-burst-v1'` explicitly on 1.0.0-beta.6. Pass
|
|
105
|
+
`source_timeline_only=False` for compatibility mode (older/native-audio viewers); the
|
|
106
|
+
omitted profile then resolves to zero. Server capability checks remain mandatory.
|
|
97
107
|
- 0.3.0: Agora source playback negotiation. `AgoraEgressConfig(source_timeline_only=True)`
|
|
98
108
|
requests source-timeline-only playback; `source_playback_profile=RtcSourcePlaybackProfile.BOUNDED_BURST_V1`
|
|
99
109
|
requests the bounded source playback profile. `start()` refuses the session
|
|
@@ -13,7 +13,7 @@ from .proto.generated import message_pb2
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
class RtcSourcePlaybackProfile(IntEnum):
|
|
16
|
-
"""
|
|
16
|
+
"""Source playback contract; current Web SDK viewers detect it automatically."""
|
|
17
17
|
|
|
18
18
|
UNSPECIFIED = message_pb2.RTC_SOURCE_PLAYBACK_PROFILE_UNSPECIFIED
|
|
19
19
|
BOUNDED_BURST_V1 = message_pb2.RTC_SOURCE_PLAYBACK_PROFILE_BOUNDED_BURST_V1
|
|
@@ -60,14 +60,22 @@ class AgoraEgressConfig:
|
|
|
60
60
|
token: str = field(default="", repr=False)
|
|
61
61
|
uid: int = 0
|
|
62
62
|
publisher_id: str = ""
|
|
63
|
-
#
|
|
64
|
-
# The server must explicitly acknowledge
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
# Current viewers play source-timeline audio and manage entry locally.
|
|
64
|
+
# The server must explicitly acknowledge both capabilities before start.
|
|
65
|
+
# Set source_timeline_only=False for legacy/native-audio viewers.
|
|
66
|
+
source_timeline_only: bool = True
|
|
67
|
+
# None selects burst with source-only, otherwise the compatibility profile.
|
|
68
|
+
source_playback_profile: RtcSourcePlaybackProfile | None = None
|
|
67
69
|
|
|
68
70
|
def __post_init__(self) -> None:
|
|
69
71
|
if not isinstance(self.source_timeline_only, bool):
|
|
70
72
|
raise ValueError("source_timeline_only must be a boolean")
|
|
73
|
+
if self.source_playback_profile is None:
|
|
74
|
+
self.source_playback_profile = (
|
|
75
|
+
RtcSourcePlaybackProfile.BOUNDED_BURST_V1
|
|
76
|
+
if self.source_timeline_only
|
|
77
|
+
else RtcSourcePlaybackProfile.UNSPECIFIED
|
|
78
|
+
)
|
|
71
79
|
if isinstance(self.source_playback_profile, bool) or not isinstance(self.source_playback_profile, int):
|
|
72
80
|
raise ValueError("source_playback_profile must be a known RtcSourcePlaybackProfile")
|
|
73
81
|
try:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.4.0"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.3.0"
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|