livekit-plugins-hedra 1.2.1__py3-none-any.whl → 1.2.3__py3-none-any.whl

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.

Potentially problematic release.


This version of livekit-plugins-hedra might be problematic. Click here for more details.

@@ -25,6 +25,7 @@ from livekit.agents.voice.room_io import ATTRIBUTE_PUBLISH_ON_BEHALF
25
25
  from .log import logger
26
26
 
27
27
  DEFAULT_API_URL = "https://api.hedra.com/public/livekit/v1/session"
28
+ SAMPLE_RATE = 16000
28
29
  _AVATAR_AGENT_IDENTITY = "hedra-avatar-agent"
29
30
  _AVATAR_AGENT_NAME = "hedra-avatar-agent"
30
31
 
@@ -91,13 +92,10 @@ class AvatarSession:
91
92
 
92
93
  try:
93
94
  job_ctx = get_job_context()
94
- decoded = job_ctx.decode_token()
95
- local_participant_identity = decoded["sub"]
96
- except (RuntimeError, KeyError):
95
+ local_participant_identity = job_ctx.token_claims().identity
96
+ except RuntimeError as e:
97
97
  if not room.isconnected():
98
- raise HedraException(
99
- "local participant identity not found in token, and room is not connected"
100
- ) from None
98
+ raise HedraException("failed to get local participant identity") from e
101
99
  local_participant_identity = room.local_participant.identity
102
100
 
103
101
  livekit_token = (
@@ -118,6 +116,7 @@ class AvatarSession:
118
116
  room=room,
119
117
  destination_identity=self._avatar_participant_identity,
120
118
  wait_remote_track=rtc.TrackKind.KIND_VIDEO,
119
+ sample_rate=SAMPLE_RATE,
121
120
  )
122
121
 
123
122
  async def _start_agent(self, livekit_url: str, livekit_token: str) -> None:
@@ -12,4 +12,4 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- __version__ = "1.2.1"
15
+ __version__ = "1.2.3"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: livekit-plugins-hedra
3
- Version: 1.2.1
3
+ Version: 1.2.3
4
4
  Summary: Agent Framework plugin for Hedra Avatar
5
5
  Project-URL: Documentation, https://docs.livekit.io
6
6
  Project-URL: Website, https://livekit.io/
@@ -18,7 +18,7 @@ Classifier: Topic :: Multimedia :: Sound/Audio
18
18
  Classifier: Topic :: Multimedia :: Video
19
19
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
20
20
  Requires-Python: >=3.9.0
21
- Requires-Dist: livekit-agents>=1.2.1
21
+ Requires-Dist: livekit-agents>=1.2.3
22
22
  Description-Content-Type: text/markdown
23
23
 
24
24
  # Hedra plugin for LiveKit Agents
@@ -0,0 +1,8 @@
1
+ livekit/plugins/hedra/__init__.py,sha256=L8F2XyHfOLqeB6Y4iSvQNCUOW5KKIBw6HgF5MNCdvNY,969
2
+ livekit/plugins/hedra/avatar.py,sha256=1QRRWAhcjeJ9UR1AV_2oVs6pLB9fZARPVhr5XvNyqDI,6335
3
+ livekit/plugins/hedra/log.py,sha256=vh-X7bs38yHVN8TNZcWVBvBcnALN-M_UGvWIgI6zi7k,68
4
+ livekit/plugins/hedra/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ livekit/plugins/hedra/version.py,sha256=q6TeVtPmYYde9qUmPkvMLTyq0Co9PuLVrfkIMbUmJU4,600
6
+ livekit_plugins_hedra-1.2.3.dist-info/METADATA,sha256=1OtaaPQemy7v2Tc3v34NyeKn1ewXlQFx8i01A1Knlgo,1391
7
+ livekit_plugins_hedra-1.2.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8
+ livekit_plugins_hedra-1.2.3.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- livekit/plugins/hedra/__init__.py,sha256=L8F2XyHfOLqeB6Y4iSvQNCUOW5KKIBw6HgF5MNCdvNY,969
2
- livekit/plugins/hedra/avatar.py,sha256=bQvf68SGT0YcDKuu4yRxgHQCQFHuTpY9v9HNEUlDp2I,6386
3
- livekit/plugins/hedra/log.py,sha256=vh-X7bs38yHVN8TNZcWVBvBcnALN-M_UGvWIgI6zi7k,68
4
- livekit/plugins/hedra/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- livekit/plugins/hedra/version.py,sha256=O_wUdeY-Wvo2hzH58zQgTJSr6TW4LXGw4T8k9iBNCSg,600
6
- livekit_plugins_hedra-1.2.1.dist-info/METADATA,sha256=hE6tjI23a7P0C-R1VyzYLq1RTMjiCJI4_aON6m_YfvI,1391
7
- livekit_plugins_hedra-1.2.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8
- livekit_plugins_hedra-1.2.1.dist-info/RECORD,,