livekit-plugins-google 0.10.3__py3-none-any.whl → 0.10.5__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.
@@ -104,7 +104,7 @@ class RealtimeModel:
104
104
  self,
105
105
  *,
106
106
  instructions: str | None = None,
107
- model: LiveAPIModels | str = "gemini-2.0-flash-001",
107
+ model: LiveAPIModels | str = "gemini-2.0-flash-exp",
108
108
  api_key: str | None = None,
109
109
  voice: Voice | str = "Puck",
110
110
  modalities: list[Modality] = ["AUDIO"],
@@ -136,7 +136,7 @@ class RealtimeModel:
136
136
  instructions (str, optional): Initial system instructions for the model. Defaults to "".
137
137
  api_key (str or None, optional): Google Gemini API key. If None, will attempt to read from the environment variable GOOGLE_API_KEY.
138
138
  modalities (list[Modality], optional): Modalities to use, such as ["TEXT", "AUDIO"]. Defaults to ["AUDIO"].
139
- model (str or None, optional): The name of the model to use. Defaults to "gemini-2.0-flash-001".
139
+ model (str or None, optional): The name of the model to use. Defaults to "gemini-2.0-flash-exp".
140
140
  voice (api_proto.Voice, optional): Voice setting for audio outputs. Defaults to "Puck".
141
141
  enable_user_audio_transcription (bool, optional): Whether to enable user audio transcription. Defaults to True
142
142
  enable_agent_audio_transcription (bool, optional): Whether to enable agent audio transcription. Defaults to True
@@ -49,6 +49,9 @@ LanguageCode = Union[LgType, List[LgType]]
49
49
  # before that timeout is reached
50
50
  _max_session_duration = 240
51
51
 
52
+ # Google is very sensitive to background noise, so we'll ignore results with low confidence
53
+ _min_confidence = 0.65
54
+
52
55
 
53
56
  # This class is only be used internally to encapsulate the options
54
57
  @dataclass
@@ -555,6 +558,8 @@ def _streaming_recognize_response_to_speech_data(
555
558
  confidence /= len(resp.results)
556
559
  lg = resp.results[0].language_code
557
560
 
561
+ if confidence < _min_confidence:
562
+ return None
558
563
  if text == "":
559
564
  return None
560
565
 
@@ -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.10.3"
15
+ __version__ = "0.10.5"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: livekit-plugins-google
3
- Version: 0.10.3
3
+ Version: 0.10.5
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=TVTerAabIf10AKVZr-Kn13eajhQ9RV7K4xaVD771yHU
4
4
  livekit/plugins/google/log.py,sha256=GI3YWN5YzrafnUccljzPRS_ZALkMNk1i21IRnTl2vNA,69
5
5
  livekit/plugins/google/models.py,sha256=Q47z_tIwLCufxhJyJHH7_1bo4xdBYZBSkkvMeycuItg,1493
6
6
  livekit/plugins/google/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- livekit/plugins/google/stt.py,sha256=zl5B8MroarvoBbOmSK5YzC1d3GJeltkpv4Y0n2XLoVE,21203
7
+ livekit/plugins/google/stt.py,sha256=QcpKAcg8ltFlQnLGSdtRS2H12pFEPs1ZzLojKHB8bpY,21376
8
8
  livekit/plugins/google/tts.py,sha256=95qXCigVQYWNbcN3pIKBpIah4b31U_MWtXv5Ji0AMc4,9229
9
- livekit/plugins/google/version.py,sha256=k8ij2VzlolcsqiNUU1AriNVHljCjUQz0tYetVwc1gH0,601
9
+ livekit/plugins/google/version.py,sha256=na7fXYRLcWIgCRi4QSAbV4DZGA7YDgOWcE0O21jDlAo,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
12
  livekit/plugins/google/beta/realtime/api_proto.py,sha256=ralrRZqIbE71oyuLKRYaXHvm6tcHMwBJueKvSO8Xfus,658
13
- livekit/plugins/google/beta/realtime/realtime_api.py,sha256=3k2yJ-avbkyDBH3MKlCuBi0xiho003LHxCiYCsCXpg4,21281
13
+ livekit/plugins/google/beta/realtime/realtime_api.py,sha256=RPGYAJXelYPo16YyR2qccjUjxUJCkJBU2N5rNTpKxyo,21281
14
14
  livekit/plugins/google/beta/realtime/transcriber.py,sha256=ZpKA3F8dqOtJPDlPiAgjw0AUDBIuhQiBVnvSYL4cdBg,9796
15
- livekit_plugins_google-0.10.3.dist-info/METADATA,sha256=kWXttBYbuIpMxR3KwJMchDcNn7OASsguQ_Sctm0t0Lw,2058
16
- livekit_plugins_google-0.10.3.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
17
- livekit_plugins_google-0.10.3.dist-info/top_level.txt,sha256=OoDok3xUmXbZRvOrfvvXB-Juu4DX79dlq188E19YHoo,8
18
- livekit_plugins_google-0.10.3.dist-info/RECORD,,
15
+ livekit_plugins_google-0.10.5.dist-info/METADATA,sha256=AHhTVMBNVlOnqMnLPjncTO_iIqkDS-ExCm_5ubD9Mdg,2058
16
+ livekit_plugins_google-0.10.5.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
17
+ livekit_plugins_google-0.10.5.dist-info/top_level.txt,sha256=OoDok3xUmXbZRvOrfvvXB-Juu4DX79dlq188E19YHoo,8
18
+ livekit_plugins_google-0.10.5.dist-info/RECORD,,