Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"cliVersion": "4.67.1",
"cliVersion": "4.79.3",
"generatorName": "fernapi/fern-python-sdk",
"generatorVersion": "4.62.0",
"generatorConfig": {
Expand All @@ -16,6 +16,6 @@
"skip_validation": true
}
},
"originGitCommit": "aa8e0677bcaea82c02a5934c61d195b35921b33d",
"originGitCommit": "356c3399be913ae12571385467bc3fde37e195b2",
"sdkVersion": "6.1.2"
}
6 changes: 0 additions & 6 deletions .fernignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ src/deepgram/listen/v1/socket_client.py
src/deepgram/listen/v2/socket_client.py
src/deepgram/speak/v1/socket_client.py

# Type files with manual int type corrections (Fern generates float for speaker/channel/num_words)
# [temporarily frozen — waiting on internal-api-specs#205]
src/deepgram/types/listen_v1response_results_utterances_item.py
src/deepgram/types/listen_v1response_results_utterances_item_words_item.py
src/deepgram/types/listen_v1response_results_channels_item_alternatives_item_paragraphs_paragraphs_item.py

# Hand-written custom tests
tests/custom/test_text_builder.py
tests/custom/test_transport.py
Expand Down
6 changes: 3 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AgentV1SettingsAudioInputParams(typing_extensions.TypedDict):
Audio encoding format
"""

sample_rate: float
sample_rate: int
"""
Sample rate in Hz. Common values are 16000, 24000, 44100, 48000
"""
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ class AgentV1SettingsAudioOutputParams(typing_extensions.TypedDict):
Audio encoding format for streaming TTS output
"""

sample_rate: typing_extensions.NotRequired[float]
sample_rate: typing_extensions.NotRequired[int]
"""
Sample rate in Hz
"""

