livekit-plugins-google 0.11.0__py3-none-any.whl → 0.11.2__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.
@@ -6,7 +6,7 @@ from google.genai import types
6
6
 
7
7
  from ..._utils import _build_gemini_ctx, _build_tools
8
8
 
9
- LiveAPIModels = Literal["gemini-2.0-flash-001",]
9
+ LiveAPIModels = Literal["gemini-2.0-flash-exp"]
10
10
 
11
11
  Voice = Literal["Puck", "Charon", "Kore", "Fenrir", "Aoede"]
12
12
 
@@ -83,6 +83,7 @@ class Capabilities:
83
83
  class ModelOptions:
84
84
  model: LiveAPIModels | str
85
85
  api_key: str | None
86
+ api_version: str
86
87
  voice: Voice | str
87
88
  response_modalities: list[Modality] | None
88
89
  vertexai: bool
@@ -107,6 +108,7 @@ class RealtimeModel:
107
108
  instructions: str | None = None,
108
109
  model: LiveAPIModels | str = "gemini-2.0-flash-exp",
109
110
  api_key: str | None = None,
111
+ api_version: str = "v1alpha",
110
112
  voice: Voice | str = "Puck",
111
113
  modalities: list[Modality] = [Modality.AUDIO],
112
114
  enable_user_audio_transcription: bool = True,
@@ -136,6 +138,7 @@ class RealtimeModel:
136
138
  Args:
137
139
  instructions (str, optional): Initial system instructions for the model. Defaults to "".
138
140
  api_key (str or None, optional): Google Gemini API key. If None, will attempt to read from the environment variable GOOGLE_API_KEY.
141
+ api_version (str, optional): The version of the API to use. Defaults to "v1alpha".
139
142
  modalities (list[Modality], optional): Modalities to use, such as ["TEXT", "AUDIO"]. Defaults to ["AUDIO"].
140
143
  model (str or None, optional): The name of the model to use. Defaults to "gemini-2.0-flash-exp".
141
144
  voice (api_proto.Voice, optional): Voice setting for audio outputs. Defaults to "Puck".
@@ -187,6 +190,7 @@ class RealtimeModel:
187
190
  self._rt_sessions: list[GeminiRealtimeSession] = []
188
191
  self._opts = ModelOptions(
189
192
  model=model,
193
+ api_version=api_version,
190
194
  api_key=self._api_key,
191
195
  voice=voice,
192
196
  enable_user_audio_transcription=enable_user_audio_transcription,
@@ -289,7 +293,7 @@ class GeminiRealtimeSession(utils.EventEmitter[EventTypes]):
289
293
  tools=tools,
290
294
  )
291
295
  self._client = genai.Client(
292
- http_options=HttpOptions(api_version="v1alpha"),
296
+ http_options=HttpOptions(api_version=self._opts.api_version),
293
297
  api_key=self._opts.api_key,
294
298
  vertexai=self._opts.vertexai,
295
299
  project=self._opts.project,
@@ -94,7 +94,7 @@ class STT(stt.STT):
94
94
  punctuate: bool = True,
95
95
  spoken_punctuation: bool = False,
96
96
  model: SpeechModels | str = "latest_long",
97
- location: str = "us-central1",
97
+ location: str = "global",
98
98
  sample_rate: int = 16000,
99
99
  credentials_info: dict | None = None,
100
100
  credentials_file: str | None = None,
@@ -114,7 +114,7 @@ class STT(stt.STT):
114
114
  punctuate(bool): whether to punctuate the audio (default: True)
115
115
  spoken_punctuation(bool): whether to use spoken punctuation (default: False)
116
116
  model(SpeechModels): the model to use for recognition default: "latest_long"
117
- location(str): the location to use for recognition default: "us-central1"
117
+ location(str): the location to use for recognition default: "global"
118
118
  sample_rate(int): the sample rate of the audio default: 16000
119
119
  credentials_info(dict): the credentials info to use for recognition (default: None)
120
120
  credentials_file(str): the credentials file to use for recognition (default: None)
@@ -488,7 +488,6 @@ class SpeechStream(stt.SpeechStream):
488
488
  ),
489
489
  ),
490
490
  streaming_features=cloud_speech.StreamingRecognitionFeatures(
491
- enable_voice_activity_events=True,
492
491
  interim_results=self._config.interim_results,
493
492
  ),
