livekit-plugins-google 1.1.4__tar.gz → 1.1.6__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.

Files changed (18) hide show
  1. {livekit_plugins_google-1.1.4 → livekit_plugins_google-1.1.6}/PKG-INFO +3 -3
  2. {livekit_plugins_google-1.1.4 → livekit_plugins_google-1.1.6}/livekit/plugins/google/beta/realtime/api_proto.py +1 -1
  3. {livekit_plugins_google-1.1.4 → livekit_plugins_google-1.1.6}/livekit/plugins/google/llm.py +5 -0
  4. {livekit_plugins_google-1.1.4 → livekit_plugins_google-1.1.6}/livekit/plugins/google/tts.py +20 -3
  5. {livekit_plugins_google-1.1.4 → livekit_plugins_google-1.1.6}/livekit/plugins/google/version.py +1 -1
  6. {livekit_plugins_google-1.1.4 → livekit_plugins_google-1.1.6}/pyproject.toml +2 -2
  7. {livekit_plugins_google-1.1.4 → livekit_plugins_google-1.1.6}/.gitignore +0 -0
  8. {livekit_plugins_google-1.1.4 → livekit_plugins_google-1.1.6}/README.md +0 -0
  9. {livekit_plugins_google-1.1.4 → livekit_plugins_google-1.1.6}/livekit/plugins/google/__init__.py +0 -0
  10. {livekit_plugins_google-1.1.4 → livekit_plugins_google-1.1.6}/livekit/plugins/google/beta/__init__.py +0 -0
  11. {livekit_plugins_google-1.1.4 → livekit_plugins_google-1.1.6}/livekit/plugins/google/beta/realtime/__init__.py +0 -0
  12. {livekit_plugins_google-1.1.4 → livekit_plugins_google-1.1.6}/livekit/plugins/google/beta/realtime/realtime_api.py +0 -0
  13. {livekit_plugins_google-1.1.4 → livekit_plugins_google-1.1.6}/livekit/plugins/google/log.py +0 -0
  14. {livekit_plugins_google-1.1.4 → livekit_plugins_google-1.1.6}/livekit/plugins/google/models.py +0 -0
  15. {livekit_plugins_google-1.1.4 → livekit_plugins_google-1.1.6}/livekit/plugins/google/py.typed +0 -0
  16. {livekit_plugins_google-1.1.4 → livekit_plugins_google-1.1.6}/livekit/plugins/google/stt.py +0 -0
  17. {livekit_plugins_google-1.1.4 → livekit_plugins_google-1.1.6}/livekit/plugins/google/tools.py +0 -0
  18. {livekit_plugins_google-1.1.4 → livekit_plugins_google-1.1.6}/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.4
3
+ Version: 1.1.6
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/
@@ -21,8 +21,8 @@ Requires-Python: >=3.9.0
21
21
  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
- Requires-Dist: google-genai>=v1.21.1
25
- Requires-Dist: livekit-agents>=1.1.4
24
+ Requires-Dist: google-genai>=v1.23.0
25
+ Requires-Dist: livekit-agents>=1.1.6
26
26
  Description-Content-Type: text/markdown
27
27
 
28
28
  # Google AI plugin for LiveKit Agents
@@ -13,7 +13,7 @@ LiveAPIModels = Literal[
13
13
  "gemini-2.5-flash-exp-native-audio-thinking-dialog",
14
14
  ]
15
15
 
16
- Voice = Literal["Puck", "Charon", "Kore", "Fenrir", "Aoede", "Leda", "Oru", "Zephyr"]
16
+ Voice = Literal["Puck", "Charon", "Kore", "Fenrir", "Aoede", "Leda", "Orus", "Zephyr"]
17
17
 
18
18
 
19
19
  ClientEvents = Union[
@@ -62,6 +62,7 @@ class _LLMOptions:
62
62
  automatic_function_calling_config: NotGivenOr[types.AutomaticFunctionCallingConfigOrDict]
63
63
  gemini_tools: NotGivenOr[list[_LLMTool]]
64
64
  http_options: NotGivenOr[types.HttpOptions]
65
+ seed: NotGivenOr[int]
65
66
 
66
67
 
67
68
  class LLM(llm.LLM):
@@ -86,6 +87,7 @@ class LLM(llm.LLM):
86
87
  ] = NOT_GIVEN,
87
88
  gemini_tools: NotGivenOr[list[_LLMTool]] = NOT_GIVEN,
88
89
  http_options: NotGivenOr[types.HttpOptions] = NOT_GIVEN,
90
+ seed: NotGivenOr[int] = NOT_GIVEN,
89
91
  ) -> None:
