videosdk-plugins-deepgram 0.0.21__tar.gz → 0.0.23__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 videosdk-plugins-deepgram might be problematic. Click here for more details.
- {videosdk_plugins_deepgram-0.0.21 → videosdk_plugins_deepgram-0.0.23}/PKG-INFO +2 -2
- {videosdk_plugins_deepgram-0.0.21 → videosdk_plugins_deepgram-0.0.23}/pyproject.toml +1 -1
- {videosdk_plugins_deepgram-0.0.21 → videosdk_plugins_deepgram-0.0.23}/videosdk/plugins/deepgram/stt.py +8 -3
- videosdk_plugins_deepgram-0.0.23/videosdk/plugins/deepgram/version.py +1 -0
- videosdk_plugins_deepgram-0.0.21/videosdk/plugins/deepgram/version.py +0 -1
- {videosdk_plugins_deepgram-0.0.21 → videosdk_plugins_deepgram-0.0.23}/.gitignore +0 -0
- {videosdk_plugins_deepgram-0.0.21 → videosdk_plugins_deepgram-0.0.23}/README.md +0 -0
- {videosdk_plugins_deepgram-0.0.21 → videosdk_plugins_deepgram-0.0.23}/videosdk/plugins/deepgram/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: videosdk-plugins-deepgram
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.23
|
|
4
4
|
Summary: VideoSDK Agent Framework plugin for Deepgram
|
|
5
5
|
Author: videosdk
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -12,7 +12,7 @@ Classifier: Topic :: Multimedia :: Sound/Audio
|
|
|
12
12
|
Classifier: Topic :: Multimedia :: Video
|
|
13
13
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
14
14
|
Requires-Python: >=3.11
|
|
15
|
-
Requires-Dist: videosdk-agents>=0.0.
|
|
15
|
+
Requires-Dist: videosdk-agents>=0.0.23
|
|
16
16
|
Description-Content-Type: text/markdown
|
|
17
17
|
|
|
18
18
|
# VideoSDK Deepgram Plugin
|
|
@@ -7,6 +7,9 @@ import os
|
|
|
7
7
|
from urllib.parse import urlencode
|
|
8
8
|
import aiohttp
|
|
9
9
|
from videosdk.agents import STT as BaseSTT, STTResponse, SpeechEventType, SpeechData, global_event_emitter
|
|
10
|
+
import logging
|
|
11
|
+
|
|
12
|
+
logger = logging.getLogger(__name__)
|
|
10
13
|
|
|
11
14
|
class DeepgramSTT(BaseSTT):
|
|
12
15
|
def __init__(
|
|
@@ -59,7 +62,7 @@ class DeepgramSTT(BaseSTT):
|
|
|
59
62
|
try:
|
|
60
63
|
await self._ws.send_bytes(audio_frames)
|
|
61
64
|
except Exception as e:
|
|
62
|
-
|
|
65
|
+
logger.error(f"Error in process_audio: {str(e)}")
|
|
63
66
|
self.emit("error", str(e))
|
|
64
67
|
if self._ws:
|
|
65
68
|
await self._ws.close()
|
|
@@ -82,9 +85,11 @@ class DeepgramSTT(BaseSTT):
|
|
|
82
85
|
if self._transcript_callback:
|
|
83
86
|
await self._transcript_callback(response)
|
|
84
87
|
elif msg.type == aiohttp.WSMsgType.ERROR:
|
|
88
|
+
logger.error(f"WebSocket error: {self._ws.exception()}")
|
|
85
89
|
self.emit("error", f"WebSocket error: {self._ws.exception()}")
|
|
86
90
|
break
|
|
87
91
|
except Exception as e:
|
|
92
|
+
logger.error(f"Error in WebSocket listener: {str(e)}")
|
|
88
93
|
self.emit("error", f"Error in WebSocket listener: {str(e)}")
|
|
89
94
|
finally:
|
|
90
95
|
if self._ws:
|
|
@@ -120,7 +125,7 @@ class DeepgramSTT(BaseSTT):
|
|
|
120
125
|
try:
|
|
121
126
|
self._ws = await self._session.ws_connect(ws_url, headers=headers)
|
|
122
127
|
except Exception as e:
|
|
123
|
-
|
|
128
|
+
logger.error(f"Error connecting to WebSocket: {str(e)}")
|
|
124
129
|
raise
|
|
125
130
|
|
|
126
131
|
def _handle_ws_message(self, msg: dict) -> list[STTResponse]:
|
|
@@ -164,7 +169,7 @@ class DeepgramSTT(BaseSTT):
|
|
|
164
169
|
responses.append(response)
|
|
165
170
|
|
|
166
171
|
except Exception as e:
|
|
167
|
-
|
|
172
|
+
logger.error(f"Error handling WebSocket message: {str(e)}")
|
|
168
173
|
|
|
169
174
|
return responses
|
|
170
175
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.0.23"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.0.21"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|