From 54626bb5dc6ebb480c2d6b28a38ed84fe0d38371 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Thu, 24 Sep 2026 03:09:11 +0000 Subject: [PATCH 1/3] [fern-generated] Update SDK Generated by Fern CLI Version: unknown Generators: - fernapi/fern-python-sdk: 4.37.0 --- .fern/metadata.json | 2 +- .gitignore | 2 - ...ts_request_properties_advanced_features.py | 2 +- ...rt_agents_request_properties_parameters.py | 6 ++ ...nts_request_properties_parameters_speak.py | 29 +++++++ src/agora_agent/core/client_wrapper.py | 4 +- src/agora_agent/types/asr.py | 17 ++++ src/agora_agent/types/deepgram_asr_params.py | 2 +- src/agora_agent/types/rtzr_asr.py | 27 ++++++ src/agora_agent/types/rtzr_asr_params.py | 82 +++++++++++++++++++ src/agora_agent/types/sarvam_tts_params.py | 24 ++++-- .../types/speechmatics_asr_params.py | 37 +-------- 12 files changed, 184 insertions(+), 50 deletions(-) create mode 100644 src/agora_agent/agents/types/start_agents_request_properties_parameters_speak.py create mode 100644 src/agora_agent/types/rtzr_asr.py create mode 100644 src/agora_agent/types/rtzr_asr_params.py diff --git a/.fern/metadata.json b/.fern/metadata.json index 62289a3..764f419 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -14,5 +14,5 @@ }, "exclude_types_from_init_exports": true }, - "originGitCommit": "26314a9d3199f5e135302c3c3645b6bbb8f556d4" + "originGitCommit": "9b9b2fa1161d85c0e7da5c783a8bc4e2b4dae7c0" } \ 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/agents/types/start_agents_request_properties_advanced_features.py b/src/agora_agent/agents/types/start_agents_request_properties_advanced_features.py index 667e20e..e75f098 100644 --- a/src/agora_agent/agents/types/start_agents_request_properties_advanced_features.py +++ b/src/agora_agent/agents/types/start_agents_request_properties_advanced_features.py @@ -29,7 +29,7 @@ class StartAgentsRequestPropertiesAdvancedFeatures(UncheckedBaseModel): enable_tools: typing.Optional[bool] = pydantic.Field(default=None) """ - Enable invocation for MCP servers and inline REST tools. + Enable tool invocation. When enabled, the agent can invoke tools provided by the MCP server to implement advanced functionality. """ if IS_PYDANTIC_V2: diff --git a/src/agora_agent/agents/types/start_agents_request_properties_parameters.py b/src/agora_agent/agents/types/start_agents_request_properties_parameters.py index 33bb237..d3153e9 100644 --- a/src/agora_agent/agents/types/start_agents_request_properties_parameters.py +++ b/src/agora_agent/agents/types/start_agents_request_properties_parameters.py @@ -15,6 +15,7 @@ from .start_agents_request_properties_parameters_silence_config import ( StartAgentsRequestPropertiesParametersSilenceConfig, ) +from .start_agents_request_properties_parameters_speak import StartAgentsRequestPropertiesParametersSpeak class StartAgentsRequestPropertiesParameters(UncheckedBaseModel): @@ -22,6 +23,11 @@ class StartAgentsRequestPropertiesParameters(UncheckedBaseModel): Agent configuration parameters. """ + speak: typing.Optional[StartAgentsRequestPropertiesParametersSpeak] = pydantic.Field(default=None) + """ + Settings for the agent's speak behavior. + """ + silence_config: typing.Optional[StartAgentsRequestPropertiesParametersSilenceConfig] = pydantic.Field(default=None) """ Settings related to agent silence behavior. Does not apply when you integrate a `mllm`. diff --git a/src/agora_agent/agents/types/start_agents_request_properties_parameters_speak.py b/src/agora_agent/agents/types/start_agents_request_properties_parameters_speak.py new file mode 100644 index 0000000..95003bc --- /dev/null +++ b/src/agora_agent/agents/types/start_agents_request_properties_parameters_speak.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ...core.pydantic_utilities import IS_PYDANTIC_V2 +from ...core.unchecked_base_model import UncheckedBaseModel + + +class StartAgentsRequestPropertiesParametersSpeak(UncheckedBaseModel): + """ + Settings for the agent's speak behavior. + """ + + batch: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether to skip sentence segmentation for speak requests: + - `false`: Skip sentence segmentation. + - Omitted or `true`: Preserve sentence segmentation. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/agora_agent/core/client_wrapper.py b/src/agora_agent/core/client_wrapper.py index 8ce1e55..ad3aa18 100644 --- a/src/agora_agent/core/client_wrapper.py +++ b/src/agora_agent/core/client_wrapper.py @@ -26,10 +26,10 @@ def __init__( def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { - "User-Agent": "agora-agents/v2.11.0", + "User-Agent": "agora-agents/v2.12.0", "X-Fern-Language": "Python", "X-Fern-SDK-Name": "agora-agents", - "X-Fern-SDK-Version": "v2.11.0", + "X-Fern-SDK-Version": "v2.12.0", **(self.get_custom_headers() or {}), } headers["Authorization"] = httpx.BasicAuth(self._get_username(), self._get_password())._auth_header diff --git a/src/agora_agent/types/asr.py b/src/agora_agent/types/asr.py index 838ea54..dc5461d 100644 --- a/src/agora_agent/types/asr.py +++ b/src/agora_agent/types/asr.py @@ -18,6 +18,7 @@ from .google_asr_params import GoogleAsrParams from .microsoft_asr_params import MicrosoftAsrParams from .open_ai_asr_params import OpenAiAsrParams +from .rtzr_asr_params import RtzrAsrParams from .sarvam_asr_params import SarvamAsrParams from .smallest_ai_asr_params import SmallestAiAsrParams from .speechmatics_asr_params import SpeechmaticsAsrParams @@ -210,6 +211,21 @@ class Config: extra = pydantic.Extra.allow +class Asr_Rtzr(UncheckedBaseModel): + vendor: typing.Literal["rtzr"] = "rtzr" + language: typing.Optional[AsrLanguage] = None + params: RtzrAsrParams + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + class Asr_Xai(UncheckedBaseModel): vendor: typing.Literal["xai"] = "xai" language: typing.Optional[AsrLanguage] = None @@ -299,6 +315,7 @@ class Config: Asr_Assemblyai, Asr_Speechmatics, Asr_Sarvam, + Asr_Rtzr, Asr_Xai, Asr_Xfyun, Asr_XfyunBigmodel, diff --git a/src/agora_agent/types/deepgram_asr_params.py b/src/agora_agent/types/deepgram_asr_params.py index 6688333..e1f3656 100644 --- a/src/agora_agent/types/deepgram_asr_params.py +++ b/src/agora_agent/types/deepgram_asr_params.py @@ -17,7 +17,7 @@ class DeepgramAsrParams(UncheckedBaseModel): WebSocket URL for Deepgram's streaming API """ - key: str = pydantic.Field() + api_key: str = pydantic.Field() """ Deepgram API key """ diff --git a/src/agora_agent/types/rtzr_asr.py b/src/agora_agent/types/rtzr_asr.py new file mode 100644 index 0000000..e49023d --- /dev/null +++ b/src/agora_agent/types/rtzr_asr.py @@ -0,0 +1,27 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .asr_language import AsrLanguage +from .rtzr_asr_params import RtzrAsrParams + + +class RtzrAsr(UncheckedBaseModel): + """ + RTZR ASR configuration. + """ + + language: typing.Optional[AsrLanguage] = None + params: RtzrAsrParams + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/agora_agent/types/rtzr_asr_params.py b/src/agora_agent/types/rtzr_asr_params.py new file mode 100644 index 0000000..40f2baa --- /dev/null +++ b/src/agora_agent/types/rtzr_asr_params.py @@ -0,0 +1,82 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class RtzrAsrParams(UncheckedBaseModel): + """ + RTZR ASR configuration parameters. + """ + + client_id: str = pydantic.Field() + """ + RTZR client ID. + """ + + client_secret: str = pydantic.Field() + """ + RTZR client secret. + """ + + api_base: typing.Optional[str] = pydantic.Field(default=None) + """ + RTZR API base URL. + """ + + model_name: typing.Optional[str] = pydantic.Field(default=None) + """ + RTZR recognition model name. + """ + + language: typing.Optional[str] = pydantic.Field(default=None) + """ + RTZR recognition language code. Defaults to Korean (`ko`). + """ + + sample_rate: typing.Optional[int] = pydantic.Field(default=None) + """ + Input audio sample rate in Hz. + """ + + encoding: typing.Optional[str] = pydantic.Field(default=None) + """ + Input audio encoding. + """ + + use_itn: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether to enable inverse text normalization. + """ + + use_disfluency_filter: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether to filter disfluencies such as stuttering. + """ + + use_profanity_filter: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether to filter profanity. + """ + + use_punctuation: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether to add punctuation to the recognized text. + """ + + keywords: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Keywords to improve recognition accuracy. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/agora_agent/types/sarvam_tts_params.py b/src/agora_agent/types/sarvam_tts_params.py index 855299f..d544dea 100644 --- a/src/agora_agent/types/sarvam_tts_params.py +++ b/src/agora_agent/types/sarvam_tts_params.py @@ -20,32 +20,42 @@ class SarvamTtsParams(UncheckedBaseModel): speaker: str = pydantic.Field() """ - Voice ID (e.g., anushka, abhilash, karun, hitesh, manisha, vidya, arya) + Speaker voice to use. """ target_language_code: SarvamTtsParamsTargetLanguageCode = pydantic.Field() """ - Target language code (e.g., en-IN) + Target language code in BCP-47 format (e.g., `hi-IN`, `bn-IN`, `en-IN`). """ pitch: typing.Optional[float] = pydantic.Field(default=None) """ - Pitch adjustment for the voice + Pitch control for the `bulbul:v2` model. """ pace: typing.Optional[float] = pydantic.Field(default=None) """ - Speed of speech + Speech speed. Defaults to `1.0`. """ loudness: typing.Optional[float] = pydantic.Field(default=None) """ - Volume level of the speech + Audio loudness control for the `bulbul:v2` model. """ - sample_rate: typing.Optional[float] = pydantic.Field(default=None) + speech_sample_rate: typing.Optional[int] = pydantic.Field(default=None) """ - Audio sample rate in Hz + Output speech sample rate in Hz. Defaults to `24000`. + """ + + enable_preprocessing: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether to normalize English words and numeric entities. Defaults to `false`. + """ + + model: typing.Optional[str] = pydantic.Field(default=None) + """ + TTS model to use. Defaults to `bulbul:v3`. """ if IS_PYDANTIC_V2: 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 5c24bae0902eb9a68bdcdf4ffe4beed27ef429b5 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Thu, 24 Sep 2026 03:09:11 +0000 Subject: [PATCH 2/3] [fern-replay] Applied customizations Patches applied (3): - patch-13d8e068: chore: ignore local venv and planning docs - patch-a065088b: fix(vendors): send Speechmatics STT key instead of api_key - patch-33a436b3: fix: address v2.8.0 release review findings Patches with unresolved conflicts (1): - patch-ec343a2b: feat(agentkit): add Gemini TTS preview for v2.11.0 Run `fern-replay resolve` to apply these customizations. --- .fern/replay.lock | 15 ++++++-- .gitignore | 2 + ...ts_request_properties_advanced_features.py | 2 +- .../types/speechmatics_asr_params.py | 37 ++++++++++++++++++- 4 files changed, 50 insertions(+), 6 deletions(-) diff --git a/.fern/replay.lock b/.fern/replay.lock index 699a092..2cf319c 100644 --- a/.fern/replay.lock +++ b/.fern/replay.lock @@ -72,14 +72,20 @@ generations: cli_version: unknown generator_versions: fernapi/fern-python-sdk: 4.37.0 -current_generation: f7e9b5d993665a16b43eb1d7d442b118fbeffa4b + - commit_sha: 88a3914f38e882be10f7a0a6cba18e6f5ec98259 + tree_hash: 0315c486fe5d65313c32c2127af67aaa39f8acf7 + timestamp: 2026-09-24T03:09:07.591Z + cli_version: unknown + generator_versions: + fernapi/fern-python-sdk: 4.37.0 +current_generation: 88a3914f38e882be10f7a0a6cba18e6f5ec98259 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: f7e9b5d993665a16b43eb1d7d442b118fbeffa4b + base_generation: 88a3914f38e882be10f7a0a6cba18e6f5ec98259 files: - .gitignore patch_content: | @@ -108,7 +114,7 @@ patches: original_commit: a065088b4c45e2ca7e1bb91b1a899b8444800121 original_message: "fix(vendors): send Speechmatics STT key instead of api_key" original_author: digitallysavvy - base_generation: f7e9b5d993665a16b43eb1d7d442b118fbeffa4b + base_generation: 88a3914f38e882be10f7a0a6cba18e6f5ec98259 files: - src/agora_agent/types/speechmatics_asr_params.py patch_content: | @@ -251,7 +257,7 @@ patches: original_commit: 33a436b3bdb6f2a6fe4d8987b6536c2f0ac2862e original_message: "fix: address v2.8.0 release review findings" original_author: digitallysavvy - base_generation: f7e9b5d993665a16b43eb1d7d442b118fbeffa4b + base_generation: 88a3914f38e882be10f7a0a6cba18e6f5ec98259 files: - src/agora_agent/agents/types/start_agents_request_properties_advanced_features.py patch_content: | @@ -312,3 +318,4 @@ patches: frozen = True smart_union = True extra = pydantic.Extra.allow + user_owned: true 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/agents/types/start_agents_request_properties_advanced_features.py b/src/agora_agent/agents/types/start_agents_request_properties_advanced_features.py index e75f098..667e20e 100644 --- a/src/agora_agent/agents/types/start_agents_request_properties_advanced_features.py +++ b/src/agora_agent/agents/types/start_agents_request_properties_advanced_features.py @@ -29,7 +29,7 @@ class StartAgentsRequestPropertiesAdvancedFeatures(UncheckedBaseModel): enable_tools: typing.Optional[bool] = pydantic.Field(default=None) """ - Enable tool invocation. When enabled, the agent can invoke tools provided by the MCP server to implement advanced functionality. + Enable invocation for MCP servers and inline REST tools. """ if IS_PYDANTIC_V2: 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: From 60066996cf46d9364f17b5fed6757cba2c179842 Mon Sep 17 00:00:00 2001 From: seymourtang Date: Thu, 24 Sep 2026 12:04:31 +0800 Subject: [PATCH 3/3] [fern-replay] Resolved conflicts Patches replayed: - patch-13d8e068: chore: ignore local venv and planning docs - patch-a065088b: fix(vendors): send Speechmatics STT key instead of api_key - patch-33a436b3: fix: address v2.8.0 release review findings - patch-ec343a2b: feat(agentkit): add Gemini TTS preview for v2.11.0 --- .fern/replay.lock | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.fern/replay.lock b/.fern/replay.lock index 2cf319c..8103718 100644 --- a/.fern/replay.lock +++ b/.fern/replay.lock @@ -79,6 +79,8 @@ generations: generator_versions: fernapi/fern-python-sdk: 4.37.0 current_generation: 88a3914f38e882be10f7a0a6cba18e6f5ec98259 +forgotten_hashes: + - sha256:19124603cb0683406e750ffda0725786727208c0f7ddb481c256a0990b2c5585 patches: - id: patch-13d8e068 content_hash: sha256:97d879ab169016b9abaf1866427a8ebc45af608f69e063a07e5126c9613c329b