90
92
  """
91
93
  Create a new instance of Google GenAI LLM.
@@ -176,6 +178,7 @@ class LLM(llm.LLM):
176
178
  automatic_function_calling_config=automatic_function_calling_config,
177
179
  gemini_tools=gemini_tools,
178
180
  http_options=http_options,
181
+ seed=seed,
179
182
  )
180
183
  self._client = Client(
181
184
  api_key=gemini_api_key,
@@ -262,6 +265,8 @@ class LLM(llm.LLM):
262
265
  extra["presence_penalty"] = self._opts.presence_penalty
263
266
  if is_given(self._opts.frequency_penalty):
264
267
  extra["frequency_penalty"] = self._opts.frequency_penalty
268
+ if is_given(self._opts.seed):
269
+ extra["seed"] = self._opts.seed
265
270
 
266
271
  # Add thinking config if thinking_budget is provided
267
272
  if is_given(self._opts.thinking_config):
@@ -22,7 +22,11 @@ from dataclasses import dataclass, replace
22
22
  from google.api_core.client_options import ClientOptions
23
23
  from google.api_core.exceptions import DeadlineExceeded, GoogleAPICallError
24
24
  from google.cloud import texttospeech
25
- from google.cloud.texttospeech_v1.types import SsmlVoiceGender, SynthesizeSpeechResponse
25
+ from google.cloud.texttospeech_v1.types import (
26
+ CustomPronunciations,
27
+ SsmlVoiceGender,
28
+ SynthesizeSpeechResponse,
29
+ )
26
30
  from livekit.agents import APIConnectOptions, APIStatusError, APITimeoutError, tokenize, tts, utils
27
31
  from livekit.agents.types import DEFAULT_API_CONNECT_OPTIONS, NOT_GIVEN, NotGivenOr
28
32
  from livekit.agents.utils import is_given
@@ -47,6 +51,7 @@ class _TTSOptions:
47
51
  speaking_rate: float
48
52
  tokenizer: tokenize.SentenceTokenizer
49
53
  volume_gain_db: float
54
+ custom_pronunciations: CustomPronunciations | None
50
55
  enable_ssml: bool
51
56
 
52
57
 
@@ -67,6 +72,7 @@ class TTS(tts.TTS):
67
72
  credentials_info: NotGivenOr[dict] = NOT_GIVEN,
68
73
  credentials_file: NotGivenOr[str] = NOT_GIVEN,
69
74
  tokenizer: NotGivenOr[tokenize.SentenceTokenizer] = NOT_GIVEN,
75
+ custom_pronunciations: NotGivenOr[CustomPronunciations] = NOT_GIVEN,
70
76
  use_streaming: bool = True,
71
77
  enable_ssml: bool = False,
72
78
  ) -> None:
@@ -90,6 +96,7 @@ class TTS(tts.TTS):
90
96
  credentials_info (dict, optional): Dictionary containing Google Cloud credentials. Default is None.
91
97
  credentials_file (str, optional): Path to the Google Cloud credentials JSON file. Default is None.
92
98
  tokenizer (tokenize.SentenceTokenizer, optional): Tokenizer for the TTS. Default is a basic sentence tokenizer.
99
+ custom_pronunciations (CustomPronunciations, optional): Custom pronunciations for the TTS. Default is None.
93
100
  use_streaming (bool, optional): Whether to use streaming synthesis. Default is True.
94
101
  enable_ssml (bool, optional): Whether to enable SSML support. Default is False.
95
102
  """ # noqa: E501
@@ -119,6 +126,8 @@ class TTS(tts.TTS):
119
126
  if not is_given(tokenizer):
120
127
  tokenizer = tokenize.basic.SentenceTokenizer(min_sentence_len=BUFFERED_WORDS_COUNT)
121
128
 
129
+ pronunciations = None if not is_given(custom_pronunciations) else custom_pronunciations
130
+
122
131
  self._opts = _TTSOptions(
123
132
  voice=voice_params,
124
133
  encoding=audio_encoding,
@@ -128,6 +137,7 @@ class TTS(tts.TTS):
128
137
  speaking_rate=speaking_rate,
129
138
  tokenizer=tokenizer,
130
139
  volume_gain_db=volume_gain_db,
140
+ custom_pronunciations=pronunciations,
131
141
  enable_ssml=enable_ssml,
132
142
  )
133
143
  self._streams = weakref.WeakSet[SynthesizeStream]()
@@ -223,9 +233,15 @@ class ChunkedStream(tts.ChunkedStream):
223
233
  async def _run(self, output_emitter: tts.AudioEmitter) -> None:
224
234
  try:
225
235
  input = (
226
- texttospeech.SynthesisInput(ssml=self._build_ssml())
236
+ texttospeech.SynthesisInput(
237
+ ssml=self._build_ssml(),
238
+ custom_pronunciations=self._opts.custom_pronunciations,
239
+ )
227
240
  if self._opts.enable_ssml
228
- else texttospeech.SynthesisInput(text=self._input_text)
241
+ else texttospeech.SynthesisInput(
242
+ text=self._input_text,
243
+ custom_pronunciations=self._opts.custom_pronunciations,
244
+ )
229
245
  )
230
246
  response: SynthesizeSpeechResponse = await self._tts._ensure_client().synthesize_speech(
231
247
  input=input,
@@ -287,6 +303,7 @@ class SynthesizeStream(tts.SynthesizeStream):
287
303
  sample_rate_hertz=self._opts.sample_rate,
288
304
  speaking_rate=self._opts.speaking_rate,
289
305
  ),
306
+ custom_pronunciations=self._opts.custom_pronunciations,
290
307
  )
291
308
 
292
309
  async def _tokenize_input() -> 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.1.4"
15
+ __version__ = "1.1.6"
@@ -26,8 +26,8 @@ dependencies = [
26
26
  "google-auth >= 2, < 3",
27
27
  "google-cloud-speech >= 2, < 3",
28
28
  "google-cloud-texttospeech >= 2.27, < 3",
29
- "google-genai >= v1.21.1",
30
- "livekit-agents>=1.1.4",
29
+ "google-genai >= v1.23.0",
30
+ "livekit-agents>=1.1.6",
31
31
  ]
32
32
 
33
33
  [project.urls]