livekit-plugins-google 0.3.dev0__py3-none-any.whl → 0.4.dev0__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.
- livekit/plugins/google/log.py +3 -0
- livekit/plugins/google/stt.py +6 -6
- livekit/plugins/google/version.py +1 -1
- {livekit_plugins_google-0.3.dev0.dist-info → livekit_plugins_google-0.4.dev0.dist-info}/METADATA +3 -3
- livekit_plugins_google-0.4.dev0.dist-info/RECORD +10 -0
- livekit_plugins_google-0.3.dev0.dist-info/RECORD +0 -9
- {livekit_plugins_google-0.3.dev0.dist-info → livekit_plugins_google-0.4.dev0.dist-info}/WHEEL +0 -0
- {livekit_plugins_google-0.3.dev0.dist-info → livekit_plugins_google-0.4.dev0.dist-info}/top_level.txt +0 -0
livekit/plugins/google/stt.py
CHANGED
@@ -17,7 +17,6 @@ from __future__ import annotations
|
|
17
17
|
import asyncio
|
18
18
|
import contextlib
|
19
19
|
import dataclasses
|
20
|
-
import logging
|
21
20
|
from dataclasses import dataclass
|
22
21
|
from typing import Any, AsyncIterable, Dict, List
|
23
22
|
|
@@ -29,6 +28,7 @@ from google.auth import credentials # type: ignore
|
|
29
28
|
from google.cloud.speech_v2 import SpeechAsyncClient
|
30
29
|
from google.cloud.speech_v2.types import cloud_speech
|
31
30
|
|
31
|
+
from .log import logger
|
32
32
|
from .models import SpeechLanguages, SpeechModels
|
33
33
|
|
34
34
|
LgType = SpeechLanguages | str
|
@@ -105,7 +105,7 @@ class STT(stt.STT):
|
|
105
105
|
config.languages = [config.languages]
|
106
106
|
elif not config.detect_language:
|
107
107
|
if len(config.languages) > 1:
|
108
|
-
|
108
|
+
logger.warning(
|
109
109
|
"multiple languages provided, but language detection is disabled"
|
110
110
|
)
|
111
111
|
config.languages = [config.languages[0]]
|
@@ -208,7 +208,7 @@ class SpeechStream(stt.SpeechStream):
|
|
208
208
|
|
209
209
|
def log_exception(task: asyncio.Task) -> None:
|
210
210
|
if not task.cancelled() and task.exception():
|
211
|
-
|
211
|
+
logger.error(f"google stt task failed: {task.exception()}")
|
212
212
|
|
213
213
|
self._main_task.add_done_callback(log_exception)
|
214
214
|
|
@@ -256,7 +256,7 @@ class SpeechStream(stt.SpeechStream):
|
|
256
256
|
audio=frame.data.tobytes(),
|
257
257
|
)
|
258
258
|
except Exception as e:
|
259
|
-
|
259
|
+
logger.error(
|
260
260
|
f"an error occurred while streaming inputs: {e}"
|
261
261
|
)
|
262
262
|
|
@@ -269,7 +269,7 @@ class SpeechStream(stt.SpeechStream):
|
|
269
269
|
await self._run_stream(stream)
|
270
270
|
except Exception as e:
|
271
271
|
if retry_count >= max_retry:
|
272
|
-
|
272
|
+
logger.error(
|
273
273
|
f"failed to connect to google stt after {max_retry} tries",
|
274
274
|
exc_info=e,
|
275
275
|
)
|
@@ -277,7 +277,7 @@ class SpeechStream(stt.SpeechStream):
|
|
277
277
|
|
278
278
|
retry_delay = min(retry_count * 2, 10) # max 10s
|
279
279
|
retry_count += 1
|
280
|
-
|
280
|
+
logger.warning(
|
281
281
|
f"google stt connection failed, retrying in {retry_delay}s",
|
282
282
|
exc_info=e,
|
283
283
|
)
|
{livekit_plugins_google-0.3.dev0.dist-info → livekit_plugins_google-0.4.dev0.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: livekit-plugins-google
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.4.dev0
|
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
|
@@ -29,8 +29,8 @@ Requires-Dist: google-cloud-speech <3,>=2
|
|
29
29
|
Requires-Dist: google-cloud-texttospeech <3,>=2
|
30
30
|
Requires-Dist: google-cloud-translate <4,>=3
|
31
31
|
Requires-Dist: googleapis-common-protos <2,>=1
|
32
|
-
Requires-Dist: livekit
|
33
|
-
Requires-Dist: livekit-agents ~=0.
|
32
|
+
Requires-Dist: livekit ~=0.11
|
33
|
+
Requires-Dist: livekit-agents ~=0.6.dev0
|
34
34
|
|
35
35
|
# LiveKit Plugins Google
|
36
36
|
|
@@ -0,0 +1,10 @@
|
|
1
|
+
livekit/plugins/google/__init__.py,sha256=snPMHNLrurYbLWQOkV_o6qG1CEWsOCZ8ZfPMvmh5ejY,931
|
2
|
+
livekit/plugins/google/log.py,sha256=GI3YWN5YzrafnUccljzPRS_ZALkMNk1i21IRnTl2vNA,69
|
3
|
+
livekit/plugins/google/models.py,sha256=DgiXOvGDO8D9rfCKHJL28lbyQR8mXXB2kpku-szXLRs,1185
|
4
|
+
livekit/plugins/google/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
|
+
livekit/plugins/google/stt.py,sha256=sPV4ByAxfeGBNvAGIuwZvheEA0k7NYjXR_UiYWjd39Y,15029
|
6
|
+
livekit/plugins/google/version.py,sha256=OwSbVTqWUJKy9w2Jbh1MIrp5cHPvEYsLXDhRGwdZKso,603
|
7
|
+
livekit_plugins_google-0.4.dev0.dist-info/METADATA,sha256=i4l7y8p0Y57kK5oPQqF-8lp9SFvPL0nDVsuDkktHJN4,1947
|
8
|
+
livekit_plugins_google-0.4.dev0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
9
|
+
livekit_plugins_google-0.4.dev0.dist-info/top_level.txt,sha256=OoDok3xUmXbZRvOrfvvXB-Juu4DX79dlq188E19YHoo,8
|
10
|
+
livekit_plugins_google-0.4.dev0.dist-info/RECORD,,
|
@@ -1,9 +0,0 @@
|
|
1
|
-
livekit/plugins/google/__init__.py,sha256=snPMHNLrurYbLWQOkV_o6qG1CEWsOCZ8ZfPMvmh5ejY,931
|
2
|
-
livekit/plugins/google/models.py,sha256=DgiXOvGDO8D9rfCKHJL28lbyQR8mXXB2kpku-szXLRs,1185
|
3
|
-
livekit/plugins/google/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
|
-
livekit/plugins/google/stt.py,sha256=lYA8hlkxG3YSw1Q34j8hgs4us5Ij-TLBQTRwtGPN9MY,15025
|
5
|
-
livekit/plugins/google/version.py,sha256=qkEpuSbW6SpTptjDO-UGEI0FuAKdGu2JIYA_Bw_kavc,603
|
6
|
-
livekit_plugins_google-0.3.dev0.dist-info/METADATA,sha256=b564Neg8syWRwQDrxVl_sW1CRF-xIbLbmY54stjjR48,1948
|
7
|
-
livekit_plugins_google-0.3.dev0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
8
|
-
livekit_plugins_google-0.3.dev0.dist-info/top_level.txt,sha256=OoDok3xUmXbZRvOrfvvXB-Juu4DX79dlq188E19YHoo,8
|
9
|
-
livekit_plugins_google-0.3.dev0.dist-info/RECORD,,
|
{livekit_plugins_google-0.3.dev0.dist-info → livekit_plugins_google-0.4.dev0.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|