Skip to content

Commit cb9ab8b

Browse files
docs(agentkit): align OpenAI TTS instructions support
1 parent 21682aa commit cb9ab8b

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

changelog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
107107

108108
### Added
109109

110-
- **`OpenAITTS`** — New optional parameters: `response_format` (str, e.g. `"pcm"`) and `speed` (float).
110+
- **`OpenAITTS`** — New optional parameters: `instructions` (str) and `speed` (float).
111111
- **`CartesiaTTS`**`voice_id` user-facing field is preserved; voice is serialized to the required nested object format automatically.
112112
- **`RimeTTS`** — New optional parameters: `lang` (str), `sampling_rate` (int, serialized as `samplingRate`), `speed_alpha` (float, serialized as `speedAlpha`).
113113
- **`OpenAIRealtime`** — New optional parameter: `failure_message` (str).

docs/reference/vendors.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ The SDK also includes named helpers for the remaining Agora-supported LLM provid
190190
| `voice` | `str` | Yes || Voice: `alloy`, `echo`, `fable`, `onyx`, `nova`, `shimmer` |
191191
| `model` | `str` | BYOK only | `None` | Model: `tts-1` or `tts-1-hd` |
192192
| `base_url` | `str` | BYOK only | `None` | OpenAI TTS endpoint URL |
193+
| `instructions` | `str` | No | `None` | Custom instructions for voice style, accent, pace, and tone |
193194
| `speed` | `float` | No | `None` | Speech speed multiplier |
194195
| `skip_patterns` | `List[int]` | No | `None` | Skip patterns |
195196

tests/custom/test_tts_vendors.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,12 @@ def test_tts_vendor_params_match_generated_core_shapes() -> None:
5252
"encoding": "linear16",
5353
}
5454

55-
assert OpenAITTS(api_key="openai-key", voice="coral", model="gpt-4o-mini-tts", base_url="https://api.openai.com/v1").to_config()["params"] == {
55+
assert OpenAITTS(api_key="openai-key", voice="coral", model="gpt-4o-mini-tts", base_url="https://api.openai.com/v1", instructions="speak clearly").to_config()["params"] == {
5656
"voice": "coral",
5757
"api_key": "openai-key",
5858
"base_url": "https://api.openai.com/v1",
5959
"model": "gpt-4o-mini-tts",
60+
"instructions": "speak clearly",
6061
}
6162

6263
assert OpenAITTS(voice="coral").to_config()["params"] == {

0 commit comments

Comments
 (0)