livekit-plugins-aws 1.2.11__py3-none-any.whl → 1.2.12__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-aws might be problematic. Click here for more details.
- livekit/plugins/aws/experimental/realtime/realtime_model.py +12 -5
- livekit/plugins/aws/llm.py +4 -0
- livekit/plugins/aws/stt.py +12 -0
- livekit/plugins/aws/tts.py +8 -0
- livekit/plugins/aws/version.py +1 -1
- {livekit_plugins_aws-1.2.11.dist-info → livekit_plugins_aws-1.2.12.dist-info}/METADATA +2 -2
- {livekit_plugins_aws-1.2.11.dist-info → livekit_plugins_aws-1.2.12.dist-info}/RECORD +8 -8
- {livekit_plugins_aws-1.2.11.dist-info → livekit_plugins_aws-1.2.12.dist-info}/WHEEL +0 -0
|
@@ -40,6 +40,7 @@ from livekit.agents import (
|
|
|
40
40
|
utils,
|
|
41
41
|
)
|
|
42
42
|
from livekit.agents.metrics import RealtimeModelMetrics
|
|
43
|
+
from livekit.agents.metrics.base import Metadata
|
|
43
44
|
from livekit.agents.types import NOT_GIVEN, NotGivenOr
|
|
44
45
|
from livekit.agents.utils import is_given
|
|
45
46
|
from livekit.plugins.aws.experimental.realtime.turn_tracker import _TurnTracker
|
|
@@ -259,6 +260,14 @@ class RealtimeModel(llm.RealtimeModel):
|
|
|
259
260
|
)
|
|
260
261
|
self._sessions = weakref.WeakSet[RealtimeSession]()
|
|
261
262
|
|
|
263
|
+
@property
|
|
264
|
+
def model(self) -> str:
|
|
265
|
+
return self.model_id
|
|
266
|
+
|
|
267
|
+
@property
|
|
268
|
+
def provider(self) -> str:
|
|
269
|
+
return "Amazon"
|
|
270
|
+
|
|
262
271
|
def session(self) -> RealtimeSession:
|
|
263
272
|
"""Return a new RealtimeSession bound to this model instance."""
|
|
264
273
|
sess = RealtimeSession(self)
|
|
@@ -273,10 +282,6 @@ class RealtimeModel(llm.RealtimeModel):
|
|
|
273
282
|
async def aclose(self) -> None:
|
|
274
283
|
pass
|
|
275
284
|
|
|
276
|
-
@property
|
|
277
|
-
def model(self) -> str:
|
|
278
|
-
return self.model_id
|
|
279
|
-
|
|
280
285
|
|
|
281
286
|
class RealtimeSession( # noqa: F811
|
|
282
287
|
llm.RealtimeSession[Literal["bedrock_server_event_received", "bedrock_client_event_queued"]]
|
|
@@ -871,7 +876,6 @@ class RealtimeSession( # noqa: F811
|
|
|
871
876
|
# Q: should we be counting per turn or utterance?
|
|
872
877
|
metrics = RealtimeModelMetrics(
|
|
873
878
|
label=self._realtime_model.label,
|
|
874
|
-
model=self._realtime_model.model,
|
|
875
879
|
# TODO: pass in the correct request_id
|
|
876
880
|
request_id=event_data["event"]["usageEvent"]["completionId"],
|
|
877
881
|
timestamp=time.monotonic(),
|
|
@@ -898,6 +902,9 @@ class RealtimeSession( # noqa: F811
|
|
|
898
902
|
audio_tokens=output_tokens["speechTokens"],
|
|
899
903
|
image_tokens=0,
|
|
900
904
|
),
|
|
905
|
+
metadata=Metadata(
|
|
906
|
+
model_name=self._realtime_model.model, model_provider=self._realtime_model.provider
|
|
907
|
+
),
|
|
901
908
|
)
|
|
902
909
|
self.emit("metrics_collected", metrics)
|
|
903
910
|
|
livekit/plugins/aws/llm.py
CHANGED
livekit/plugins/aws/stt.py
CHANGED
|
@@ -94,6 +94,18 @@ class STT(stt.STT):
|
|
|
94
94
|
region=region,
|
|
95
95
|
)
|
|
96
96
|
|
|
97
|
+
@property
|
|
98
|
+
def model(self) -> str:
|
|
99
|
+
return (
|
|
100
|
+
self._config.language_model_name
|
|
101
|
+
if is_given(self._config.language_model_name)
|
|
102
|
+
else "unknown"
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
@property
|
|
106
|
+
def provider(self) -> str:
|
|
107
|
+
return "Amazon Transcribe"
|
|
108
|
+
|
|
97
109
|
async def aclose(self) -> None:
|
|
98
110
|
await super().aclose()
|
|
99
111
|
|
livekit/plugins/aws/tts.py
CHANGED
|
@@ -107,6 +107,14 @@ class TTS(tts.TTS):
|
|
|
107
107
|
sample_rate=sample_rate,
|
|
108
108
|
)
|
|
109
109
|
|
|
110
|
+
@property
|
|
111
|
+
def model(self) -> str:
|
|
112
|
+
return self._opts.speech_engine
|
|
113
|
+
|
|
114
|
+
@property
|
|
115
|
+
def provider(self) -> str:
|
|
116
|
+
return "Amazon Polly"
|
|
117
|
+
|
|
110
118
|
def synthesize(
|
|
111
119
|
self, text: str, *, conn_options: APIConnectOptions = DEFAULT_API_CONNECT_OPTIONS
|
|
112
120
|
) -> ChunkedStream:
|
livekit/plugins/aws/version.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: livekit-plugins-aws
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.12
|
|
4
4
|
Summary: LiveKit Agents Plugin for services from AWS
|
|
5
5
|
Project-URL: Documentation, https://docs.livekit.io
|
|
6
6
|
Project-URL: Website, https://livekit.io/
|
|
@@ -20,7 +20,7 @@ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
|
20
20
|
Requires-Python: >=3.9.0
|
|
21
21
|
Requires-Dist: aioboto3>=14.1.0
|
|
22
22
|
Requires-Dist: amazon-transcribe>=0.6.4
|
|
23
|
-
Requires-Dist: livekit-agents>=1.2.
|
|
23
|
+
Requires-Dist: livekit-agents>=1.2.12
|
|
24
24
|
Provides-Extra: realtime
|
|
25
25
|
Requires-Dist: aws-sdk-bedrock-runtime==0.0.2; (python_version >= '3.12') and extra == 'realtime'
|
|
26
26
|
Requires-Dist: boto3>1.35.10; extra == 'realtime'
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
livekit/plugins/aws/__init__.py,sha256=dCZISj1yZG0WZTojk3sU-Ub4PK1ThCVhamrl9k_NbBw,2047
|
|
2
|
-
livekit/plugins/aws/llm.py,sha256=
|
|
2
|
+
livekit/plugins/aws/llm.py,sha256=9adQTcg3hJA6XTw4xaRjCIKkxedbzpNBBW0Yub9pkhA,13001
|
|
3
3
|
livekit/plugins/aws/log.py,sha256=S5ICcsnwshZhMG0HPmc_lI3mtHmcY4oQMJBsnnho-bM,289
|
|
4
4
|
livekit/plugins/aws/models.py,sha256=J4yzik9sR68RPZpR1ubRQ9hdn14D9IwA3KaRvAf5tAE,734
|
|
5
5
|
livekit/plugins/aws/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
-
livekit/plugins/aws/stt.py,sha256=
|
|
7
|
-
livekit/plugins/aws/tts.py,sha256=
|
|
6
|
+
livekit/plugins/aws/stt.py,sha256=OwHfGDFW-VtSY68my3u5dyMLRpYVZPlnVbtm-dNj4Q0,9438
|
|
7
|
+
livekit/plugins/aws/tts.py,sha256=oav-XWf9ysVGCmERWej6BgACu8vsLbRo9vFGpo9N6Ec,7184
|
|
8
8
|
livekit/plugins/aws/utils.py,sha256=nA5Ua1f4T-25Loar6EvlrKTXI9N-zpTIH7cdQkwGyGI,1518
|
|
9
|
-
livekit/plugins/aws/version.py,sha256=
|
|
9
|
+
livekit/plugins/aws/version.py,sha256=NhtcZ3HrHC6TVbG58IieJaw1vTkwefziFdDCa5-FYxs,601
|
|
10
10
|
livekit/plugins/aws/experimental/realtime/__init__.py,sha256=mm_TGZc9QAWSO-VOO3PdE8Y5R6xlWckXRZuiFUIHa-Q,287
|
|
11
11
|
livekit/plugins/aws/experimental/realtime/events.py,sha256=ltdGEipE3ZOkjn7K6rKN6WSCUPJkVg-S88mUmQ_V00s,15981
|
|
12
12
|
livekit/plugins/aws/experimental/realtime/pretty_printer.py,sha256=KN7KPrfQu8cU7ff34vFAtfrd1umUSTVNKXQU7D8AMiM,1442
|
|
13
|
-
livekit/plugins/aws/experimental/realtime/realtime_model.py,sha256=
|
|
13
|
+
livekit/plugins/aws/experimental/realtime/realtime_model.py,sha256=vieey2nDEIDaDQsTkmZ7p-NgvBaE9VlDMeQiduCkedI,60846
|
|
14
14
|
livekit/plugins/aws/experimental/realtime/turn_tracker.py,sha256=bcufaap-coeIYuK3ct1Is9W_UoefGYRmnJu7Mn5DCYU,6002
|
|
15
|
-
livekit_plugins_aws-1.2.
|
|
16
|
-
livekit_plugins_aws-1.2.
|
|
17
|
-
livekit_plugins_aws-1.2.
|
|
15
|
+
livekit_plugins_aws-1.2.12.dist-info/METADATA,sha256=l8YNbtveXIP_uJF9LhbJJXdZnLuX7mlU1xIVQvNAouQ,1991
|
|
16
|
+
livekit_plugins_aws-1.2.12.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
17
|
+
livekit_plugins_aws-1.2.12.dist-info/RECORD,,
|
|
File without changes
|