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
2 changes: 1 addition & 1 deletion .fern/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
},
"exclude_types_from_init_exports": true
},
"originGitCommit": "26314a9d3199f5e135302c3c3645b6bbb8f556d4"
"originGitCommit": "9b9b2fa1161d85c0e7da5c783a8bc4e2b4dae7c0"
}
15 changes: 11 additions & 4 deletions .fern/replay.lock

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

12 changes: 12 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/).

## [Unreleased]

### Added

- **RTZR global STT** — Added the global-only `RtzrSTT` AgentKit vendor with typed credentials, recognition options, vendor catalog registration, and generated request serialization.
- **Speak parameters** — Exposed the generated `SpeakConfig`/`ParametersSpeak` types through `SessionParams` so `parameters.speak.batch` can be configured with `Agent.with_parameters()`.

### Changed

- **Sarvam TTS v2.14 parameters** — Added `speech_sample_rate`, `enable_preprocessing`, `model`, and flattened `additional_params` support. The legacy `sample_rate` input remains supported as a deprecated alias.
- **Generated SDK alignment** — Updated AgentKit exports, global vendor routing, request validation, avatar sample-rate handling, documentation, and feature-focused regression tests for the latest `engine-v2.14` generated API.

## [v2.10.0] — 2026-09-18

### Added
Expand Down
1 change: 1 addition & 0 deletions docs/concepts/vendors.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ top-level `asr.keywords`. Both vendors also accept `additional_params`, serializ
| `AssemblyAISTT` | AssemblyAI | `api_key`, `language` |
| `AresSTT` | Ares | — (all optional) |
| `SarvamSTT` | Sarvam | `api_key`, `language` |
| `RtzrSTT` | RTZR | `client_id`, `client_secret` |
| `XaiSTT` | xAI | `api_key` |

### CN STT Vendors
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/regional-routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ If you omit `with_stt()`, AgentKit uses `FengmingSTT` by default for `Area.CN` c

| Client area | STT classes | LLM classes | MLLM classes | TTS classes | Avatar classes |
|---|---|---|---|---|---|
| `Area.US`, `Area.EU`, `Area.AP` | `DeepgramSTT`, `SpeechmaticsSTT`, `MicrosoftSTT`, `OpenAISTT`, `GeminiSTT`, `GoogleSTT`, `AmazonSTT`, `AssemblyAISTT`, `AresSTT`, `SarvamSTT`, `XaiSTT` | `OpenAI`, `AzureOpenAI`, `Anthropic`, `Gemini`, `Groq`, `VertexAILLM`, `AmazonBedrock`, `Dify`, `CustomLLM` | `OpenAIRealtime`, `AzureOpenAIRealtime`, `GeminiLive`, `VertexAI`, `XaiGrok` | `ElevenLabsTTS`, `MicrosoftTTS`, `OpenAITTS`, `CartesiaTTS`, `GoogleTTS`, `AmazonTTS`, `DeepgramTTS`, `GradiumTTS`, `MistralTTS`, `TypecastTTS`, `HumeAITTS`, `RimeTTS`, `FishAudioTTS`, `MiniMaxTTS`, `MurfTTS`, `SarvamTTS`, `GenericTTS`, `XaiTTS` | `LiveAvatarAvatar`, `HeyGenAvatar`, `AkoolAvatar`, `AnamAvatar`, `GenericAvatar` |
| `Area.US`, `Area.EU`, `Area.AP` | `DeepgramSTT`, `SpeechmaticsSTT`, `MicrosoftSTT`, `OpenAISTT`, `GeminiSTT`, `GoogleSTT`, `AmazonSTT`, `AssemblyAISTT`, `AresSTT`, `SarvamSTT`, `RtzrSTT`, `XaiSTT` | `OpenAI`, `AzureOpenAI`, `Anthropic`, `Gemini`, `Groq`, `VertexAILLM`, `AmazonBedrock`, `Dify`, `CustomLLM` | `OpenAIRealtime`, `AzureOpenAIRealtime`, `GeminiLive`, `VertexAI`, `XaiGrok` | `ElevenLabsTTS`, `MicrosoftTTS`, `OpenAITTS`, `CartesiaTTS`, `GoogleTTS`, `AmazonTTS`, `DeepgramTTS`, `GradiumTTS`, `MistralTTS`, `TypecastTTS`, `HumeAITTS`, `RimeTTS`, `FishAudioTTS`, `MiniMaxTTS`, `MurfTTS`, `SarvamTTS`, `GenericTTS`, `XaiTTS` | `LiveAvatarAvatar`, `HeyGenAvatar`, `AkoolAvatar`, `AnamAvatar`, `GenericAvatar` |
| `Area.CN` | `FengmingSTT`, `TencentSTT`, `MicrosoftCNSTT`, `XfyunSTT`, `XfyunBigModelSTT`, `XfyunDialectSTT` | `AliyunLLM`, `BytedanceLLM`, `DeepSeekLLM`, `TencentLLM` | `QwenOmni` | `MiniMaxCNTTS`, `TencentTTS`, `BytedanceTTS`, `MicrosoftCNTTS`, `CosyVoiceTTS`, `BytedanceDuplexTTS`, `StepFunTTS`, `GenericTTS` | `SenseTimeAvatar`, `SpatiusAvatar` |

