Skip to content

Commit 5dd9365

Browse files
fix(waves): stream_tts shim -> /tts/live (legacy get_speech/stream retired 2026-07-14)
The per-model WSS URL wss://api.smallest.ai/waves/v1/lightning-v3.1/get_speech/stream retired 2026-07-14, breaking WavesStreamingTTS on 5.0.0/5.1.0. Point the shim at the unified wss://api.smallest.ai/waves/v1/tts/live and add TTSConfig.model (default lightning_v3.1; lightning_v3.1_pro for Pro) — model was formerly in the URL path. Verified live: 19 chunks / 138KB PCM streamed. mypy + make verify green. Ships as 5.1.1.
1 parent 8e5b940 commit 5dd9365

4 files changed

Lines changed: 39 additions & 7 deletions

File tree

‎changelog.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
## 5.1.1 - 2026-07-15
2+
3+
Patch — fix the streaming-TTS compat shim (`WavesStreamingTTS`/`TTSConfig`).
4+
5+
* The legacy per-model endpoint `wss://.../waves/v1/lightning-v3.1/get_speech/stream`
6+
**retired 2026-07-14**, which broke `WavesStreamingTTS` on 5.0.0/5.1.0. The shim now
7+
targets the unified `wss://api.smallest.ai/waves/v1/tts/live`.
8+
* `TTSConfig` gains a `model` field (default `lightning_v3.1`; set `lightning_v3.1_pro`
9+
for the Pro pool) — the model was previously encoded in the URL path.
10+
* Verified live end-to-end (streams PCM chunks from `/tts/live`). No other changes.
11+
112
## 5.1.0 - 2026-06-22
213

314
Additive completeness, naming, and spec-correctness release (generator pinned to 5.12.12).

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ dynamic = ["version"]
55

66
[tool.poetry]
77
name = "smallestai"
8-
version = "5.1.0"
8+
version = "5.1.1"
99
description = ""
1010
readme = "README.md"
1111
authors = []

‎src/smallestai/waves/stream_tts.py‎

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33
`from smallestai.waves import WavesStreamingTTS, TTSConfig` pattern
44
shipped in smallestai==4.3.1.
55
6-
This wraps the Lightning v3.1 streaming WebSocket endpoint
7-
(`wss://api.smallest.ai/waves/v1/lightning-v3.1/get_speech/stream`).
6+
This wraps the unified TTS streaming WebSocket endpoint
7+
(`wss://api.smallest.ai/waves/v1/tts/live`). The old per-model URL
8+
`.../waves/v1/lightning-v3.1/get_speech/stream` retired 2026-07-14, so the
9+
model is now selected via the `model` payload field (default `lightning_v3.1`;
10+
set `lightning_v3.1_pro` for the Pro pool).
811
9-
Code that worked on 4.3.1 keeps working on 4.4.0 with one
12+
Code that worked on 4.3.1 keeps working with one
1013
behavior change: the underlying model is `lightning-v3.1` (not the
1114
deprecated `lightning-v2`). This means:
1215
- Removed `consistency` param (v2-only — silently dropped if passed).
@@ -39,6 +42,7 @@ class TTSConfig:
3942
"""
4043
voice_id: str
4144
api_key: str
45+
model: str = "lightning_v3.1"
4246
language: str = "en"
4347
sample_rate: int = 24000
4448
speed: float = 1.0
@@ -59,9 +63,10 @@ class WavesStreamingTTS:
5963
audio_chunks = list(streaming_tts.synthesize("Hello world"))
6064
"""
6165

62-
# Lightning v3.1 streaming endpoint. Old 4.3.1 hardcoded the deprecated
63-
# v2 endpoint — that was a bug and is fixed in 4.4.0.
64-
WS_URL = "wss://api.smallest.ai/waves/v1/lightning-v3.1/get_speech/stream"
66+
# Unified TTS streaming endpoint. The old per-model URL
67+
# `.../waves/v1/lightning-v3.1/get_speech/stream` retired 2026-07-14; this shim
68+
# now targets /tts/live and picks the model via the `model` payload field.
69+
WS_URL = "wss://api.smallest.ai/waves/v1/tts/live"
6570

6671
def __init__(self, config: TTSConfig):
6772
self.config = config
@@ -79,6 +84,7 @@ def _get_headers(self):
7984
def _create_payload(self, text: str, continue_stream: bool = False, flush: bool = False) -> dict:
8085
payload: dict = {
8186
"voice_id": self.config.voice_id,
87+
"model": self.config.model,
8288
"text": text,
8389
"language": self.config.language,
8490
"sample_rate": self.config.sample_rate,

‎tests/custom/test_waves_shim_import.py‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,18 @@ def test_tts_config_rejects_v2_only_consistency_param() -> None:
3333

3434
with pytest.raises(TypeError):
3535
TTSConfig(voice_id="magnus", api_key="test-key", consistency=0.5) # type: ignore[call-arg]
36+
37+
38+
def test_streaming_url_is_current_tts_live() -> None:
39+
# The per-model `.../lightning-v3.1/get_speech/stream` URL retired 2026-07-14.
40+
# Guard against regressing back to a retired endpoint.
41+
from smallestai.waves import WavesStreamingTTS
42+
43+
assert WavesStreamingTTS.WS_URL == "wss://api.smallest.ai/waves/v1/tts/live"
44+
45+
46+
def test_tts_config_model_default() -> None:
47+
from smallestai.waves import TTSConfig
48+
49+
assert TTSConfig(voice_id="magnus", api_key="k").model == "lightning_v3.1"
50+
assert TTSConfig(voice_id="magnus", api_key="k", model="lightning_v3.1_pro").model == "lightning_v3.1_pro"

0 commit comments

Comments
 (0)