494
493
  )
@@ -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__ = "0.11.0"
15
+ __version__ = "0.11.2"
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: livekit-plugins-google
3
- Version: 0.11.0
3
+ Version: 0.11.2
4
4
  Summary: Agent Framework plugin for services from Google Cloud
5
5
  Home-page: https://github.com/livekit/agents
6
6
  License: Apache-2.0
@@ -4,15 +4,15 @@ livekit/plugins/google/llm.py,sha256=LZaHsrkjfboRZLWm7L2G0mw62q2sXBNj4YeeV2Sk2uU
4
4
  livekit/plugins/google/log.py,sha256=GI3YWN5YzrafnUccljzPRS_ZALkMNk1i21IRnTl2vNA,69
5
5
  livekit/plugins/google/models.py,sha256=SGjAumdDK97NNLwMFcqZdKR68f1NoGB2Rk1UP2-imG0,1457
6
6
  livekit/plugins/google/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- livekit/plugins/google/stt.py,sha256=96GJmGDAIBdCpDECArwIXpj2s1xlcA_zuvTnwsvq4xA,22854
7
+ livekit/plugins/google/stt.py,sha256=l6UB9oaM7eFInnI_0t7Ub-edXLVRgvaiyHj-e_gEuwE,22781
8
8
  livekit/plugins/google/tts.py,sha256=pG9_pibO3NDGEMa4huU5S9lbeyI3daQyrS17SuTKfZI,8008
9
- livekit/plugins/google/version.py,sha256=BvmVdoHkxksDSQP-uWrqIiyaAUImEyxSohntkIBNZRo,601
9
+ livekit/plugins/google/version.py,sha256=_06ctkD1XWTWec2BVgcsxun2sFLxqnvJJJs7ZxIBuHA,601
10
10
  livekit/plugins/google/beta/__init__.py,sha256=AxRYc7NGG62Tv1MmcZVCDHNvlhbC86hM-_yP01Qb28k,47
11
11
  livekit/plugins/google/beta/realtime/__init__.py,sha256=sGTn6JFNyA30QUXBZ_BV3l2eHpGAzR35ByXxg77vWNU,205
12
- livekit/plugins/google/beta/realtime/api_proto.py,sha256=ralrRZqIbE71oyuLKRYaXHvm6tcHMwBJueKvSO8Xfus,658
13
- livekit/plugins/google/beta/realtime/realtime_api.py,sha256=vZHiWNk8PorxtrHSmA7Ya6ZvCjT37YSJN-MxK8ebdrs,22795
12
+ livekit/plugins/google/beta/realtime/api_proto.py,sha256=9EhmwgeIgKDqdSijv5Q9pgx7UhAakK02ZDwbnUsra_o,657
13
+ livekit/plugins/google/beta/realtime/realtime_api.py,sha256=8JdWUMUheGhy1ia6JbN3_U2_cL7CNs8-1fTOAgW4I38,22999
14
14
  livekit/plugins/google/beta/realtime/transcriber.py,sha256=rjXO0cSPr3HATxrSfv1MX7IbrjmiTvnLPF280BfRBL8,9809
15
- livekit_plugins_google-0.11.0.dist-info/METADATA,sha256=b8Aj_eQnGhAT3DQa77KLHZBDGAWZYdrnTBWjVODAm2k,3732
16
- livekit_plugins_google-0.11.0.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
17
- livekit_plugins_google-0.11.0.dist-info/top_level.txt,sha256=OoDok3xUmXbZRvOrfvvXB-Juu4DX79dlq188E19YHoo,8
18
- livekit_plugins_google-0.11.0.dist-info/RECORD,,
15
+ livekit_plugins_google-0.11.2.dist-info/METADATA,sha256=MQF9voerbBB1t5fGRw94z7jyfgJOnsM-DmWxtCT10V8,3732
16
+ livekit_plugins_google-0.11.2.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
17
+ livekit_plugins_google-0.11.2.dist-info/top_level.txt,sha256=OoDok3xUmXbZRvOrfvvXB-Juu4DX79dlq188E19YHoo,8
18
+ livekit_plugins_google-0.11.2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.8.2)
2
+ Generator: setuptools (77.0.3)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5