bitrate: typing_extensions.NotRequired[float]
bitrate: typing_extensions.NotRequired[int]
"""
Audio bitrate in bits per second
"""
Expand Down
4 changes: 2 additions & 2 deletions src/deepgram/agent/v1/settings/think/models/raw_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def list(
"""
_response = self._client_wrapper.httpx_client.request(
"v1/agent/settings/think/models",
base_url=self._client_wrapper.get_environment().base,
base_url=self._client_wrapper.get_environment().agent,
method="GET",
request_options=request_options,
)
Expand Down Expand Up @@ -87,7 +87,7 @@ async def list(
"""
_response = await self._client_wrapper.httpx_client.request(
"v1/agent/settings/think/models",
base_url=self._client_wrapper.get_environment().base,
base_url=self._client_wrapper.get_environment().agent,
method="GET",
request_options=request_options,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class AgentV1SettingsAudioInput(UncheckedBaseModel):
Audio encoding format
"""

sample_rate: float = pydantic.Field()
sample_rate: int = pydantic.Field()
"""
Sample rate in Hz. Common values are 16000, 24000, 44100, 48000
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ class AgentV1SettingsAudioOutput(UncheckedBaseModel):
Audio encoding format for streaming TTS output
"""

sample_rate: typing.Optional[float] = pydantic.Field(default=None)
sample_rate: typing.Optional[int] = pydantic.Field(default=None)
"""
Sample rate in Hz
"""

bitrate: typing.Optional[float] = pydantic.Field(default=None)
bitrate: typing.Optional[int] = pydantic.Field(default=None)
"""
Audio bitrate in bits per second
"""
Expand Down
4 changes: 0 additions & 4 deletions src/deepgram/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

class DeepgramClientEnvironment:
PRODUCTION: DeepgramClientEnvironment
AGENT: DeepgramClientEnvironment

def __init__(self, *, base: str, agent: str, production: str):
self.base = base
Expand All @@ -16,6 +15,3 @@ def __init__(self, *, base: str, agent: str, production: str):
DeepgramClientEnvironment.PRODUCTION = DeepgramClientEnvironment(
base="https://api.deepgram.com", agent="wss://agent.deepgram.com", production="wss://api.deepgram.com"
)
DeepgramClientEnvironment.AGENT = DeepgramClientEnvironment(
base="https://agent.deepgram.com", agent="wss://agent.deepgram.com", production="wss://api.deepgram.com"
)
24 changes: 24 additions & 0 deletions src/deepgram/listen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,16 @@
ListenV2CloseStream,
ListenV2CloseStreamParams,
ListenV2CloseStreamType,
ListenV2Configure,
ListenV2ConfigureFailure,
ListenV2ConfigureFailureParams,
ListenV2ConfigureParams,
ListenV2ConfigureSuccess,
ListenV2ConfigureSuccessParams,
ListenV2ConfigureSuccessThresholds,
ListenV2ConfigureSuccessThresholdsParams,
ListenV2ConfigureThresholds,
ListenV2ConfigureThresholdsParams,
ListenV2Connected,
ListenV2ConnectedParams,
ListenV2FatalError,
Expand Down Expand Up @@ -87,8 +95,16 @@
"ListenV2CloseStream": ".v2",
"ListenV2CloseStreamParams": ".v2",
"ListenV2CloseStreamType": ".v2",
"ListenV2Configure": ".v2",
"ListenV2ConfigureFailure": ".v2",
"ListenV2ConfigureFailureParams": ".v2",
"ListenV2ConfigureParams": ".v2",
"ListenV2ConfigureSuccess": ".v2",
"ListenV2ConfigureSuccessParams": ".v2",
"ListenV2ConfigureSuccessThresholds": ".v2",
"ListenV2ConfigureSuccessThresholdsParams": ".v2",
"ListenV2ConfigureThresholds": ".v2",
"ListenV2ConfigureThresholdsParams": ".v2",
"ListenV2Connected": ".v2",
"ListenV2ConnectedParams": ".v2",
"ListenV2FatalError": ".v2",
Expand Down Expand Up @@ -157,8 +173,16 @@ def __dir__():
"ListenV2CloseStream",
"ListenV2CloseStreamParams",
"ListenV2CloseStreamType",
"ListenV2Configure",
"ListenV2ConfigureFailure",
"ListenV2ConfigureFailureParams",
"ListenV2ConfigureParams",
"ListenV2ConfigureSuccess",
"ListenV2ConfigureSuccessParams",
"ListenV2ConfigureSuccessThresholds",
"ListenV2ConfigureSuccessThresholdsParams",
"ListenV2ConfigureThresholds",
"ListenV2ConfigureThresholdsParams",
"ListenV2Connected",
"ListenV2ConnectedParams",
"ListenV2FatalError",
Expand Down
2 changes: 2 additions & 0 deletions src/deepgram/listen/v1/media/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ def transcribe_url(
dictation=True,
encoding="linear16",
filler_words=True,
keyterm=["keyterm"],
keywords="keywords",
language="language",
measurements=True,
Expand Down Expand Up @@ -714,6 +715,7 @@ async def main() -> None:
dictation=True,
encoding="linear16",
filler_words=True,
keyterm=["keyterm"],
keywords="keywords",
language="language",
measurements=True,
Expand Down
2 changes: 1 addition & 1 deletion src/deepgram/listen/v1/requests/listen_v1metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class ListenV1MetadataParams(typing_extensions.TypedDict):
The duration
"""

channels: float
channels: int
"""
The channels
"""
2 changes: 1 addition & 1 deletion src/deepgram/listen/v1/requests/listen_v1results.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ListenV1ResultsParams(typing_extensions.TypedDict):
Message type identifier
"""

channel_index: typing.Sequence[float]
channel_index: typing.Sequence[int]
"""
The index of the channel
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class ListenV1ResultsChannelAlternativesItemWordsItemParams(typing_extensions.Ty
The punctuated word of the word
"""

speaker: typing_extensions.NotRequired[float]
speaker: typing_extensions.NotRequired[int]
"""
The speaker of the word
"""
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class ListenV1SpeechStartedParams(typing_extensions.TypedDict):
Message type identifier
"""

channel: typing.Sequence[float]
channel: typing.Sequence[int]
"""
The channel
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class ListenV1UtteranceEndParams(typing_extensions.TypedDict):
Message type identifier
"""

channel: typing.Sequence[float]
channel: typing.Sequence[int]
"""
The channel
"""
Expand Down
2 changes: 1 addition & 1 deletion src/deepgram/listen/v1/types/listen_v1metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class ListenV1Metadata(UncheckedBaseModel):
The duration
"""

channels: float = pydantic.Field()
channels: int = pydantic.Field()
"""
The channels
"""
Expand Down
2 changes: 1 addition & 1 deletion src/deepgram/listen/v1/types/listen_v1results.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ListenV1Results(UncheckedBaseModel):
Message type identifier
"""

channel_index: typing.List[float] = pydantic.Field()
channel_index: typing.List[int] = pydantic.Field()
"""
The index of the channel
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class ListenV1ResultsChannelAlternativesItemWordsItem(UncheckedBaseModel):
The punctuated word of the word
"""

speaker: typing.Optional[float] = pydantic.Field(default=None)
speaker: typing.Optional[int] = pydantic.Field(default=None)
"""
The speaker of the word
"""
Expand Down
2 changes: 1 addition & 1 deletion src/deepgram/listen/v1/types/listen_v1speech_started.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ListenV1SpeechStarted(UncheckedBaseModel):
Message type identifier
"""

channel: typing.List[float] = pydantic.Field()
channel: typing.List[int] = pydantic.Field()
"""
The channel
"""
Expand Down
2 changes: 1 addition & 1 deletion src/deepgram/listen/v1/types/listen_v1utterance_end.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ListenV1UtteranceEnd(UncheckedBaseModel):
Message type identifier
"""

channel: typing.List[float] = pydantic.Field()
channel: typing.List[int] = pydantic.Field()
"""
The channel
"""
Expand Down
24 changes: 24 additions & 0 deletions src/deepgram/listen/v2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
from .types import (
ListenV2CloseStream,
ListenV2CloseStreamType,
ListenV2Configure,
ListenV2ConfigureFailure,
ListenV2ConfigureSuccess,
ListenV2ConfigureSuccessThresholds,
ListenV2ConfigureThresholds,
ListenV2Connected,
ListenV2FatalError,
ListenV2TurnInfo,
Expand All @@ -19,6 +23,10 @@
from .requests import (
ListenV2CloseStreamParams,
ListenV2ConfigureFailureParams,
ListenV2ConfigureParams,
ListenV2ConfigureSuccessParams,
ListenV2ConfigureSuccessThresholdsParams,
ListenV2ConfigureThresholdsParams,
ListenV2ConnectedParams,
ListenV2FatalErrorParams,
ListenV2TurnInfoParams,
Expand All @@ -28,8 +36,16 @@
"ListenV2CloseStream": ".types",
"ListenV2CloseStreamParams": ".requests",
"ListenV2CloseStreamType": ".types",
"ListenV2Configure": ".types",
"ListenV2ConfigureFailure": ".types",
"ListenV2ConfigureFailureParams": ".requests",
"ListenV2ConfigureParams": ".requests",
"ListenV2ConfigureSuccess": ".types",
"ListenV2ConfigureSuccessParams": ".requests",
"ListenV2ConfigureSuccessThresholds": ".types",
"ListenV2ConfigureSuccessThresholdsParams": ".requests",
"ListenV2ConfigureThresholds": ".types",
"ListenV2ConfigureThresholdsParams": ".requests",
"ListenV2Connected": ".types",
"ListenV2ConnectedParams": ".requests",
"ListenV2FatalError": ".types",
Expand Down Expand Up @@ -67,8 +83,16 @@ def __dir__():
"ListenV2CloseStream",
"ListenV2CloseStreamParams",
"ListenV2CloseStreamType",
"ListenV2Configure",
"ListenV2ConfigureFailure",
"ListenV2ConfigureFailureParams",
"ListenV2ConfigureParams",
"ListenV2ConfigureSuccess",
"ListenV2ConfigureSuccessParams",
"ListenV2ConfigureSuccessThresholds",
"ListenV2ConfigureSuccessThresholdsParams",
"ListenV2ConfigureThresholds",
"ListenV2ConfigureThresholdsParams",
"ListenV2Connected",
"ListenV2ConnectedParams",
"ListenV2FatalError",
Expand Down
12 changes: 12 additions & 0 deletions src/deepgram/listen/v2/requests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,22 @@

if typing.TYPE_CHECKING:
from .listen_v2close_stream import ListenV2CloseStreamParams
from .listen_v2configure import ListenV2ConfigureParams
from .listen_v2configure_failure import ListenV2ConfigureFailureParams
from .listen_v2configure_success import ListenV2ConfigureSuccessParams
from .listen_v2configure_success_thresholds import ListenV2ConfigureSuccessThresholdsParams
from .listen_v2configure_thresholds import ListenV2ConfigureThresholdsParams
from .listen_v2connected import ListenV2ConnectedParams
from .listen_v2fatal_error import ListenV2FatalErrorParams
from .listen_v2turn_info import ListenV2TurnInfoParams
from .listen_v2turn_info_words_item import ListenV2TurnInfoWordsItemParams
_dynamic_imports: typing.Dict[str, str] = {
"ListenV2CloseStreamParams": ".listen_v2close_stream",
"ListenV2ConfigureFailureParams": ".listen_v2configure_failure",
"ListenV2ConfigureParams": ".listen_v2configure",
"ListenV2ConfigureSuccessParams": ".listen_v2configure_success",
"ListenV2ConfigureSuccessThresholdsParams": ".listen_v2configure_success_thresholds",
"ListenV2ConfigureThresholdsParams": ".listen_v2configure_thresholds",
"ListenV2ConnectedParams": ".listen_v2connected",
"ListenV2FatalErrorParams": ".listen_v2fatal_error",
"ListenV2TurnInfoParams": ".listen_v2turn_info",
Expand Down Expand Up @@ -46,6 +54,10 @@ def __dir__():
__all__ = [
"ListenV2CloseStreamParams",
"ListenV2ConfigureFailureParams",
"ListenV2ConfigureParams",
"ListenV2ConfigureSuccessParams",
"ListenV2ConfigureSuccessThresholdsParams",
"ListenV2ConfigureThresholdsParams",
"ListenV2ConnectedParams",
"ListenV2FatalErrorParams",
"ListenV2TurnInfoParams",
Expand Down
Loading
Loading