Skip to content

Commit fdcce88

Browse files
SDK regeneration
1 parent 785b6b3 commit fdcce88

10 files changed

+31
-1420
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,3 @@
33
__pycache__/
44
dist/
55
poetry.toml
6-
.pytest_cache/
7-
.env

src/deepgram/agent/v1/socket_client.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,12 @@ async def send_agent_v_1_update_prompt(self, message: AgentV1UpdatePrompt) -> No
133133
"""
134134
await self._send_model(message)
135135

136-
async def send_agent_v_1_media(self, message: bytes) -> None:
136+
async def send_agent_v_1_media(self, message: str) -> None:
137137
"""
138-
Send binary audio data to the websocket connection.
139-
The message will be sent as bytes.
138+
Send a message to the websocket connection.
139+
The message will be sent as a str.
140140
"""
141-
await self._send(message)
141+
await self._send_model(message)
142142

143143
async def recv(self) -> V1SocketClientResponse:
144144
"""
@@ -242,12 +242,12 @@ def send_agent_v_1_update_prompt(self, message: AgentV1UpdatePrompt) -> None:
242242
"""
243243
self._send_model(message)
244244

245-
def send_agent_v_1_media(self, message: bytes) -> None:
245+
def send_agent_v_1_media(self, message: str) -> None:
246246
"""
247-
Send binary audio data to the websocket connection.
248-
The message will be sent as bytes.
247+
Send a message to the websocket connection.
248+
The message will be sent as a str.
249249
"""
250-
self._send(message)
250+
self._send_model(message)
251251

252252
def recv(self) -> V1SocketClientResponse:
253253
"""

src/deepgram/listen/v1/requests/listen_v1results_channel_alternatives_item.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ class ListenV1ResultsChannelAlternativesItemParams(typing_extensions.TypedDict):
1717
The confidence of the transcription
1818
"""
1919

20-
languages: typing.Sequence[str]
20+
languages: typing_extensions.NotRequired[typing.Sequence[str]]
2121
words: typing.Sequence[ListenV1ResultsChannelAlternativesItemWordsItemParams]

src/deepgram/listen/v1/requests/listen_v1results_channel_alternatives_item_words_item.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ class ListenV1ResultsChannelAlternativesItemWordsItemParams(typing_extensions.Ty
2424
The confidence of the word
2525
"""
2626

27-
language: str
27+
language: typing_extensions.NotRequired[str]
2828
"""
2929
The language of the word
3030
"""
3131

32-
punctuated_word: str
32+
punctuated_word: typing_extensions.NotRequired[str]
3333
"""
3434
The punctuated word of the word
3535
"""

src/deepgram/listen/v1/socket_client.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ async def start_listening(self):
5454
finally:
5555
await self._emit_async(EventType.CLOSE, None)
5656

57-
async def send_listen_v_1_media(self, message: bytes) -> None:
57+
async def send_listen_v_1_media(self, message: str) -> None:
5858
"""
59-
Send binary audio data to the websocket connection.
60-
The message will be sent as bytes.
59+
Send a message to the websocket connection.
60+
The message will be sent as a str.
6161
"""
62-
await self._send(message)
62+
await self._send_model(message)
6363

6464
async def send_listen_v_1_finalize(self, message: ListenV1Finalize) -> None:
6565
"""
@@ -135,12 +135,12 @@ def start_listening(self):
135135
finally:
136136
self._emit(EventType.CLOSE, None)
137137

138-
def send_listen_v_1_media(self, message: bytes) -> None:
138+
def send_listen_v_1_media(self, message: str) -> None:
139139
"""
140-
Send binary audio data to the websocket connection.
141-
The message will be sent as bytes.
140+
Send a message to the websocket connection.
141+
The message will be sent as a str.
142142
"""
143-
self._send(message)
143+
self._send_model(message)
144144

145145
def send_listen_v_1_finalize(self, message: ListenV1Finalize) -> None:
146146
"""

src/deepgram/listen/v1/types/listen_v1results_channel_alternatives_item.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class ListenV1ResultsChannelAlternativesItem(UniversalBaseModel):
1818
The confidence of the transcription
1919
"""
2020

21-
languages: typing.List[str]
21+
languages: typing.Optional[typing.List[str]] = None
2222
words: typing.List[ListenV1ResultsChannelAlternativesItemWordsItem]
2323

2424
if IS_PYDANTIC_V2:

src/deepgram/listen/v1/types/listen_v1results_channel_alternatives_item_words_item.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ class ListenV1ResultsChannelAlternativesItemWordsItem(UniversalBaseModel):
2727
The confidence of the word
2828
"""
2929

30-
language: str = pydantic.Field()
30+
language: typing.Optional[str] = pydantic.Field(default=None)
3131
"""
3232
The language of the word
3333
"""
3434

35-
punctuated_word: str = pydantic.Field()
35+
punctuated_word: typing.Optional[str] = pydantic.Field(default=None)
3636
"""
3737
The punctuated word of the word
3838
"""

src/deepgram/listen/v2/socket_client.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ async def start_listening(self):
5151
finally:
5252
await self._emit_async(EventType.CLOSE, None)
5353

54-
async def send_listen_v_2_media(self, message: bytes) -> None:
54+
async def send_listen_v_2_media(self, message: str) -> None:
5555
"""
56-
Send binary audio data to the websocket connection.
57-
The message will be sent as bytes.
56+
Send a message to the websocket connection.
57+
The message will be sent as a str.
5858
"""
59-
await self._send(message)
59+
await self._send_model(message)
6060

6161
async def send_listen_v_2_close_stream(self, message: ListenV2CloseStream) -> None:
6262
"""
@@ -118,12 +118,12 @@ def start_listening(self):
118118
finally:
119119
self._emit(EventType.CLOSE, None)
120120

121-
def send_listen_v_2_media(self, message: bytes) -> None:
121+
def send_listen_v_2_media(self, message: str) -> None:
122122
"""
123-
Send binary audio data to the websocket connection.
124-
The message will be sent as bytes.
123+
Send a message to the websocket connection.
124+
The message will be sent as a str.
125125
"""
126-
self._send(message)
126+
self._send_model(message)
127127

128128
def send_listen_v_2_close_stream(self, message: ListenV2CloseStream) -> None:
129129
"""

src/deepgram/types/speak_v1sample_rate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
import typing
44

5-
SpeakV1SampleRate = typing.Union[typing.Literal["8000", "16000", "24000", "44100", "48000"], typing.Any]
5+
SpeakV1SampleRate = typing.Union[typing.Literal["8000", "16000", "24000", "32000", "48000"], typing.Any]

0 commit comments

Comments
 (0)