Global client example:
Expand Down
1 change: 1 addition & 0 deletions docs/reference/agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ Enable or disable MCP and inline REST tool invocation by setting `advanced_featu
### `with_parameters(parameters: SessionParams) -> Agent`

Set session parameters (silence config, farewell config, data channel, audio scenario, etc.).
Use `SpeakConfig(batch=False)` in the `speak` field to control sentence segmentation for speak requests.

### `with_audio_scenario(audio_scenario: ParametersAudioScenario) -> Agent`

Expand Down
28 changes: 26 additions & 2 deletions docs/reference/vendors.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Construct vendors directly from `agora_agent`, then bind a client with `Agent(cl

| Area | STT classes | LLM classes | MLLM classes | TTS classes | Avatar classes |
|---|---|---|---|---|---|
| `Area.US`, `Area.EU`, `Area.AP` | `DeepgramSTT`, `SpeechmaticsSTT`, `MicrosoftSTT`, `OpenAISTT`, `GeminiSTT`, `GoogleSTT`, `AmazonSTT`, `AssemblyAISTT`, `AresSTT`, `SarvamSTT`, `XaiSTT` | `OpenAI`, `AzureOpenAI`, `Anthropic`, `Gemini`, `Groq`, `VertexAILLM`, `AmazonBedrock`, `Dify`, `CustomLLM` | `OpenAIRealtime`, `AzureOpenAIRealtime`, `GeminiLive`, `VertexAI`, `XaiGrok` | `ElevenLabsTTS`, `MicrosoftTTS`, `OpenAITTS`, `CartesiaTTS`, `GoogleTTS`, `AmazonTTS`, `DeepgramTTS`, `GradiumTTS`, `MistralTTS`, `TypecastTTS`, `HumeAITTS`, `RimeTTS`, `FishAudioTTS`, `MiniMaxTTS`, `MurfTTS`, `SarvamTTS`, `GenericTTS`, `XaiTTS` | `LiveAvatarAvatar`, `HeyGenAvatar`, `AkoolAvatar`, `AnamAvatar`, `GenericAvatar` |
| `Area.US`, `Area.EU`, `Area.AP` | `DeepgramSTT`, `SpeechmaticsSTT`, `MicrosoftSTT`, `OpenAISTT`, `GeminiSTT`, `GoogleSTT`, `AmazonSTT`, `AssemblyAISTT`, `AresSTT`, `SarvamSTT`, `RtzrSTT`, `XaiSTT` | `OpenAI`, `AzureOpenAI`, `Anthropic`, `Gemini`, `Groq`, `VertexAILLM`, `AmazonBedrock`, `Dify`, `CustomLLM` | `OpenAIRealtime`, `AzureOpenAIRealtime`, `GeminiLive`, `VertexAI`, `XaiGrok` | `ElevenLabsTTS`, `MicrosoftTTS`, `OpenAITTS`, `CartesiaTTS`, `GoogleTTS`, `AmazonTTS`, `DeepgramTTS`, `GradiumTTS`, `MistralTTS`, `TypecastTTS`, `HumeAITTS`, `RimeTTS`, `FishAudioTTS`, `MiniMaxTTS`, `MurfTTS`, `SarvamTTS`, `GenericTTS`, `XaiTTS` | `LiveAvatarAvatar`, `HeyGenAvatar`, `AkoolAvatar`, `AnamAvatar`, `GenericAvatar` |
| `Area.CN` | `FengmingSTT`, `TencentSTT`, `MicrosoftCNSTT`, `XfyunSTT`, `XfyunBigModelSTT`, `XfyunDialectSTT` | `AliyunLLM`, `BytedanceLLM`, `DeepSeekLLM`, `TencentLLM` | `QwenOmni` | `MiniMaxCNTTS`, `TencentTTS`, `BytedanceTTS`, `MicrosoftCNTTS`, `CosyVoiceTTS`, `BytedanceDuplexTTS`, `StepFunTTS`, `GenericTTS` | `SenseTimeAvatar`, `SpatiusAvatar` |

Global example:
Expand Down Expand Up @@ -446,7 +446,11 @@ AgentKit serializes `credential_mode` at the top level of the Rime TTS configura
| `pitch` | `float` | No | `None` | Pitch adjustment |
| `pace` | `float` | No | `None` | Speed of speech |
| `loudness` | `float` | No | `None` | Volume level |
| `sample_rate` | `int` | No | `None` | Audio sample rate |
| `speech_sample_rate` | `int` | No | `None` | Output speech sample rate in Hz |
| `enable_preprocessing` | `bool` | No | `None` | Normalize English words and numeric entities before synthesis |
| `model` | `str` | No | `None` | Sarvam TTS model; defaults to `bulbul:v3` |
| `sample_rate` | `int` | No | `None` | Deprecated alias for `speech_sample_rate` |
| `additional_params` | `Dict[str, Any]` | No | `None` | Additional Sarvam TTS parameters, flattened into `params` |
| `skip_patterns` | `List[int]` | No | `None` | Skip patterns |

### `SmallestAITTS`
Expand Down Expand Up @@ -636,6 +640,26 @@ stt = GeminiSTT(
| `language` | `str` | No | `None` | Language code for speech recognition |
| `additional_params` | `Dict[str, Any]` | No | `None` | Additional xAI STT parameters |

### `RtzrSTT`

Global-only RTZR speech-to-text provider (`asr.vendor: "rtzr"`).

| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `client_id` | `str` | Yes | — | RTZR client ID |
| `client_secret` | `str` | Yes | — | RTZR client secret |
| `api_base` | `str` | No | `None` | RTZR API base URL |
| `model_name` | `str` | No | `None` | RTZR recognition model name |
| `language` | `str` | No | `None` | RTZR recognition language code |
| `sample_rate` | `int` | No | `None` | Input audio sample rate in Hz |
| `encoding` | `str` | No | `None` | Input audio encoding |
| `use_itn` | `bool` | No | `None` | Enable inverse text normalization |
| `use_disfluency_filter` | `bool` | No | `None` | Filter disfluencies |
| `use_profanity_filter` | `bool` | No | `None` | Filter profanity |
| `use_punctuation` | `bool` | No | `None` | Add punctuation to recognized text |
| `keywords` | `List[str]` | No | `None` | Keywords that improve recognition accuracy |
| `additional_params` | `Dict[str, Any]` | No | `None` | Additional RTZR parameters |

### `SmallestAISTT`

Global-only Smallest AI speech-to-text provider (`asr.vendor: "smallestai"`).
Expand Down
3 changes: 3 additions & 0 deletions src/agora_agent/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@
OpenAIRealtime,
OpenAIGPTLive,
OpenAISTT,
RtzrSTT,
SpeakConfig,
ParametersSpeak,
OpenAITTS,
RimeTTS,
SarvamSTT,
Expand Down
6 changes: 6 additions & 0 deletions src/agora_agent/agentkit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
FarewellConfig,
ParametersDataChannel,
ParametersAudioScenario,
SpeakConfig,
ParametersSpeak,
InterruptionConfig,
InterruptionMode,
MllmTurnDetectionConfig,
Expand Down Expand Up @@ -207,6 +209,7 @@
OpenAIGPTLive,
OpenAISampleRate,
OpenAISTT,
RtzrSTT,
OpenAITTS,
GenericTTS,
RimeTTS,
Expand Down Expand Up @@ -303,6 +306,8 @@
"FarewellConfig",
"ParametersDataChannel",
"ParametersAudioScenario",
"SpeakConfig",
"ParametersSpeak",
"InterruptionConfig",
"InterruptionMode",
"MllmTurnDetectionConfig",
Expand Down Expand Up @@ -449,6 +454,7 @@
"MicrosoftSTT",
"MicrosoftCNSTT",
"OpenAISTT",
"RtzrSTT",
"GeminiSTT",
"GeminiSTTModels",
"GoogleSTT",
Expand Down
4 changes: 4 additions & 0 deletions src/agora_agent/agentkit/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
from ..agents.types.start_agents_request_properties_parameters_farewell_config import StartAgentsRequestPropertiesParametersFarewellConfig
from ..agents.types.start_agents_request_properties_parameters_data_channel import StartAgentsRequestPropertiesParametersDataChannel
from ..agents.types.start_agents_request_properties_parameters_audio_scenario import StartAgentsRequestPropertiesParametersAudioScenario
from ..agents.types.start_agents_request_properties_parameters_speak import StartAgentsRequestPropertiesParametersSpeak
from ..agents.types.start_agents_request_properties_interruption import StartAgentsRequestPropertiesInterruption
from ..agents.types.start_agents_request_properties_interruption_mode import StartAgentsRequestPropertiesInterruptionMode
from ..agents.types.start_agents_request_properties_geofence import StartAgentsRequestPropertiesGeofence
Expand Down Expand Up @@ -140,6 +141,8 @@
FarewellConfig = StartAgentsRequestPropertiesParametersFarewellConfig
ParametersDataChannel = StartAgentsRequestPropertiesParametersDataChannel
ParametersAudioScenario = StartAgentsRequestPropertiesParametersAudioScenario
SpeakConfig = StartAgentsRequestPropertiesParametersSpeak
ParametersSpeak = SpeakConfig
InterruptionConfig = StartAgentsRequestPropertiesInterruption
InterruptionMode = StartAgentsRequestPropertiesInterruptionMode
MllmTurnDetectionConfig = MllmTurnDetection
Expand All @@ -160,6 +163,7 @@


class SessionParamsInput(typing_extensions.TypedDict, total=False):
speak: StartAgentsRequestPropertiesParametersSpeak
silence_config: StartAgentsRequestPropertiesParametersSilenceConfig
farewell_config: StartAgentsRequestPropertiesParametersFarewellConfig
data_channel: StartAgentsRequestPropertiesParametersDataChannel
Expand Down
1 change: 1 addition & 0 deletions src/agora_agent/agentkit/agent_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ def _validate_avatar_config(self) -> None:
sample_rate = (
tts_params.get("sample_rate")
or tts_params.get("sample_rate_hertz")
or tts_params.get("speech_sample_rate")
or tts_params.get("samplingRate")
)
if isinstance(sample_rate, int):
Expand Down
2 changes: 1 addition & 1 deletion src/agora_agent/agentkit/presets.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def infer_asr_preset(asr: typing.Optional[typing.Dict[str, typing.Any]]) -> typi
if not asr or asr.get("vendor") != "deepgram":
return None
params = asr.get("params") or {}
if params.get("key"):
if params.get("api_key"):
return None
return _DEEPGRAM_MODEL_TO_PRESET.get(_normalize_model_name(params.get("model")) or "")

Expand Down
2 changes: 2 additions & 0 deletions src/agora_agent/agentkit/regional_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
GoogleSTT,
MicrosoftSTT,
OpenAISTT,
RtzrSTT,
SarvamSTT,
SmallestAISTT,
SpeechmaticsSTT,
Expand Down Expand Up @@ -91,6 +92,7 @@
AssemblyAISTT,
SpeechmaticsSTT,
SarvamSTT,
RtzrSTT,
SmallestAISTT,
XaiSTT,
]
Expand Down
2 changes: 2 additions & 0 deletions src/agora_agent/agentkit/vendors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
GoogleSTT,
MicrosoftSTT,
OpenAISTT,
RtzrSTT,
SarvamSTT,
SmallestAISTT,
SpeechmaticsSTT,
Expand Down Expand Up @@ -137,6 +138,7 @@
"MicrosoftSTT",
"MicrosoftCNSTT",
"OpenAISTT",
"RtzrSTT",
"GeminiSTT",
"GeminiSTTModels",
"GoogleSTT",
Expand Down
2 changes: 2 additions & 0 deletions src/agora_agent/agentkit/vendors/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
GoogleSTT,
MicrosoftSTT,
OpenAISTT,
RtzrSTT,
SarvamSTT,
SmallestAISTT,
SpeechmaticsSTT,
Expand Down Expand Up @@ -83,6 +84,7 @@ def __init__(
"assemblyai": AssemblyAISTT,
"speechmatics": SpeechmaticsSTT,
"sarvam": SarvamSTT,
"rtzr": RtzrSTT,
"smallestai": SmallestAISTT,
"xai": XaiSTT,
},
Expand Down
2 changes: 2 additions & 0 deletions src/agora_agent/agentkit/vendors/namespaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
GoogleSTT,
MicrosoftSTT,
OpenAISTT,
RtzrSTT,
SarvamSTT,
SmallestAISTT,
SpeechmaticsSTT,
Expand Down Expand Up @@ -62,6 +63,7 @@ class GlobalSTTVendors:
assemblyai = AssemblyAISTT
speechmatics = SpeechmaticsSTT
sarvam = SarvamSTT
rtzr = RtzrSTT
smallestai = SmallestAISTT
xai = XaiSTT

Expand Down
1 change: 1 addition & 0 deletions src/agora_agent/agentkit/vendors/region.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"assemblyai",
"speechmatics",
"sarvam",
"rtzr",
"smallestai",
"xai",
)
Expand Down
46 changes: 45 additions & 1 deletion src/agora_agent/agentkit/vendors/stt.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def to_config(self) -> Dict[str, Any]:
params: Dict[str, Any] = dict(self.additional_params or {})

