soniox 2.3.1__tar.gz → 2.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {soniox-2.3.1 → soniox-2.3.2}/CHANGELOG.md +9 -0
- {soniox-2.3.1 → soniox-2.3.2}/PKG-INFO +1 -1
- {soniox-2.3.1 → soniox-2.3.2}/docs/async_client.md +3 -1
- {soniox-2.3.1 → soniox-2.3.2}/docs/types.md +3 -1
- {soniox-2.3.1 → soniox-2.3.2}/pyproject.toml +1 -1
- {soniox-2.3.1 → soniox-2.3.2}/src/soniox/api/async_auth.py +4 -0
- {soniox-2.3.1 → soniox-2.3.2}/src/soniox/api/auth.py +4 -0
- {soniox-2.3.1 → soniox-2.3.2}/src/soniox/types/api.py +7 -1
- {soniox-2.3.1 → soniox-2.3.2}/.gitignore +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/LICENSE +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/README.md +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/assets/coffee_shop.mp3 +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/assets/coffee_shop.pcm_s16le +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/assets/two_way_translation.mp3 +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/assets/two_way_translation.pcm_s16le +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/docs/realtime_client.md +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/docs/soniox/__init__.md +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/docs/soniox/api/__init__.md +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/docs/soniox/api/api__utils.md +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/docs/soniox/api/api_async_auth.md +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/docs/soniox/api/api_async_files.md +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/docs/soniox/api/api_async_models.md +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/docs/soniox/api/api_async_stt.md +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/docs/soniox/api/api_async_transcriptions.md +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/docs/soniox/api/api_async_webhooks.md +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/docs/soniox/api/api_auth.md +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/docs/soniox/api/api_files.md +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/docs/soniox/api/api_models.md +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/docs/soniox/api/api_stt.md +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/docs/soniox/api/api_transcriptions.md +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/docs/soniox/api/api_webhooks.md +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/docs/soniox/realtime/__init__.md +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/docs/soniox/realtime/realtime__utils.md +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/docs/soniox/realtime/realtime_async_stt.md +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/docs/soniox/realtime/realtime_stt.md +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/docs/soniox/soniox_client.md +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/docs/soniox/soniox_errors.md +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/docs/soniox/soniox_utils.md +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/docs/soniox/types/__init__.md +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/docs/soniox/types/types_api.md +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/docs/soniox/types/types_common.md +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/docs/soniox/types/types_realtime.md +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/docs/soniox/types/types_webhooks.md +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/examples/async_soniox_client/api_example.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/examples/async_soniox_client/realtime_example.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/examples/async_soniox_client/tts_api_example.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/examples/async_soniox_client/tts_realtime_example.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/examples/async_soniox_client/tts_realtime_multiplexed_example.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/examples/soniox_client/api_example.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/examples/soniox_client/realtime_example.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/examples/soniox_client/tts_api_example.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/examples/soniox_client/tts_realtime_example.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/examples/soniox_client/tts_realtime_multiplexed_example.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/justfile +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/scripts/generate_docs.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/src/soniox/__init__.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/src/soniox/api/__init__.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/src/soniox/api/_utils.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/src/soniox/api/async_files.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/src/soniox/api/async_models.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/src/soniox/api/async_stt.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/src/soniox/api/async_tts.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/src/soniox/api/async_tts_models.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/src/soniox/api/async_webhooks.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/src/soniox/api/files.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/src/soniox/api/models.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/src/soniox/api/stt.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/src/soniox/api/tts.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/src/soniox/api/tts_models.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/src/soniox/api/webhooks.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/src/soniox/client.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/src/soniox/errors.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/src/soniox/realtime/__init__.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/src/soniox/realtime/_constants.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/src/soniox/realtime/_utils.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/src/soniox/realtime/async_stt.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/src/soniox/realtime/async_tts.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/src/soniox/realtime/stt.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/src/soniox/realtime/tts.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/src/soniox/types/__init__.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/src/soniox/types/common.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/src/soniox/types/realtime.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/src/soniox/types/webhooks.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/src/soniox/utils.py +0 -0
- {soniox-2.3.1 → soniox-2.3.2}/uv.lock +0 -0
|
@@ -77,6 +77,15 @@ Examples:
|
|
|
77
77
|
|
|
78
78
|
---
|
|
79
79
|
|
|
80
|
+
## [2.3.2] - 4 may 2026
|
|
81
|
+
|
|
82
|
+
### Added
|
|
83
|
+
|
|
84
|
+
- `single_use` and `max_session_duration_seconds` parameters on `client.auth.create_temporary_api_key()` (and the async variant).
|
|
85
|
+
- `tts_rt` value for `TemporaryApiKeyUsageType`, allowing temporary API keys to be scoped to realtime TTS.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
80
89
|
## [2.3.1] - 29 apr 2026
|
|
81
90
|
|
|
82
91
|
### Changed
|
|
@@ -1129,7 +1129,7 @@ AsyncAuthAPI(client: AsyncSonioxClient)
|
|
|
1129
1129
|
### create_temporary_api_key()
|
|
1130
1130
|
|
|
1131
1131
|
```python
|
|
1132
|
-
create_temporary_api_key(*, usage_type: TemporaryApiKeyUsageType = 'transcribe_websocket', expires_in_seconds: int = 5 * 60, client_reference_id: str | None = None) -> CreateTemporaryApiKeyResponse
|
|
1132
|
+
create_temporary_api_key(*, usage_type: TemporaryApiKeyUsageType = 'transcribe_websocket', expires_in_seconds: int = 5 * 60, client_reference_id: str | None = None, single_use: bool | None = None, max_session_duration_seconds: int | None = None) -> CreateTemporaryApiKeyResponse
|
|
1133
1133
|
```
|
|
1134
1134
|
|
|
1135
1135
|
Create a temporary API key.
|
|
@@ -1143,6 +1143,8 @@ Performs a POST request to ``/auth/temporary-api-key``.
|
|
|
1143
1143
|
| `usage_type` | `TemporaryApiKeyUsageType` | Intended usage of the temporary API key. |
|
|
1144
1144
|
| `expires_in_seconds` | `int` | Duration in seconds until the temporary API key expires |
|
|
1145
1145
|
| `client_reference_id` | `str \| None` | Optional tracking identifier string. Does not need to be unique |
|
|
1146
|
+
| `single_use` | `bool \| None` | When true, restricts the temporary API key to a single use. |
|
|
1147
|
+
| `max_session_duration_seconds` | `int \| None` | Maximum connection duration in seconds for WebSocket and TTS HTTP streaming endpoints. |
|
|
1146
1148
|
|
|
1147
1149
|
**Returns**
|
|
1148
1150
|
|
|
@@ -75,6 +75,8 @@ Payload for requesting a temporary API key (e.g., websocket).
|
|
|
75
75
|
| `usage_type` | `TemporaryApiKeyUsageType` | Intended usage of the temporary API key. |
|
|
76
76
|
| `expires_in_seconds` | `int` | Duration in seconds until the temporary API key expires |
|
|
77
77
|
| `client_reference_id` | `str \| None` | Optional tracking identifier string. Does not need to be unique |
|
|
78
|
+
| `single_use` | `bool \| None` | When true, restricts the temporary API key to a single use. |
|
|
79
|
+
| `max_session_duration_seconds` | `int \| None` | Maximum connection duration in seconds for WebSocket and TTS HTTP streaming endpoints. |
|
|
78
80
|
|
|
79
81
|
---
|
|
80
82
|
|
|
@@ -557,7 +559,7 @@ Represents a Text-to-Speech voice.
|
|
|
557
559
|
## TemporaryApiKeyUsageType
|
|
558
560
|
|
|
559
561
|
```python
|
|
560
|
-
TemporaryApiKeyUsageType = Literal["transcribe_websocket"]
|
|
562
|
+
TemporaryApiKeyUsageType = Literal["transcribe_websocket", "tts_rt"]
|
|
561
563
|
```
|
|
562
564
|
|
|
563
565
|
Intended usage for temporary API keys.
|
|
@@ -23,6 +23,8 @@ class AsyncAuthAPI:
|
|
|
23
23
|
usage_type: TemporaryApiKeyUsageType = "transcribe_websocket",
|
|
24
24
|
expires_in_seconds: int = 5 * 60,
|
|
25
25
|
client_reference_id: str | None = None,
|
|
26
|
+
single_use: bool | None = None,
|
|
27
|
+
max_session_duration_seconds: int | None = None,
|
|
26
28
|
) -> CreateTemporaryApiKeyResponse:
|
|
27
29
|
"""
|
|
28
30
|
Create a temporary API key.
|
|
@@ -36,6 +38,8 @@ class AsyncAuthAPI:
|
|
|
36
38
|
usage_type=usage_type,
|
|
37
39
|
expires_in_seconds=expires_in_seconds,
|
|
38
40
|
client_reference_id=client_reference_id,
|
|
41
|
+
single_use=single_use,
|
|
42
|
+
max_session_duration_seconds=max_session_duration_seconds,
|
|
39
43
|
)
|
|
40
44
|
response = await self._client.request(
|
|
41
45
|
"POST", "/auth/temporary-api-key", json=payload.model_dump(exclude_none=True)
|
|
@@ -23,6 +23,8 @@ class AuthAPI:
|
|
|
23
23
|
usage_type: TemporaryApiKeyUsageType = "transcribe_websocket",
|
|
24
24
|
expires_in_seconds: int = 5 * 60,
|
|
25
25
|
client_reference_id: str | None = None,
|
|
26
|
+
single_use: bool | None = None,
|
|
27
|
+
max_session_duration_seconds: int | None = None,
|
|
26
28
|
) -> CreateTemporaryApiKeyResponse:
|
|
27
29
|
"""
|
|
28
30
|
Create a temporary API key.
|
|
@@ -36,6 +38,8 @@ class AuthAPI:
|
|
|
36
38
|
usage_type=usage_type,
|
|
37
39
|
expires_in_seconds=expires_in_seconds,
|
|
38
40
|
client_reference_id=client_reference_id,
|
|
41
|
+
single_use=single_use,
|
|
42
|
+
max_session_duration_seconds=max_session_duration_seconds,
|
|
39
43
|
)
|
|
40
44
|
response = self._client.request(
|
|
41
45
|
"POST", "/auth/temporary-api-key", json=payload.model_dump(exclude_none=True)
|
|
@@ -17,7 +17,7 @@ TranscriptionMode = Literal["real_time", "async"]
|
|
|
17
17
|
TranslationType = Literal["one_way", "two_way"]
|
|
18
18
|
"""Supported translation configuration types."""
|
|
19
19
|
|
|
20
|
-
TemporaryApiKeyUsageType = Literal["transcribe_websocket"]
|
|
20
|
+
TemporaryApiKeyUsageType = Literal["transcribe_websocket", "tts_rt"]
|
|
21
21
|
"""Intended usage for temporary API keys."""
|
|
22
22
|
|
|
23
23
|
TtsAudioFormat = Literal[
|
|
@@ -346,6 +346,12 @@ class CreateTemporaryApiKeyPayload(BaseModel):
|
|
|
346
346
|
client_reference_id: str | None = Field(default=None, max_length=256)
|
|
347
347
|
"""Optional tracking identifier string. Does not need to be unique"""
|
|
348
348
|
|
|
349
|
+
single_use: bool | None = None
|
|
350
|
+
"""When true, restricts the temporary API key to a single use."""
|
|
351
|
+
|
|
352
|
+
max_session_duration_seconds: int | None = Field(default=None, ge=1, le=18000)
|
|
353
|
+
"""Maximum connection duration in seconds for WebSocket and TTS HTTP streaming endpoints."""
|
|
354
|
+
|
|
349
355
|
|
|
350
356
|
class CreateTemporaryApiKeyResponse(BaseModel):
|
|
351
357
|
"""Response data for a temp API key request."""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{soniox-2.3.1 → soniox-2.3.2}/examples/async_soniox_client/tts_realtime_multiplexed_example.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|