livekit-plugins-google 1.1.7__tar.gz → 1.2.1__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.1.7 → livekit_plugins_google-1.2.1}/PKG-INFO +2 -2
- {livekit_plugins_google-1.1.7 → livekit_plugins_google-1.2.1}/livekit/plugins/google/beta/realtime/realtime_api.py +10 -5
- {livekit_plugins_google-1.1.7 → livekit_plugins_google-1.2.1}/livekit/plugins/google/llm.py +4 -0
- {livekit_plugins_google-1.1.7 → livekit_plugins_google-1.2.1}/livekit/plugins/google/tts.py +1 -2
- {livekit_plugins_google-1.1.7 → livekit_plugins_google-1.2.1}/livekit/plugins/google/version.py +1 -1
- {livekit_plugins_google-1.1.7 → livekit_plugins_google-1.2.1}/pyproject.toml +1 -1
- {livekit_plugins_google-1.1.7 → livekit_plugins_google-1.2.1}/.gitignore +0 -0
- {livekit_plugins_google-1.1.7 → livekit_plugins_google-1.2.1}/README.md +0 -0
- {livekit_plugins_google-1.1.7 → livekit_plugins_google-1.2.1}/livekit/plugins/google/__init__.py +0 -0
- {livekit_plugins_google-1.1.7 → livekit_plugins_google-1.2.1}/livekit/plugins/google/beta/__init__.py +0 -0
- {livekit_plugins_google-1.1.7 → livekit_plugins_google-1.2.1}/livekit/plugins/google/beta/gemini_tts.py +0 -0
- {livekit_plugins_google-1.1.7 → livekit_plugins_google-1.2.1}/livekit/plugins/google/beta/realtime/__init__.py +0 -0
- {livekit_plugins_google-1.1.7 → livekit_plugins_google-1.2.1}/livekit/plugins/google/beta/realtime/api_proto.py +0 -0
- {livekit_plugins_google-1.1.7 → livekit_plugins_google-1.2.1}/livekit/plugins/google/log.py +0 -0
- {livekit_plugins_google-1.1.7 → livekit_plugins_google-1.2.1}/livekit/plugins/google/models.py +0 -0
- {livekit_plugins_google-1.1.7 → livekit_plugins_google-1.2.1}/livekit/plugins/google/py.typed +0 -0
- {livekit_plugins_google-1.1.7 → livekit_plugins_google-1.2.1}/livekit/plugins/google/stt.py +0 -0
- {livekit_plugins_google-1.1.7 → livekit_plugins_google-1.2.1}/livekit/plugins/google/tools.py +0 -0
- {livekit_plugins_google-1.1.7 → livekit_plugins_google-1.2.1}/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.1
|
|
3
|
+
Version: 1.2.1
|
|
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.1
|
|
25
|
+
Requires-Dist: livekit-agents>=1.2.1
|
|
26
26
|
Description-Content-Type: text/markdown
|
|
27
27
|
|
|
28
28
|
# Google AI plugin for LiveKit Agents
|
|
@@ -52,7 +52,7 @@ class _RealtimeOptions:
|
|
|
52
52
|
api_key: str | None
|
|
53
53
|
voice: Voice | str
|
|
54
54
|
language: NotGivenOr[str]
|
|
55
|
-
response_modalities:
|
|
55
|
+
response_modalities: list[types.Modality]
|
|
56
56
|
vertexai: bool
|
|
57
57
|
project: str | None
|
|
58
58
|
location: str | None
|
|
@@ -192,12 +192,15 @@ class RealtimeModel(llm.RealtimeModel):
|
|
|
192
192
|
):
|
|
193
193
|
server_turn_detection = False
|
|
194
194
|
|
|
195
|
+
modalities = modalities if is_given(modalities) else [types.Modality.AUDIO]
|
|
196
|
+
|
|
195
197
|
super().__init__(
|
|
196
198
|
capabilities=llm.RealtimeCapabilities(
|
|
197
199
|
message_truncation=False,
|
|
198
200
|
turn_detection=server_turn_detection,
|
|
199
201
|
user_transcription=input_audio_transcription is not None,
|
|
200
202
|
auto_tool_reply_generation=True,
|
|
203
|
+
audio_output=types.Modality.AUDIO in modalities,
|
|
201
204
|
)
|
|
202
205
|
)
|
|
203
206
|
|
|
@@ -538,7 +541,9 @@ class RealtimeSession(llm.RealtimeSession):
|
|
|
538
541
|
return
|
|
539
542
|
self.start_user_activity()
|
|
540
543
|
|
|
541
|
-
def truncate(
|
|
544
|
+
def truncate(
|
|
545
|
+
self, *, message_id: str, audio_end_ms: int, audio_transcript: NotGivenOr[str] = NOT_GIVEN
|
|
546
|
+
) -> None:
|
|
542
547
|
logger.warning("truncate is not supported by the Google Realtime API.")
|
|
543
548
|
pass
|
|
544
549
|
|
|
@@ -732,9 +737,7 @@ class RealtimeSession(llm.RealtimeSession):
|
|
|
732
737
|
gemini_tools=self._opts.gemini_tools if is_given(self._opts.gemini_tools) else None,
|
|
733
738
|
)
|
|
734
739
|
conf = types.LiveConnectConfig(
|
|
735
|
-
response_modalities=self._opts.response_modalities
|
|
736
|
-
if is_given(self._opts.response_modalities)
|
|
737
|
-
else [types.Modality.AUDIO],
|
|
740
|
+
response_modalities=self._opts.response_modalities,
|
|
738
741
|
generation_config=types.GenerationConfig(
|
|
739
742
|
candidate_count=self._opts.candidate_count,
|
|
740
743
|
temperature=temp,
|
|
@@ -793,6 +796,8 @@ class RealtimeSession(llm.RealtimeSession):
|
|
|
793
796
|
audio_ch=utils.aio.Chan[rtc.AudioFrame](),
|
|
794
797
|
_created_timestamp=time.time(),
|
|
795
798
|
)
|
|
799
|
+
if not self._realtime_model.capabilities.audio_output:
|
|
800
|
+
self._current_generation.audio_ch.close()
|
|
796
801
|
|
|
797
802
|
self._current_generation.message_ch.send_nowait(
|
|
798
803
|
llm.MessageGeneration(
|
|
@@ -34,7 +34,6 @@ from livekit.agents.utils import is_given
|
|
|
34
34
|
from .log import logger
|
|
35
35
|
from .models import Gender, SpeechLanguages
|
|
36
36
|
|
|
37
|
-
BUFFERED_WORDS_COUNT = 8
|
|
38
37
|
NUM_CHANNELS = 1
|
|
39
38
|
DEFAULT_VOICE_NAME = "en-US-Chirp3-HD-Charon"
|
|
40
39
|
DEFAULT_LANGUAGE = "en-US"
|
|
@@ -124,7 +123,7 @@ class TTS(tts.TTS):
|
|
|
124
123
|
ssml_gender=ssml_gender,
|
|
125
124
|
)
|
|
126
125
|
if not is_given(tokenizer):
|
|
127
|
-
tokenizer = tokenize.
|
|
126
|
+
tokenizer = tokenize.blingfire.SentenceTokenizer()
|
|
128
127
|
|
|
129
128
|
pronunciations = None if not is_given(custom_pronunciations) else custom_pronunciations
|
|
130
129
|
|
|
File without changes
|
|
File without changes
|
{livekit_plugins_google-1.1.7 → livekit_plugins_google-1.2.1}/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.1.7 → livekit_plugins_google-1.2.1}/livekit/plugins/google/models.py
RENAMED
|
File without changes
|
{livekit_plugins_google-1.1.7 → livekit_plugins_google-1.2.1}/livekit/plugins/google/py.typed
RENAMED
|
File without changes
|
|
File without changes
|
{livekit_plugins_google-1.1.7 → livekit_plugins_google-1.2.1}/livekit/plugins/google/tools.py
RENAMED
|
File without changes
|
{livekit_plugins_google-1.1.7 → livekit_plugins_google-1.2.1}/livekit/plugins/google/utils.py
RENAMED
|
File without changes
|