soniox 2.5.0__tar.gz → 2.6.0__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.
Files changed (105) hide show
  1. {soniox-2.5.0 → soniox-2.6.0}/CHANGELOG.md +8 -0
  2. {soniox-2.5.0 → soniox-2.6.0}/PKG-INFO +2 -2
  3. {soniox-2.5.0 → soniox-2.6.0}/README.md +1 -1
  4. {soniox-2.5.0 → soniox-2.6.0}/docs/types.md +1 -0
  5. {soniox-2.5.0 → soniox-2.6.0}/examples/async_soniox_client/realtime_example.py +1 -1
  6. {soniox-2.5.0 → soniox-2.6.0}/examples/soniox_client/realtime_example.py +1 -1
  7. {soniox-2.5.0 → soniox-2.6.0}/pyproject.toml +1 -1
  8. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/types/realtime.py +8 -0
  9. {soniox-2.5.0 → soniox-2.6.0}/tests/unit/_sdk_bindings.py +6 -6
  10. {soniox-2.5.0 → soniox-2.6.0}/tests/unit/test_api.py +1 -1
  11. {soniox-2.5.0 → soniox-2.6.0}/tests/unit/test_coverage_gaps.py +2 -2
  12. {soniox-2.5.0 → soniox-2.6.0}/tests/unit/test_types.py +4 -4
  13. {soniox-2.5.0 → soniox-2.6.0}/uv.lock +1 -1
  14. {soniox-2.5.0 → soniox-2.6.0}/.claude/settings.local.json +0 -0
  15. {soniox-2.5.0 → soniox-2.6.0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  16. {soniox-2.5.0 → soniox-2.6.0}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  17. {soniox-2.5.0 → soniox-2.6.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  18. {soniox-2.5.0 → soniox-2.6.0}/.gitignore +0 -0
  19. {soniox-2.5.0 → soniox-2.6.0}/CODE_OF_CONDUCT.md +0 -0
  20. {soniox-2.5.0 → soniox-2.6.0}/CONTRIBUTING.md +0 -0
  21. {soniox-2.5.0 → soniox-2.6.0}/LICENSE +0 -0
  22. {soniox-2.5.0 → soniox-2.6.0}/SECURITY.md +0 -0
  23. {soniox-2.5.0 → soniox-2.6.0}/assets/coffee_shop.mp3 +0 -0
  24. {soniox-2.5.0 → soniox-2.6.0}/assets/coffee_shop.pcm_s16le +0 -0
  25. {soniox-2.5.0 → soniox-2.6.0}/assets/two_way_translation.mp3 +0 -0
  26. {soniox-2.5.0 → soniox-2.6.0}/assets/two_way_translation.pcm_s16le +0 -0
  27. {soniox-2.5.0 → soniox-2.6.0}/docs/async_client.md +0 -0
  28. {soniox-2.5.0 → soniox-2.6.0}/docs/realtime_client.md +0 -0
  29. {soniox-2.5.0 → soniox-2.6.0}/docs/utils.md +0 -0
  30. {soniox-2.5.0 → soniox-2.6.0}/examples/async_soniox_client/api_example.py +0 -0
  31. {soniox-2.5.0 → soniox-2.6.0}/examples/async_soniox_client/tts_api_example.py +0 -0
  32. {soniox-2.5.0 → soniox-2.6.0}/examples/async_soniox_client/tts_realtime_example.py +0 -0
  33. {soniox-2.5.0 → soniox-2.6.0}/examples/async_soniox_client/tts_realtime_multiplexed_example.py +0 -0
  34. {soniox-2.5.0 → soniox-2.6.0}/examples/soniox_client/api_example.py +0 -0
  35. {soniox-2.5.0 → soniox-2.6.0}/examples/soniox_client/tts_api_example.py +0 -0
  36. {soniox-2.5.0 → soniox-2.6.0}/examples/soniox_client/tts_realtime_example.py +0 -0
  37. {soniox-2.5.0 → soniox-2.6.0}/examples/soniox_client/tts_realtime_multiplexed_example.py +0 -0
  38. {soniox-2.5.0 → soniox-2.6.0}/justfile +0 -0
  39. {soniox-2.5.0 → soniox-2.6.0}/scripts/generate_docs.py +0 -0
  40. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/__init__.py +0 -0
  41. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/api/__init__.py +0 -0
  42. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/api/_utils.py +0 -0
  43. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/api/async_auth.py +0 -0
  44. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/api/async_concurrency_limits.py +0 -0
  45. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/api/async_files.py +0 -0
  46. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/api/async_models.py +0 -0
  47. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/api/async_stt.py +0 -0
  48. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/api/async_tts.py +0 -0
  49. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/api/async_tts_models.py +0 -0
  50. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/api/async_usage_logs.py +0 -0
  51. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/api/async_webhooks.py +0 -0
  52. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/api/auth.py +0 -0
  53. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/api/concurrency_limits.py +0 -0
  54. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/api/files.py +0 -0
  55. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/api/models.py +0 -0
  56. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/api/stt.py +0 -0
  57. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/api/tts.py +0 -0
  58. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/api/tts_models.py +0 -0
  59. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/api/usage_logs.py +0 -0
  60. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/api/webhooks.py +0 -0
  61. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/client.py +0 -0
  62. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/errors.py +0 -0
  63. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/py.typed +0 -0
  64. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/realtime/__init__.py +0 -0
  65. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/realtime/_constants.py +0 -0
  66. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/realtime/_utils.py +0 -0
  67. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/realtime/async_stt.py +0 -0
  68. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/realtime/async_tts.py +0 -0
  69. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/realtime/stt.py +0 -0
  70. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/realtime/tts.py +0 -0
  71. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/types/__init__.py +0 -0
  72. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/types/api.py +0 -0
  73. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/types/common.py +0 -0
  74. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/types/webhooks.py +0 -0
  75. {soniox-2.5.0 → soniox-2.6.0}/src/soniox/utils.py +0 -0
  76. {soniox-2.5.0 → soniox-2.6.0}/tests/__init__.py +0 -0
  77. {soniox-2.5.0 → soniox-2.6.0}/tests/conftest.py +0 -0
  78. {soniox-2.5.0 → soniox-2.6.0}/tests/data/openapi.json +0 -0
  79. {soniox-2.5.0 → soniox-2.6.0}/tests/helpers.py +0 -0
  80. {soniox-2.5.0 → soniox-2.6.0}/tests/realtime/__init__.py +0 -0
  81. {soniox-2.5.0 → soniox-2.6.0}/tests/realtime/cases.py +0 -0
  82. {soniox-2.5.0 → soniox-2.6.0}/tests/realtime/mock_ws.py +0 -0
  83. {soniox-2.5.0 → soniox-2.6.0}/tests/realtime/test_async_tts_realtime.py +0 -0
  84. {soniox-2.5.0 → soniox-2.6.0}/tests/realtime/test_chaos_realtime.py +0 -0
  85. {soniox-2.5.0 → soniox-2.6.0}/tests/realtime/test_fuzz_realtime.py +0 -0
  86. {soniox-2.5.0 → soniox-2.6.0}/tests/realtime/test_keepalive.py +0 -0
  87. {soniox-2.5.0 → soniox-2.6.0}/tests/realtime/test_live_ws.py +0 -0
  88. {soniox-2.5.0 → soniox-2.6.0}/tests/realtime/test_stt_realtime.py +0 -0
  89. {soniox-2.5.0 → soniox-2.6.0}/tests/realtime/test_tts_realtime.py +0 -0
  90. {soniox-2.5.0 → soniox-2.6.0}/tests/unit/__init__.py +0 -0
  91. {soniox-2.5.0 → soniox-2.6.0}/tests/unit/_openapi.py +0 -0
  92. {soniox-2.5.0 → soniox-2.6.0}/tests/unit/test_async_client.py +0 -0
  93. {soniox-2.5.0 → soniox-2.6.0}/tests/unit/test_async_stt_workflows.py +0 -0
  94. {soniox-2.5.0 → soniox-2.6.0}/tests/unit/test_async_tts_workflows.py +0 -0
  95. {soniox-2.5.0 → soniox-2.6.0}/tests/unit/test_client.py +0 -0
  96. {soniox-2.5.0 → soniox-2.6.0}/tests/unit/test_concurrency_limits.py +0 -0
  97. {soniox-2.5.0 → soniox-2.6.0}/tests/unit/test_schema_drift.py +0 -0
  98. {soniox-2.5.0 → soniox-2.6.0}/tests/unit/test_stt_extras.py +0 -0
  99. {soniox-2.5.0 → soniox-2.6.0}/tests/unit/test_stt_workflows.py +0 -0
  100. {soniox-2.5.0 → soniox-2.6.0}/tests/unit/test_sync_async_parity.py +0 -0
  101. {soniox-2.5.0 → soniox-2.6.0}/tests/unit/test_translate.py +0 -0
  102. {soniox-2.5.0 → soniox-2.6.0}/tests/unit/test_tts_workflows.py +0 -0
  103. {soniox-2.5.0 → soniox-2.6.0}/tests/unit/test_usage_logs.py +0 -0
  104. {soniox-2.5.0 → soniox-2.6.0}/tests/unit/test_utils.py +0 -0
  105. {soniox-2.5.0 → soniox-2.6.0}/tests/unit/test_webhooks.py +0 -0
@@ -73,6 +73,14 @@ Examples:
73
73
 
74
74
  ---
75
75
 
76
+ ## [2.6.0] - 15 jun 2026
77
+
78
+ ### Added
79
+
80
+ - `endpoint_sensitivity` field on `RealtimeSTTConfig`: adjusts how likely the model is to emit a speech endpoint. Allowed values are between -1.0 and 1.0; the default is 0.0. Introduced in the Soniox v5 model.
81
+
82
+ ---
83
+
76
84
  ## [2.5.0] - 12 jun 2026
77
85
 
78
86
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: soniox
3
- Version: 2.5.0
3
+ Version: 2.6.0
4
4
  Summary: The official Python SDK for the Soniox API (STT, REST)
5
5
  Project-URL: Homepage, https://soniox.com
6
6
  Project-URL: Documentation, https://soniox.com/docs
@@ -111,7 +111,7 @@ from soniox.utils import render_tokens, throttle_audio, start_audio_thread
111
111
  DEMO_FILE = "path_to_your_audio_file"
112
112
 
113
113
  client = SonioxClient()
114
- config = RealtimeSTTConfig(model="stt-rt-v4", audio_format="mp3")
114
+ config = RealtimeSTTConfig(model="stt-rt-v5", audio_format="mp3")
115
115
  final_tokens: list[Token] = []
116
116
  non_final_tokens: list[Token] = []
117
117
 
@@ -68,7 +68,7 @@ from soniox.utils import render_tokens, throttle_audio, start_audio_thread
68
68
  DEMO_FILE = "path_to_your_audio_file"
69
69
 
70
70
  client = SonioxClient()
71
- config = RealtimeSTTConfig(model="stt-rt-v4", audio_format="mp3")
71
+ config = RealtimeSTTConfig(model="stt-rt-v5", audio_format="mp3")
72
72
  final_tokens: list[Token] = []
73
73
  non_final_tokens: list[Token] = []
74
74
 
@@ -992,6 +992,7 @@ Configuration for initiating a realtime transcription session.
992
992
  | `enable_language_identification` | `bool \| None` | Enable automatic language detection. |
993
993
  | `enable_endpoint_detection` | `bool \| None` | Enable endpoint detection for utterance boundaries. |
994
994
  | `max_endpoint_delay_ms` | `int \| None` | Maximum delay between the end of speech and returned endpoint. Allowed values for maximum delay are between 500ms and 3000ms. The default value is 2000ms |
995
+ | `endpoint_sensitivity` | `float \| None` | Adjusts how likely the model is to emit an endpoint. Higher values make endpoints more likely (finalizing sooner); lower values make them less likely. Allowed values are between -1.0 and 1.0; the default is 0.0. Introduced in the Soniox v5 model; earlier models reject it. |
995
996
  | `translation` | `TranslationConfigInput \| None` | Translation configuration. |
996
997
  | `client_reference_id` | `str \| None` | Optional tracking identifier (max 256 chars). |
997
998
 
@@ -10,7 +10,7 @@ DEMO_FILE = Path(__file__).resolve().parents[2] / "assets" / "coffee_shop.mp3"
10
10
 
11
11
  async def main() -> None:
12
12
  client = AsyncSonioxClient()
13
- config = RealtimeSTTConfig(model="stt-rt-v4", audio_format="mp3")
13
+ config = RealtimeSTTConfig(model="stt-rt-v5", audio_format="mp3")
14
14
  final_tokens: list[Token] = []
15
15
  non_final_tokens: list[Token] = []
16
16
  async with client.realtime.stt.connect(config=config) as session:
@@ -9,7 +9,7 @@ DEMO_FILE = Path(__file__).resolve().parents[2] / "assets" / "coffee_shop.mp3"
9
9
 
10
10
  def main() -> None:
11
11
  client = SonioxClient()
12
- config = RealtimeSTTConfig(model="stt-rt-v4", audio_format="mp3")
12
+ config = RealtimeSTTConfig(model="stt-rt-v5", audio_format="mp3")
13
13
  final_tokens: list[Token] = []
14
14
  non_final_tokens: list[Token] = []
15
15
  with client.realtime.stt.connect(config=config) as session:
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "soniox"
7
- version = "2.5.0"
7
+ version = "2.6.0"
8
8
  dependencies = ["httpx>0.25.0", "websockets>11.0", "pydantic>2"]
9
9
  requires-python = ">=3.10"
10
10
  authors = [{ name = "Soniox", email = "support@soniox.com" }]
@@ -94,6 +94,14 @@ class RealtimeSTTConfig(BaseModel):
94
94
  Allowed values for maximum delay are between 500ms and 3000ms. The default value is 2000ms
95
95
  """
96
96
 
97
+ endpoint_sensitivity: float | None = Field(default=None, ge=-1.0, le=1.0)
98
+ """
99
+ Adjusts how likely the model is to emit an endpoint. Higher values make
100
+ endpoints more likely (finalizing sooner); lower values make them less
101
+ likely. Allowed values are between -1.0 and 1.0; the default is 0.0.
102
+ Introduced in the Soniox v5 model; earlier models reject it.
103
+ """
104
+
97
105
  translation: TranslationConfigInput | None = None
98
106
  """Translation configuration."""
99
107
 
@@ -86,9 +86,9 @@ SDK_BINDINGS: dict[str, SdkBinding] = {
86
86
  async_call=lambda c: c.stt.count(),
87
87
  ),
88
88
  "create_transcription": SdkBinding(
89
- sync_call=lambda c: c.stt.create(model="stt-async-v4", audio_url=_AUDIO_URL),
90
- async_call=lambda c: c.stt.create(model="stt-async-v4", audio_url=_AUDIO_URL),
91
- expect_json={"model": "stt-async-v4", "audio_url": _AUDIO_URL},
89
+ sync_call=lambda c: c.stt.create(model="stt-async-v5", audio_url=_AUDIO_URL),
90
+ async_call=lambda c: c.stt.create(model="stt-async-v5", audio_url=_AUDIO_URL),
91
+ expect_json={"model": "stt-async-v5", "audio_url": _AUDIO_URL},
92
92
  ),
93
93
  "get_transcription": SdkBinding(
94
94
  sync_call=lambda c: c.stt.get(_ID),
@@ -168,19 +168,19 @@ SDK_BINDINGS_FULL: dict[str, SdkBinding] = {
168
168
  ),
169
169
  "create_transcription": SdkBinding(
170
170
  sync_call=lambda c: c.stt.create(
171
- model="stt-async-v4",
171
+ model="stt-async-v5",
172
172
  audio_url=_AUDIO_URL,
173
173
  client_reference_id="ref-123",
174
174
  config=_FULL_CONFIG,
175
175
  ),
176
176
  async_call=lambda c: c.stt.create(
177
- model="stt-async-v4",
177
+ model="stt-async-v5",
178
178
  audio_url=_AUDIO_URL,
179
179
  client_reference_id="ref-123",
180
180
  config=_FULL_CONFIG,
181
181
  ),
182
182
  expect_json={
183
- "model": "stt-async-v4",
183
+ "model": "stt-async-v5",
184
184
  "audio_url": _AUDIO_URL,
185
185
  "client_reference_id": "ref-123",
186
186
  "language_hints": ["en", "de"],
@@ -208,7 +208,7 @@ def test_error_validation_errors_appear_in_message(client: SonioxClient) -> None
208
208
  )
209
209
 
210
210
  with pytest.raises(SonioxInvalidRequestError) as exc_info:
211
- client.stt.create(model="stt-async-v4", audio_url="https://example.com/audio.mp3")
211
+ client.stt.create(model="stt-async-v5", audio_url="https://example.com/audio.mp3")
212
212
 
213
213
  message = str(exc_info.value)
214
214
  assert "Invalid payload" in message
@@ -163,7 +163,7 @@ def test_translation_config_two_way_clears_target_language() -> None:
163
163
  def test_create_transcription_payload_rejects_both_sources() -> None:
164
164
  with pytest.raises(ValidationError, match="Only one of audio_url or file_id"):
165
165
  CreateTranscriptionPayload(
166
- model="stt-async-v4",
166
+ model="stt-async-v5",
167
167
  audio_url="https://a/b",
168
168
  file_id="f1",
169
169
  )
@@ -171,4 +171,4 @@ def test_create_transcription_payload_rejects_both_sources() -> None:
171
171
 
172
172
  def test_create_transcription_payload_requires_a_source() -> None:
173
173
  with pytest.raises(ValidationError, match="Either audio_url or file_id"):
174
- CreateTranscriptionPayload(model="stt-async-v4")
174
+ CreateTranscriptionPayload(model="stt-async-v5")
@@ -45,7 +45,7 @@ def test_structured_context_general_keeps_typed_list_unchanged() -> None:
45
45
 
46
46
  def test_raw_format_requires_sample_rate_and_channels() -> None:
47
47
  with pytest.raises(ValueError) as exc:
48
- RealtimeSTTConfig(model="stt-rt-v4", audio_format="pcm_s16le")
48
+ RealtimeSTTConfig(model="stt-rt-v5", audio_format="pcm_s16le")
49
49
  msg = str(exc.value)
50
50
  assert "sample_rate" in msg
51
51
  assert "num_channels" in msg
@@ -53,18 +53,18 @@ def test_raw_format_requires_sample_rate_and_channels() -> None:
53
53
 
54
54
  def test_raw_format_requires_sample_rate_only() -> None:
55
55
  with pytest.raises(ValueError) as exc:
56
- RealtimeSTTConfig(model="stt-rt-v4", audio_format="pcm_s16le", num_channels=1)
56
+ RealtimeSTTConfig(model="stt-rt-v5", audio_format="pcm_s16le", num_channels=1)
57
57
  assert "sample_rate" in str(exc.value)
58
58
 
59
59
 
60
60
  def test_raw_format_requires_num_channels_only() -> None:
61
61
  with pytest.raises(ValueError) as exc:
62
- RealtimeSTTConfig(model="stt-rt-v4", audio_format="pcm_s16le", sample_rate=16000)
62
+ RealtimeSTTConfig(model="stt-rt-v5", audio_format="pcm_s16le", sample_rate=16000)
63
63
  assert "num_channels" in str(exc.value)
64
64
 
65
65
 
66
66
  def test_raw_format_with_both_succeeds() -> None:
67
- cfg = RealtimeSTTConfig(model="stt-rt-v4", audio_format="pcm_s16le", sample_rate=16000, num_channels=1)
67
+ cfg = RealtimeSTTConfig(model="stt-rt-v5", audio_format="pcm_s16le", sample_rate=16000, num_channels=1)
68
68
  assert cfg.audio_format == "pcm_s16le"
69
69
  assert cfg.sample_rate == 16000
70
70
  assert cfg.num_channels == 1
@@ -559,7 +559,7 @@ wheels = [
559
559
 
560
560
  [[package]]
561
561
  name = "soniox"
562
- version = "2.5.0"
562
+ version = "2.6.0"
563
563
  source = { editable = "." }
564
564
  dependencies = [
565
565
  { name = "httpx" },
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