livekit-plugins-google 1.2.2__tar.gz → 1.2.3__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.
Potentially problematic release.
This version of livekit-plugins-google might be problematic. Click here for more details.
- {livekit_plugins_google-1.2.2 → livekit_plugins_google-1.2.3}/PKG-INFO +2 -2
- {livekit_plugins_google-1.2.2 → livekit_plugins_google-1.2.3}/livekit/plugins/google/beta/realtime/api_proto.py +1 -0
- {livekit_plugins_google-1.2.2 → livekit_plugins_google-1.2.3}/livekit/plugins/google/beta/realtime/realtime_api.py +17 -8
- {livekit_plugins_google-1.2.2 → livekit_plugins_google-1.2.3}/livekit/plugins/google/version.py +1 -1
- {livekit_plugins_google-1.2.2 → livekit_plugins_google-1.2.3}/pyproject.toml +1 -1
- {livekit_plugins_google-1.2.2 → livekit_plugins_google-1.2.3}/.gitignore +0 -0
- {livekit_plugins_google-1.2.2 → livekit_plugins_google-1.2.3}/README.md +0 -0
- {livekit_plugins_google-1.2.2 → livekit_plugins_google-1.2.3}/livekit/plugins/google/__init__.py +0 -0
- {livekit_plugins_google-1.2.2 → livekit_plugins_google-1.2.3}/livekit/plugins/google/beta/__init__.py +0 -0
- {livekit_plugins_google-1.2.2 → livekit_plugins_google-1.2.3}/livekit/plugins/google/beta/gemini_tts.py +0 -0
- {livekit_plugins_google-1.2.2 → livekit_plugins_google-1.2.3}/livekit/plugins/google/beta/realtime/__init__.py +0 -0
- {livekit_plugins_google-1.2.2 → livekit_plugins_google-1.2.3}/livekit/plugins/google/llm.py +0 -0
- {livekit_plugins_google-1.2.2 → livekit_plugins_google-1.2.3}/livekit/plugins/google/log.py +0 -0
- {livekit_plugins_google-1.2.2 → livekit_plugins_google-1.2.3}/livekit/plugins/google/models.py +0 -0
- {livekit_plugins_google-1.2.2 → livekit_plugins_google-1.2.3}/livekit/plugins/google/py.typed +0 -0
- {livekit_plugins_google-1.2.2 → livekit_plugins_google-1.2.3}/livekit/plugins/google/stt.py +0 -0
- {livekit_plugins_google-1.2.2 → livekit_plugins_google-1.2.3}/livekit/plugins/google/tools.py +0 -0
- {livekit_plugins_google-1.2.2 → livekit_plugins_google-1.2.3}/livekit/plugins/google/tts.py +0 -0
- {livekit_plugins_google-1.2.2 → livekit_plugins_google-1.2.3}/livekit/plugins/google/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: livekit-plugins-google
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.3
|
|
4
4
|
Summary: Agent Framework plugin for services from Google Cloud
|
|
5
5
|
Project-URL: Documentation, https://docs.livekit.io
|
|
6
6
|
Project-URL: Website, https://livekit.io/
|
|
@@ -22,7 +22,7 @@ Requires-Dist: google-auth<3,>=2
|
|
|
22
22
|
Requires-Dist: google-cloud-speech<3,>=2
|
|
23
23
|
Requires-Dist: google-cloud-texttospeech<3,>=2.27
|
|
24
24
|
Requires-Dist: google-genai>=v1.23.0
|
|
25
|
-
Requires-Dist: livekit-agents>=1.2.
|
|
25
|
+
Requires-Dist: livekit-agents>=1.2.3
|
|
26
26
|
Description-Content-Type: text/markdown
|
|
27
27
|
|
|
28
28
|
# Google AI plugin for LiveKit Agents
|
|
@@ -9,6 +9,7 @@ LiveAPIModels = Literal[
|
|
|
9
9
|
"gemini-2.0-flash-exp",
|
|
10
10
|
# models supported on Gemini API
|
|
11
11
|
"gemini-2.0-flash-live-001",
|
|
12
|
+
"gemini-live-2.5-flash-preview",
|
|
12
13
|
"gemini-2.5-flash-preview-native-audio-dialog",
|
|
13
14
|
"gemini-2.5-flash-exp-native-audio-thinking-dialog",
|
|
14
15
|
]
|
|
@@ -8,6 +8,7 @@ import time
|
|
|
8
8
|
import weakref
|
|
9
9
|
from collections.abc import Iterator
|
|
10
10
|
from dataclasses import dataclass, field
|
|
11
|
+
from typing import Literal
|
|
11
12
|
|
|
12
13
|
from google import genai
|
|
13
14
|
from google.genai import types
|
|
@@ -542,7 +543,12 @@ class RealtimeSession(llm.RealtimeSession):
|
|
|
542
543
|
self.start_user_activity()
|
|
543
544
|
|
|
544
545
|
def truncate(
|
|
545
|
-
self,
|
|
546
|
+
self,
|
|
547
|
+
*,
|
|
548
|
+
message_id: str,
|
|
549
|
+
modalities: list[Literal["text", "audio"]],
|
|
550
|
+
audio_end_ms: int,
|
|
551
|
+
audio_transcript: NotGivenOr[str] = NOT_GIVEN,
|
|
546
552
|
) -> None:
|
|
547
553
|
logger.warning("truncate is not supported by the Google Realtime API.")
|
|
548
554
|
pass
|
|
@@ -786,10 +792,6 @@ class RealtimeSession(llm.RealtimeSession):
|
|
|
786
792
|
logger.warning("starting new generation while another is active. Finalizing previous.")
|
|
787
793
|
self._mark_current_generation_done()
|
|
788
794
|
|
|
789
|
-
# emit input_speech_started event before starting a new generation
|
|
790
|
-
# to interrupt the previous audio playout if any
|
|
791
|
-
self._handle_input_speech_started()
|
|
792
|
-
|
|
793
795
|
response_id = utils.shortuuid("GR_")
|
|
794
796
|
self._current_generation = _ResponseGeneration(
|
|
795
797
|
message_ch=utils.aio.Chan[llm.MessageGeneration](),
|
|
@@ -803,11 +805,16 @@ class RealtimeSession(llm.RealtimeSession):
|
|
|
803
805
|
if not self._realtime_model.capabilities.audio_output:
|
|
804
806
|
self._current_generation.audio_ch.close()
|
|
805
807
|
|
|
808
|
+
msg_modalities = asyncio.Future[list[Literal["text", "audio"]]]()
|
|
809
|
+
msg_modalities.set_result(
|
|
810
|
+
["audio", "text"] if self._realtime_model.capabilities.audio_output else ["text"]
|
|
811
|
+
)
|
|
806
812
|
self._current_generation.message_ch.send_nowait(
|
|
807
813
|
llm.MessageGeneration(
|
|
808
814
|
message_id=response_id,
|
|
809
815
|
text_stream=self._current_generation.text_ch,
|
|
810
816
|
audio_stream=self._current_generation.audio_ch,
|
|
817
|
+
modalities=msg_modalities,
|
|
811
818
|
)
|
|
812
819
|
)
|
|
813
820
|
|
|
@@ -821,6 +828,10 @@ class RealtimeSession(llm.RealtimeSession):
|
|
|
821
828
|
generation_event.user_initiated = True
|
|
822
829
|
self._pending_generation_fut.set_result(generation_event)
|
|
823
830
|
self._pending_generation_fut = None
|
|
831
|
+
else:
|
|
832
|
+
# emit input_speech_started event before starting an agent initiated generation
|
|
833
|
+
# to interrupt the previous audio playout if any
|
|
834
|
+
self._handle_input_speech_started()
|
|
824
835
|
|
|
825
836
|
self.emit("generation_created", generation_event)
|
|
826
837
|
|
|
@@ -936,9 +947,7 @@ class RealtimeSession(llm.RealtimeSession):
|
|
|
936
947
|
def _handle_input_speech_stopped(self) -> None:
|
|
937
948
|
self.emit(
|
|
938
949
|
"input_speech_stopped",
|
|
939
|
-
llm.InputSpeechStoppedEvent(
|
|
940
|
-
user_transcription_enabled=self._realtime_model.capabilities.user_transcription
|
|
941
|
-
),
|
|
950
|
+
llm.InputSpeechStoppedEvent(user_transcription_enabled=False),
|
|
942
951
|
)
|
|
943
952
|
|
|
944
953
|
def _handle_tool_calls(self, tool_call: types.LiveServerToolCall) -> None:
|
|
File without changes
|
|
File without changes
|
{livekit_plugins_google-1.2.2 → livekit_plugins_google-1.2.3}/livekit/plugins/google/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{livekit_plugins_google-1.2.2 → livekit_plugins_google-1.2.3}/livekit/plugins/google/models.py
RENAMED
|
File without changes
|
{livekit_plugins_google-1.2.2 → livekit_plugins_google-1.2.3}/livekit/plugins/google/py.typed
RENAMED
|
File without changes
|
|
File without changes
|
{livekit_plugins_google-1.2.2 → livekit_plugins_google-1.2.3}/livekit/plugins/google/tools.py
RENAMED
|
File without changes
|
|
File without changes
|
{livekit_plugins_google-1.2.2 → livekit_plugins_google-1.2.3}/livekit/plugins/google/utils.py
RENAMED
|
File without changes
|