From b20ff7a3aa430dbf4464aa5df3f8f1a88eb4bfa7 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Wed, 9 Sep 2026 15:14:05 +0000 Subject: [PATCH 1/2] [fern-generated] Update SDK Generated by Fern CLI Version: unknown Generators: - fernapi/fern-python-sdk: 4.37.0 --- .fern/metadata.json | 2 +- .gitignore | 2 - src/agora_agent/types/gemini_asr_params.py | 23 +++++++++++- .../types/gemini_asr_params_mode.py | 5 +++ .../types/speechmatics_asr_params.py | 37 +------------------ 5 files changed, 29 insertions(+), 40 deletions(-) create mode 100644 src/agora_agent/types/gemini_asr_params_mode.py diff --git a/.fern/metadata.json b/.fern/metadata.json index 0f155d5..f4f7a0d 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -14,5 +14,5 @@ }, "exclude_types_from_init_exports": true }, - "originGitCommit": "37ba641a90aa4496eb97146f05555706aaf92670" + "originGitCommit": "3fdb45ab45802742325afca544fdc22f5ae58db8" } \ No newline at end of file diff --git a/.gitignore b/.gitignore index 3e30921..d2e4ca8 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,3 @@ __pycache__/ dist/ poetry.toml -.venv/ -docs/superpowers/ diff --git a/src/agora_agent/types/gemini_asr_params.py b/src/agora_agent/types/gemini_asr_params.py index 0e9714a..ef064ef 100644 --- a/src/agora_agent/types/gemini_asr_params.py +++ b/src/agora_agent/types/gemini_asr_params.py @@ -5,6 +5,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel +from .gemini_asr_params_mode import GeminiAsrParamsMode class GeminiAsrParams(UncheckedBaseModel): @@ -32,9 +33,29 @@ class GeminiAsrParams(UncheckedBaseModel): The language code for speech recognition. This takes precedence over the top-level `asr.language` value. """ + language_hints: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Candidate language codes for transcription. When non-empty, these take precedence over language. + """ + + custom_vocabulary: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Words and phrases used to bias transcription. A non-empty custom vocabulary cannot be combined with word_timestamp. + """ + + mode: typing.Optional[GeminiAsrParamsMode] = pydantic.Field(default=None) + """ + Transcription output mode. SMART removes disfluencies and applies formatting; VERBATIM preserves literal speech. When omitted, the service defaults to VERBATIM. SMART cannot be combined with word_timestamp or diarization. + """ + word_timestamp: typing.Optional[bool] = pydantic.Field(default=None) """ - Whether to include word-level timestamps in the transcription results. + Whether to include word-level timestamps in the transcription results. Cannot be enabled when mode is SMART or custom_vocabulary is non-empty. + """ + + diarization: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether to include speaker labels in the transcription results. Cannot be enabled when mode is SMART. """ if IS_PYDANTIC_V2: diff --git a/src/agora_agent/types/gemini_asr_params_mode.py b/src/agora_agent/types/gemini_asr_params_mode.py new file mode 100644 index 0000000..75bbc7a --- /dev/null +++ b/src/agora_agent/types/gemini_asr_params_mode.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GeminiAsrParamsMode = typing.Union[typing.Literal["SMART", "VERBATIM"], typing.Any] diff --git a/src/agora_agent/types/speechmatics_asr_params.py b/src/agora_agent/types/speechmatics_asr_params.py index c1b7232..4709d22 100644 --- a/src/agora_agent/types/speechmatics_asr_params.py +++ b/src/agora_agent/types/speechmatics_asr_params.py @@ -12,19 +12,11 @@ class SpeechmaticsAsrParams(UncheckedBaseModel): Speechmatics ASR configuration parameters. """ - key: typing.Optional[str] = pydantic.Field(default=None) + api_key: str = pydantic.Field() """ Speechmatics API key """ - api_key: typing.Optional[str] = pydantic.Field( - default=None, - deprecated="Use key instead.", - ) - """ - Deprecated alias for key. The SDK normalizes it to key during validation. - """ - language: str = pydantic.Field() """ Language code to use for transcription @@ -35,33 +27,6 @@ class SpeechmaticsAsrParams(UncheckedBaseModel): WebSocket URL for the Speechmatics streaming API """ - if IS_PYDANTIC_V2: - - @pydantic.model_validator(mode="before") - @classmethod - def _normalize_api_key(cls, values: typing.Any) -> typing.Any: - if not isinstance(values, typing.Mapping): - return values - normalized = dict(values) - legacy_key = normalized.pop("api_key", None) - if legacy_key is not None: - normalized.setdefault("key", legacy_key) - if normalized.get("key") is None: - raise ValueError("SpeechmaticsAsrParams requires key") - return normalized - - else: - - @pydantic.root_validator(pre=True) - def _normalize_api_key(cls, values: typing.Dict[str, typing.Any]) -> typing.Dict[str, typing.Any]: - normalized = dict(values) - legacy_key = normalized.pop("api_key", None) - if legacy_key is not None: - normalized.setdefault("key", legacy_key) - if normalized.get("key") is None: - raise ValueError("SpeechmaticsAsrParams requires key") - return normalized - if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: From da12204a86c02e4433dded8a40d7e0881bb01450 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Wed, 9 Sep 2026 15:14:06 +0000 Subject: [PATCH 2/2] [fern-replay] Applied customizations Patches applied (2): - patch-13d8e068: chore: ignore local venv and planning docs - patch-a065088b: fix(vendors): send Speechmatics STT key instead of api_key --- .fern/replay.lock | 12 ++++-- .gitignore | 2 + .../types/speechmatics_asr_params.py | 37 ++++++++++++++++++- 3 files changed, 47 insertions(+), 4 deletions(-) diff --git a/.fern/replay.lock b/.fern/replay.lock index 9c78b96..a1ce605 100644 --- a/.fern/replay.lock +++ b/.fern/replay.lock @@ -60,14 +60,20 @@ generations: cli_version: unknown generator_versions: fernapi/fern-python-sdk: 4.37.0 -current_generation: 48b0250bddbc7acc02cd9da9fa06c1fefe1dd0f7 + - commit_sha: 3885ea61224cbf0671c305350b8d1cddef509443 + tree_hash: 2b9a17c0608360e1eb6044e97e414ae3d936d857 + timestamp: 2026-09-09T15:14:03.378Z + cli_version: unknown + generator_versions: + fernapi/fern-python-sdk: 4.37.0 +current_generation: 3885ea61224cbf0671c305350b8d1cddef509443 patches: - id: patch-13d8e068 content_hash: sha256:97d879ab169016b9abaf1866427a8ebc45af608f69e063a07e5126c9613c329b original_commit: 13d8e0683ffa08bcfc9a381eb9604adf5abdbe0b original_message: "chore: ignore local venv and planning docs" original_author: plutoless - base_generation: 48b0250bddbc7acc02cd9da9fa06c1fefe1dd0f7 + base_generation: 3885ea61224cbf0671c305350b8d1cddef509443 files: - .gitignore patch_content: | @@ -96,7 +102,7 @@ patches: original_commit: a065088b4c45e2ca7e1bb91b1a899b8444800121 original_message: "fix(vendors): send Speechmatics STT key instead of api_key" original_author: digitallysavvy - base_generation: 48b0250bddbc7acc02cd9da9fa06c1fefe1dd0f7 + base_generation: 3885ea61224cbf0671c305350b8d1cddef509443 files: - src/agora_agent/types/speechmatics_asr_params.py patch_content: | diff --git a/.gitignore b/.gitignore index d2e4ca8..3e30921 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ __pycache__/ dist/ poetry.toml +.venv/ +docs/superpowers/ diff --git a/src/agora_agent/types/speechmatics_asr_params.py b/src/agora_agent/types/speechmatics_asr_params.py index 4709d22..c1b7232 100644 --- a/src/agora_agent/types/speechmatics_asr_params.py +++ b/src/agora_agent/types/speechmatics_asr_params.py @@ -12,11 +12,19 @@ class SpeechmaticsAsrParams(UncheckedBaseModel): Speechmatics ASR configuration parameters. """ - api_key: str = pydantic.Field() + key: typing.Optional[str] = pydantic.Field(default=None) """ Speechmatics API key """ + api_key: typing.Optional[str] = pydantic.Field( + default=None, + deprecated="Use key instead.", + ) + """ + Deprecated alias for key. The SDK normalizes it to key during validation. + """ + language: str = pydantic.Field() """ Language code to use for transcription @@ -27,6 +35,33 @@ class SpeechmaticsAsrParams(UncheckedBaseModel): WebSocket URL for the Speechmatics streaming API """ + if IS_PYDANTIC_V2: + + @pydantic.model_validator(mode="before") + @classmethod + def _normalize_api_key(cls, values: typing.Any) -> typing.Any: + if not isinstance(values, typing.Mapping): + return values + normalized = dict(values) + legacy_key = normalized.pop("api_key", None) + if legacy_key is not None: + normalized.setdefault("key", legacy_key) + if normalized.get("key") is None: + raise ValueError("SpeechmaticsAsrParams requires key") + return normalized + + else: + + @pydantic.root_validator(pre=True) + def _normalize_api_key(cls, values: typing.Dict[str, typing.Any]) -> typing.Dict[str, typing.Any]: + normalized = dict(values) + legacy_key = normalized.pop("api_key", None) + if legacy_key is not None: + normalized.setdefault("key", legacy_key) + if normalized.get("key") is None: + raise ValueError("SpeechmaticsAsrParams requires key") + return normalized + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: