diff --git a/src/libs/SmallestAI/Generated/SmallestAI.ITextToSpeechClient.SynthesizeSpeechSse.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.ITextToSpeechClient.SynthesizeSpeechSse.g.cs index 8b89a36..b3a253b 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.ITextToSpeechClient.SynthesizeSpeechSse.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.ITextToSpeechClient.SynthesizeSpeechSse.g.cs @@ -9,7 +9,7 @@ public partial interface ITextToSpeechClient /// Synthesize speech and stream the audio back over Server-Sent Events. Same body as `/waves/v1/tts` — the only difference is the response is a stream of base64-encoded PCM chunks instead of one binary blob.
/// Pick the model with the `model` body parameter, same as the sync route.
/// <Note>
- /// **The same URL serves the WebSocket endpoint.** `wss://api.smallest.ai/waves/v1/tts/live` accepts a WebSocket upgrade for streaming-text scenarios (LLM token streams, live captioning). The HTTP `POST` documented on this page returns SSE; use `wss://` to use the WebSocket protocol instead. See the [WebSocket reference](/models/api-reference/text-to-speech/stream-speech-web-socket).
+ /// **The same URL serves the WebSocket endpoint.** `wss://api.smallest.ai/waves/v1/tts/live` accepts a WebSocket upgrade for streaming-text scenarios (LLM token streams, live captioning). The HTTP `POST` documented on this page returns SSE; use `wss://` to use the WebSocket protocol instead. See the [WebSocket reference](/models/documentation/text-to-speech-lightning/streaming).
/// </Note>
/// ## When to use this
/// - **Use this** when you want playback to start before synthesis is complete — long passages, latency-sensitive UI, live narration.
@@ -54,7 +54,7 @@ public partial interface ITextToSpeechClient /// Synthesize speech and stream the audio back over Server-Sent Events. Same body as `/waves/v1/tts` — the only difference is the response is a stream of base64-encoded PCM chunks instead of one binary blob.
/// Pick the model with the `model` body parameter, same as the sync route.
/// <Note>
- /// **The same URL serves the WebSocket endpoint.** `wss://api.smallest.ai/waves/v1/tts/live` accepts a WebSocket upgrade for streaming-text scenarios (LLM token streams, live captioning). The HTTP `POST` documented on this page returns SSE; use `wss://` to use the WebSocket protocol instead. See the [WebSocket reference](/models/api-reference/text-to-speech/stream-speech-web-socket).
+ /// **The same URL serves the WebSocket endpoint.** `wss://api.smallest.ai/waves/v1/tts/live` accepts a WebSocket upgrade for streaming-text scenarios (LLM token streams, live captioning). The HTTP `POST` documented on this page returns SSE; use `wss://` to use the WebSocket protocol instead. See the [WebSocket reference](/models/documentation/text-to-speech-lightning/streaming).
/// </Note>
/// ## When to use this
/// - **Use this** when you want playback to start before synthesis is complete — long passages, latency-sensitive UI, live narration.
diff --git a/src/libs/SmallestAI/Generated/SmallestAI.TextToSpeechClient.SynthesizeSpeechSse.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.TextToSpeechClient.SynthesizeSpeechSse.g.cs index 0c15648..01e3728 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.TextToSpeechClient.SynthesizeSpeechSse.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.TextToSpeechClient.SynthesizeSpeechSse.g.cs @@ -43,7 +43,7 @@ partial void ProcessSynthesizeSpeechSseResponse( /// Synthesize speech and stream the audio back over Server-Sent Events. Same body as `/waves/v1/tts` — the only difference is the response is a stream of base64-encoded PCM chunks instead of one binary blob.
/// Pick the model with the `model` body parameter, same as the sync route.
/// <Note>
- /// **The same URL serves the WebSocket endpoint.** `wss://api.smallest.ai/waves/v1/tts/live` accepts a WebSocket upgrade for streaming-text scenarios (LLM token streams, live captioning). The HTTP `POST` documented on this page returns SSE; use `wss://` to use the WebSocket protocol instead. See the [WebSocket reference](/models/api-reference/text-to-speech/stream-speech-web-socket).
+ /// **The same URL serves the WebSocket endpoint.** `wss://api.smallest.ai/waves/v1/tts/live` accepts a WebSocket upgrade for streaming-text scenarios (LLM token streams, live captioning). The HTTP `POST` documented on this page returns SSE; use `wss://` to use the WebSocket protocol instead. See the [WebSocket reference](/models/documentation/text-to-speech-lightning/streaming).
/// </Note>
/// ## When to use this
/// - **Use this** when you want playback to start before synthesis is complete — long passages, latency-sensitive UI, live narration.
@@ -423,7 +423,7 @@ partial void ProcessSynthesizeSpeechSseResponse( /// Synthesize speech and stream the audio back over Server-Sent Events. Same body as `/waves/v1/tts` — the only difference is the response is a stream of base64-encoded PCM chunks instead of one binary blob.
/// Pick the model with the `model` body parameter, same as the sync route.
/// <Note>
- /// **The same URL serves the WebSocket endpoint.** `wss://api.smallest.ai/waves/v1/tts/live` accepts a WebSocket upgrade for streaming-text scenarios (LLM token streams, live captioning). The HTTP `POST` documented on this page returns SSE; use `wss://` to use the WebSocket protocol instead. See the [WebSocket reference](/models/api-reference/text-to-speech/stream-speech-web-socket).
+ /// **The same URL serves the WebSocket endpoint.** `wss://api.smallest.ai/waves/v1/tts/live` accepts a WebSocket upgrade for streaming-text scenarios (LLM token streams, live captioning). The HTTP `POST` documented on this page returns SSE; use `wss://` to use the WebSocket protocol instead. See the [WebSocket reference](/models/documentation/text-to-speech-lightning/streaming).
/// </Note>
/// ## When to use this
/// - **Use this** when you want playback to start before synthesis is complete — long passages, latency-sensitive UI, live narration.
diff --git a/src/libs/SmallestAI/openapi.yaml b/src/libs/SmallestAI/openapi.yaml index 5501622..cbcd2ee 100644 --- a/src/libs/SmallestAI/openapi.yaml +++ b/src/libs/SmallestAI/openapi.yaml @@ -99,7 +99,7 @@ "post": { "operationId": "textToSpeech_synthesizeSpeechSse", "summary": "Stream speech (SSE)", - "description": "Synthesize speech and stream the audio back over Server-Sent Events. Same body as `/waves/v1/tts` — the only difference is the response is a stream of base64-encoded PCM chunks instead of one binary blob.\n\nPick the model with the `model` body parameter, same as the sync route.\n\n\n **The same URL serves the WebSocket endpoint.** `wss://api.smallest.ai/waves/v1/tts/live` accepts a WebSocket upgrade for streaming-text scenarios (LLM token streams, live captioning). The HTTP `POST` documented on this page returns SSE; use `wss://` to use the WebSocket protocol instead. See the [WebSocket reference](/models/api-reference/text-to-speech/stream-speech-web-socket).\n\n\n## When to use this\n\n- **Use this** when you want playback to start before synthesis is complete — long passages, latency-sensitive UI, live narration.\n- **Use sync `/waves/v1/tts`** when total latency doesn't matter and you'd rather get one buffer.\n- **Use `/waves/v1/tts/live`** (WebSocket) when the *text* arrives incrementally (LLM token stream). SSE assumes you have the full text up front.\n\n## How it works\n\n1. POST your text + voice settings — same payload as `/waves/v1/tts`, plus optional `model`.\n2. The response is `Content-Type: text/event-stream`. Each chunk frame is `event: audio\\n` followed by `data: {\"audio\": \"\", \"done\": false, \"status\": \"206\"}\\n\\n`.\n3. Decode each chunk's `audio` field with base64 and feed the PCM bytes to your audio pipeline (browser `MediaSource`, ffmpeg pipe, raw PCM player, etc.).\n4. A final `data: {\"status\": \"200\", \"done\": true}\\n\\n` frame marks end of stream. Detect the terminator with `done == true`; every chunk frame also carries `done: false`, so `\"done\" in msg` matches every frame.\n\n## Examples\n\n**cURL**\n```bash\ncurl -N -X POST \"https://api.smallest.ai/waves/v1/tts/live\" \\\n -H \"Authorization: Bearer $SMALLEST_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"text\": \"Streaming this paragraph chunk by chunk so playback can start sooner.\",\n \"voice_id\": \"magnus\",\n \"sample_rate\": 24000,\n \"output_format\": \"pcm\"\n }'\n```\n\n## Common gotchas\n\n- **Use a streaming-friendly client.** `curl -N`, Python `iter_lines`, or a `fetch` `ReadableStream` reader. Buffering clients will hide the latency win.\n- **Audio is base64 inside the event payload**, not the raw event bytes. Decode the `data.audio` field per event.\n- **`output_format=pcm`** gives the lowest overhead for streaming playback. `wav`/`mp3` work but add per-chunk framing bytes.\n", + "description": "Synthesize speech and stream the audio back over Server-Sent Events. Same body as `/waves/v1/tts` — the only difference is the response is a stream of base64-encoded PCM chunks instead of one binary blob.\n\nPick the model with the `model` body parameter, same as the sync route.\n\n\n **The same URL serves the WebSocket endpoint.** `wss://api.smallest.ai/waves/v1/tts/live` accepts a WebSocket upgrade for streaming-text scenarios (LLM token streams, live captioning). The HTTP `POST` documented on this page returns SSE; use `wss://` to use the WebSocket protocol instead. See the [WebSocket reference](/models/documentation/text-to-speech-lightning/streaming).\n\n\n## When to use this\n\n- **Use this** when you want playback to start before synthesis is complete — long passages, latency-sensitive UI, live narration.\n- **Use sync `/waves/v1/tts`** when total latency doesn't matter and you'd rather get one buffer.\n- **Use `/waves/v1/tts/live`** (WebSocket) when the *text* arrives incrementally (LLM token stream). SSE assumes you have the full text up front.\n\n## How it works\n\n1. POST your text + voice settings — same payload as `/waves/v1/tts`, plus optional `model`.\n2. The response is `Content-Type: text/event-stream`. Each chunk frame is `event: audio\\n` followed by `data: {\"audio\": \"\", \"done\": false, \"status\": \"206\"}\\n\\n`.\n3. Decode each chunk's `audio` field with base64 and feed the PCM bytes to your audio pipeline (browser `MediaSource`, ffmpeg pipe, raw PCM player, etc.).\n4. A final `data: {\"status\": \"200\", \"done\": true}\\n\\n` frame marks end of stream. Detect the terminator with `done == true`; every chunk frame also carries `done: false`, so `\"done\" in msg` matches every frame.\n\n## Examples\n\n**cURL**\n```bash\ncurl -N -X POST \"https://api.smallest.ai/waves/v1/tts/live\" \\\n -H \"Authorization: Bearer $SMALLEST_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"text\": \"Streaming this paragraph chunk by chunk so playback can start sooner.\",\n \"voice_id\": \"magnus\",\n \"sample_rate\": 24000,\n \"output_format\": \"pcm\"\n }'\n```\n\n## Common gotchas\n\n- **Use a streaming-friendly client.** `curl -N`, Python `iter_lines`, or a `fetch` `ReadableStream` reader. Buffering clients will hide the latency win.\n- **Audio is base64 inside the event payload**, not the raw event bytes. Decode the `data.audio` field per event.\n- **`output_format=pcm`** gives the lowest overhead for streaming playback. `wav`/`mp3` work but add per-chunk framing bytes.\n", "tags": [ "textToSpeech" ],