videosdk-plugins-deepgram 0.0.22__py3-none-any.whl → 0.0.23__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.

Potentially problematic release.


This version of videosdk-plugins-deepgram might be problematic. Click here for more details.

@@ -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
- print(f"Error in process_audio: {str(e)}")
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
- print(f"Error connecting to WebSocket: {str(e)}")
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
- print(f"Error handling WebSocket message: {str(e)}")
172
+ logger.error(f"Error handling WebSocket message: {str(e)}")
168
173
 
169
174
  return responses
170
175
 
@@ -1 +1 @@
1
- __version__ = "0.0.22"
1
+ __version__ = "0.0.23"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: videosdk-plugins-deepgram
3
- Version: 0.0.22
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.22
15
+ Requires-Dist: videosdk-agents>=0.0.23
16
16
  Description-Content-Type: text/markdown
17
17
 
18
18
  # VideoSDK Deepgram Plugin
@@ -0,0 +1,6 @@
1
+ videosdk/plugins/deepgram/__init__.py,sha256=sfiNIvpVbFqbReYTskb3D--3v_U3-FujI9gdkcEGEmY,55
2
+ videosdk/plugins/deepgram/stt.py,sha256=_cdy1AprV2ci3-xtjTmhKnkCDtwYcjkF_5YMSw16PGg,7196
3
+ videosdk/plugins/deepgram/version.py,sha256=AZGfcffmm2o30wrhu9YNi-7Caw1Fg2eavlgdTcC0Ml0,22
4
+ videosdk_plugins_deepgram-0.0.23.dist-info/METADATA,sha256=ID5CSRKkpBkUNSWr1O5_B2sF0dgd9eIzTbdoL5megkQ,767
5
+ videosdk_plugins_deepgram-0.0.23.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
6
+ videosdk_plugins_deepgram-0.0.23.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- videosdk/plugins/deepgram/__init__.py,sha256=sfiNIvpVbFqbReYTskb3D--3v_U3-FujI9gdkcEGEmY,55
2
- videosdk/plugins/deepgram/stt.py,sha256=mnHhsmuJfDpRt2tW4gm6I5E3yQWKHwnN9sAd54zSeng,6978
3
- videosdk/plugins/deepgram/version.py,sha256=NoiGDztYD4fsDDnfSPiSzRkknkNHhFUtKZj0mhQiTYM,22
4
- videosdk_plugins_deepgram-0.0.22.dist-info/METADATA,sha256=6Nui6Yhof_epE54DbHDdUvHdcPaJVHK_eo0_0WfsEPs,767
5
- videosdk_plugins_deepgram-0.0.22.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
6
- videosdk_plugins_deepgram-0.0.22.dist-info/RECORD,,