if self.api_key is not None:
params["key"] = self.api_key
params["api_key"] = self.api_key
if self.model is not None:
params["model"] = self.model
if self.language is not None:
Expand All @@ -115,6 +115,50 @@ def to_config(self) -> Dict[str, Any]:
return config


class RtzrSTTOptions(BaseModel):
model_config = ConfigDict(extra="forbid")

client_id: str = Field(..., min_length=1, description="RTZR client ID")
client_secret: str = Field(..., min_length=1, description="RTZR client secret")
api_base: Optional[str] = Field(default=None, description="RTZR API base URL")
model_name: Optional[str] = Field(default=None, description="RTZR recognition model name")
language: Optional[str] = Field(default=None, description="RTZR recognition language code")
sample_rate: Optional[int] = Field(default=None, gt=0, description="Input audio sample rate in Hz")
encoding: Optional[str] = Field(default=None, description="Input audio encoding")
use_itn: Optional[bool] = Field(default=None, description="Enable inverse text normalization")
use_disfluency_filter: Optional[bool] = Field(default=None, description="Filter disfluencies such as stuttering")
use_profanity_filter: Optional[bool] = Field(default=None, description="Filter profanity")
use_punctuation: Optional[bool] = Field(default=None, description="Add punctuation to recognized text")
keywords: Optional[List[str]] = Field(default=None, description="Keywords that improve recognition accuracy")
additional_params: Optional[Dict[str, Any]] = Field(default=None)


class RtzrSTT(RtzrSTTOptions, BaseSTT):
"""RTZR streaming speech-to-text provider."""

def to_config(self) -> Dict[str, Any]:
params: Dict[str, Any] = dict(self.additional_params or {})
params.update({"client_id": self.client_id, "client_secret": self.client_secret})

for name in (
"api_base",
"model_name",
"language",
"sample_rate",
"encoding",
"use_itn",
"use_disfluency_filter",
"use_profanity_filter",
"use_punctuation",
"keywords",
):
value = getattr(self, name)
if value is not None:
params[name] = value

return {"vendor": "rtzr", "params": params}


class MicrosoftSTTOptions(BaseModel):
model_config = ConfigDict(extra="forbid")

Expand Down
Loading
Loading