diff --git a/src/libs/SmallestAI/Generated/SmallestAI.ISubpackageTextToSpeechClient.StreamLightningV31Speech.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.ISubpackageTextToSpeechClient.StreamLightningV31Speech.g.cs index 18db823..5069b16 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.ISubpackageTextToSpeechClient.StreamLightningV31Speech.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.ISubpackageTextToSpeechClient.StreamLightningV31Speech.g.cs @@ -5,7 +5,8 @@ namespace SmallestAI public partial interface ISubpackageTextToSpeechClient { /// - /// Lightning v3.1 SSE
+ /// Lightning v3.1 SSE (Endpoint Deprecated)
+ /// <Warning>**Endpoint scheduled for retirement.** This URL will stop accepting requests **60 days from the Lightning v3.1 Pro launch (2026-05-15)** — i.e. on **2026-07-14**. The Lightning v3.1 model itself is current and stays. Migrate to [`POST /waves/v1/tts/live`](/waves/api-reference/api-reference/text-to-speech/stream-speech-sse) and select Lightning v3.1 via the `model` body field (default).</Warning>
/// Synthesize speech and stream the audio back over Server-Sent Events. The body and parameters are identical to the sync `/get_speech` endpoint — the difference is the response is a stream of base64-encoded PCM chunks instead of one binary blob.
/// ## When to use this
/// - **Use this** when you want playback to start before synthesis is complete — long passages, latency-sensitive UI, live narration.
@@ -102,7 +103,8 @@ public partial interface ISubpackageTextToSpeechClient global::SmallestAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Lightning v3.1 SSE
+ /// Lightning v3.1 SSE (Endpoint Deprecated)
+ /// <Warning>**Endpoint scheduled for retirement.** This URL will stop accepting requests **60 days from the Lightning v3.1 Pro launch (2026-05-15)** — i.e. on **2026-07-14**. The Lightning v3.1 model itself is current and stays. Migrate to [`POST /waves/v1/tts/live`](/waves/api-reference/api-reference/text-to-speech/stream-speech-sse) and select Lightning v3.1 via the `model` body field (default).</Warning>
/// Synthesize speech and stream the audio back over Server-Sent Events. The body and parameters are identical to the sync `/get_speech` endpoint — the difference is the response is a stream of base64-encoded PCM chunks instead of one binary blob.
/// ## When to use this
/// - **Use this** when you want playback to start before synthesis is complete — long passages, latency-sensitive UI, live narration.
@@ -199,7 +201,8 @@ public partial interface ISubpackageTextToSpeechClient global::SmallestAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Lightning v3.1 SSE
+ /// Lightning v3.1 SSE (Endpoint Deprecated)
+ /// <Warning>**Endpoint scheduled for retirement.** This URL will stop accepting requests **60 days from the Lightning v3.1 Pro launch (2026-05-15)** — i.e. on **2026-07-14**. The Lightning v3.1 model itself is current and stays. Migrate to [`POST /waves/v1/tts/live`](/waves/api-reference/api-reference/text-to-speech/stream-speech-sse) and select Lightning v3.1 via the `model` body field (default).</Warning>
/// Synthesize speech and stream the audio back over Server-Sent Events. The body and parameters are identical to the sync `/get_speech` endpoint — the difference is the response is a stream of base64-encoded PCM chunks instead of one binary blob.
/// ## When to use this
/// - **Use this** when you want playback to start before synthesis is complete — long passages, latency-sensitive UI, live narration.
@@ -294,6 +297,17 @@ public partial interface ISubpackageTextToSpeechClient /// The voice identifier to use for speech generation.
/// Default Value: daniel /// + /// + /// TTS model to route the request to.
+ /// - `lightning_v3.1` (default) — standard Lightning v3.1 pool.
+ /// - `lightning_v3.1_pro` — Lightning v3.1 Pro pool with a curated
+ /// voice catalog. See the
+ /// [Pro model card](/waves/model-cards/text-to-speech/lightning-v-3-1-pro).
+ /// New integrations should use the unified
+ /// `/waves/v1/tts` route instead of this endpoint, but the `model`
+ /// field is supported here for backwards-compatible Pro opt-in.
+ /// Default Value: lightning_v3.1 + /// /// /// The sample rate for the generated audio.
/// Default Value: 44100 @@ -335,6 +349,7 @@ public partial interface ISubpackageTextToSpeechClient global::System.Threading.Tasks.Task StreamLightningV31SpeechAsync( string text = "Hey i am your a text to speech model", string voiceId = "daniel", + global::SmallestAI.LightningV31RequestModel? model = default, global::SmallestAI.LightningV31RequestSampleRate? sampleRate = default, double? speed = default, global::SmallestAI.LightningV31RequestLanguage? language = default, diff --git a/src/libs/SmallestAI/Generated/SmallestAI.ISubpackageTextToSpeechClient.SynthesizeLightningV31Speech.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.ISubpackageTextToSpeechClient.SynthesizeLightningV31Speech.g.cs index c5b343b..35c2d38 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.ISubpackageTextToSpeechClient.SynthesizeLightningV31Speech.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.ISubpackageTextToSpeechClient.SynthesizeLightningV31Speech.g.cs @@ -5,7 +5,8 @@ namespace SmallestAI public partial interface ISubpackageTextToSpeechClient { /// - /// Lightning v3.1
+ /// Lightning v3.1 (Endpoint Deprecated)
+ /// <Warning>**Endpoint scheduled for retirement.** This URL will stop accepting requests **60 days from the Lightning v3.1 Pro launch (2026-05-15)** — i.e. on **2026-07-14**. The Lightning v3.1 model itself is current and stays. Migrate to [`POST /waves/v1/tts`](/waves/api-reference/api-reference/text-to-speech/synthesize-speech) and select Lightning v3.1 via the `model` body field (default).</Warning>
/// Synthesize speech from text in a single request. The simplest way to get audio when you have the full text up front — pass `text` + `voice_id`, get back binary audio.
/// ## When to use this
/// - **Use this** for short utterances you can render before playback (notifications, prompts, batch jobs, audio file generation).
@@ -91,7 +92,8 @@ public partial interface ISubpackageTextToSpeechClient global::SmallestAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Lightning v3.1
+ /// Lightning v3.1 (Endpoint Deprecated)
+ /// <Warning>**Endpoint scheduled for retirement.** This URL will stop accepting requests **60 days from the Lightning v3.1 Pro launch (2026-05-15)** — i.e. on **2026-07-14**. The Lightning v3.1 model itself is current and stays. Migrate to [`POST /waves/v1/tts`](/waves/api-reference/api-reference/text-to-speech/synthesize-speech) and select Lightning v3.1 via the `model` body field (default).</Warning>
/// Synthesize speech from text in a single request. The simplest way to get audio when you have the full text up front — pass `text` + `voice_id`, get back binary audio.
/// ## When to use this
/// - **Use this** for short utterances you can render before playback (notifications, prompts, batch jobs, audio file generation).
@@ -177,7 +179,8 @@ public partial interface ISubpackageTextToSpeechClient global::SmallestAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Lightning v3.1
+ /// Lightning v3.1 (Endpoint Deprecated)
+ /// <Warning>**Endpoint scheduled for retirement.** This URL will stop accepting requests **60 days from the Lightning v3.1 Pro launch (2026-05-15)** — i.e. on **2026-07-14**. The Lightning v3.1 model itself is current and stays. Migrate to [`POST /waves/v1/tts`](/waves/api-reference/api-reference/text-to-speech/synthesize-speech) and select Lightning v3.1 via the `model` body field (default).</Warning>
/// Synthesize speech from text in a single request. The simplest way to get audio when you have the full text up front — pass `text` + `voice_id`, get back binary audio.
/// ## When to use this
/// - **Use this** for short utterances you can render before playback (notifications, prompts, batch jobs, audio file generation).
@@ -263,7 +266,8 @@ public partial interface ISubpackageTextToSpeechClient global::SmallestAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// - /// Lightning v3.1
+ /// Lightning v3.1 (Endpoint Deprecated)
+ /// <Warning>**Endpoint scheduled for retirement.** This URL will stop accepting requests **60 days from the Lightning v3.1 Pro launch (2026-05-15)** — i.e. on **2026-07-14**. The Lightning v3.1 model itself is current and stays. Migrate to [`POST /waves/v1/tts`](/waves/api-reference/api-reference/text-to-speech/synthesize-speech) and select Lightning v3.1 via the `model` body field (default).</Warning>
/// Synthesize speech from text in a single request. The simplest way to get audio when you have the full text up front — pass `text` + `voice_id`, get back binary audio.
/// ## When to use this
/// - **Use this** for short utterances you can render before playback (notifications, prompts, batch jobs, audio file generation).
@@ -346,6 +350,17 @@ public partial interface ISubpackageTextToSpeechClient /// The voice identifier to use for speech generation.
/// Default Value: daniel /// + /// + /// TTS model to route the request to.
+ /// - `lightning_v3.1` (default) — standard Lightning v3.1 pool.
+ /// - `lightning_v3.1_pro` — Lightning v3.1 Pro pool with a curated
+ /// voice catalog. See the
+ /// [Pro model card](/waves/model-cards/text-to-speech/lightning-v-3-1-pro).
+ /// New integrations should use the unified
+ /// `/waves/v1/tts` route instead of this endpoint, but the `model`
+ /// field is supported here for backwards-compatible Pro opt-in.
+ /// Default Value: lightning_v3.1 + /// /// /// The sample rate for the generated audio.
/// Default Value: 44100 @@ -388,6 +403,7 @@ public partial interface ISubpackageTextToSpeechClient global::SmallestAI.WavesV1LightningV31GetSpeechPostParametersAccept accept = global::SmallestAI.WavesV1LightningV31GetSpeechPostParametersAccept.AudioWav, string text = "Hey i am your a text to speech model", string voiceId = "daniel", + global::SmallestAI.LightningV31RequestModel? model = default, global::SmallestAI.LightningV31RequestSampleRate? sampleRate = default, double? speed = default, global::SmallestAI.LightningV31RequestLanguage? language = default, diff --git a/src/libs/SmallestAI/Generated/SmallestAI.ISubpackageTextToSpeechClient.SynthesizeSpeech.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.ISubpackageTextToSpeechClient.SynthesizeSpeech.g.cs new file mode 100644 index 0000000..52f0d52 --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.ISubpackageTextToSpeechClient.SynthesizeSpeech.g.cs @@ -0,0 +1,329 @@ +#nullable enable + +namespace SmallestAI +{ + public partial interface ISubpackageTextToSpeechClient + { + /// + /// Synthesize speech
+ /// Synthesize speech from text in a single request. Pass `text` + `voice_id`, get back binary audio.
+ /// Pick the model with the `model` body parameter: default `lightning_v3.1`, or `lightning_v3.1_pro` for the Pro pool. Other request parameters are identical across models.
+ /// ## When to use this
+ /// - **Use this** for short utterances you can render before playback (notifications, prompts, batch jobs, audio file generation).
+ /// - **Use `/waves/v1/tts/live`** when you want playback to start before the full audio is ready (long passages, latency-sensitive apps).
+ /// - **Use `/waves/v1/tts/live`** (WebSocket) when text arrives incrementally (LLM token streams, live captioning).
+ /// ## Key features
+ /// - 44 kHz natural, expressive synthesis
+ /// - Model selectable per request via `model` body parameter
+ /// - Cloned voice IDs (`voice_*`) work on `lightning_v3.1` — same param as catalog voices
+ /// - 12 documented languages on `lightning_v3.1`; English + Hindi on `lightning_v3.1_pro`
+ /// - Output formats: `pcm`, `mp3`, `wav`, `ulaw`, `alaw`
+ /// - Sample rates: 8 kHz – 44.1 kHz
+ /// - Speed: 0.5× – 2×
+ /// - Per-call pronunciation dictionaries via `pronunciation_dicts`
+ /// ## Examples
+ /// **cURL — Lightning v3.1 (default)**
+ /// ```bash
+ /// curl -X POST "https://api.smallest.ai/waves/v1/tts" \
+ /// -H "Authorization: Bearer $SMALLEST_API_KEY" \
+ /// -H "Content-Type: application/json" \
+ /// -H "Accept: audio/wav" \
+ /// -d '{
+ /// "text": "Hello from Waves TTS.",
+ /// "voice_id": "magnus",
+ /// "sample_rate": 24000,
+ /// "output_format": "wav"
+ /// }' --output speech.wav
+ /// ```
+ /// **cURL — Lightning v3.1 Pro**
+ /// ```bash
+ /// curl -X POST "https://api.smallest.ai/waves/v1/tts" \
+ /// -H "Authorization: Bearer $SMALLEST_API_KEY" \
+ /// -H "Content-Type: application/json" \
+ /// -H "Accept: audio/wav" \
+ /// -d '{
+ /// "text": "Hello from the Lightning v3.1 Pro pool.",
+ /// "voice_id": "meher",
+ /// "model": "lightning_v3.1_pro",
+ /// "sample_rate": 24000,
+ /// "output_format": "wav"
+ /// }' --output speech.wav
+ /// ```
+ /// ## Common gotchas
+ /// - **Set `Accept: audio/wav`.** Omitting it can return an empty or unplayable response.
+ /// - **Pair voice IDs with the right model.** Voice catalogs differ between `lightning_v3.1` and `lightning_v3.1_pro`. The API does not reject mismatched pairings, but using a Pro-only `voice_id` with `model=lightning_v3.1` (or omitting `model`) can return wrong or hallucinated audio. Pair Pro voices with `model=lightning_v3.1_pro`; standard catalog voices with `model=lightning_v3.1` (the default).
+ /// - **Cloned voices** (`voice_*` from `add_voice`) work with `lightning_v3.1` only; voice cloning is not available on `lightning_v3.1_pro`.
+ /// - **44.1 kHz output** is supported but most playback environments are happy with 24 kHz — drop the sample rate if bandwidth matters. + ///
+ /// + /// Default Value: audio/wav + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task SynthesizeSpeechAsync( + + global::SmallestAI.TtsRequest request, + global::SmallestAI.WavesV1TtsPostParametersAccept accept = global::SmallestAI.WavesV1TtsPostParametersAccept.AudioWav, + global::SmallestAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Synthesize speech
+ /// Synthesize speech from text in a single request. Pass `text` + `voice_id`, get back binary audio.
+ /// Pick the model with the `model` body parameter: default `lightning_v3.1`, or `lightning_v3.1_pro` for the Pro pool. Other request parameters are identical across models.
+ /// ## When to use this
+ /// - **Use this** for short utterances you can render before playback (notifications, prompts, batch jobs, audio file generation).
+ /// - **Use `/waves/v1/tts/live`** when you want playback to start before the full audio is ready (long passages, latency-sensitive apps).
+ /// - **Use `/waves/v1/tts/live`** (WebSocket) when text arrives incrementally (LLM token streams, live captioning).
+ /// ## Key features
+ /// - 44 kHz natural, expressive synthesis
+ /// - Model selectable per request via `model` body parameter
+ /// - Cloned voice IDs (`voice_*`) work on `lightning_v3.1` — same param as catalog voices
+ /// - 12 documented languages on `lightning_v3.1`; English + Hindi on `lightning_v3.1_pro`
+ /// - Output formats: `pcm`, `mp3`, `wav`, `ulaw`, `alaw`
+ /// - Sample rates: 8 kHz – 44.1 kHz
+ /// - Speed: 0.5× – 2×
+ /// - Per-call pronunciation dictionaries via `pronunciation_dicts`
+ /// ## Examples
+ /// **cURL — Lightning v3.1 (default)**
+ /// ```bash
+ /// curl -X POST "https://api.smallest.ai/waves/v1/tts" \
+ /// -H "Authorization: Bearer $SMALLEST_API_KEY" \
+ /// -H "Content-Type: application/json" \
+ /// -H "Accept: audio/wav" \
+ /// -d '{
+ /// "text": "Hello from Waves TTS.",
+ /// "voice_id": "magnus",
+ /// "sample_rate": 24000,
+ /// "output_format": "wav"
+ /// }' --output speech.wav
+ /// ```
+ /// **cURL — Lightning v3.1 Pro**
+ /// ```bash
+ /// curl -X POST "https://api.smallest.ai/waves/v1/tts" \
+ /// -H "Authorization: Bearer $SMALLEST_API_KEY" \
+ /// -H "Content-Type: application/json" \
+ /// -H "Accept: audio/wav" \
+ /// -d '{
+ /// "text": "Hello from the Lightning v3.1 Pro pool.",
+ /// "voice_id": "meher",
+ /// "model": "lightning_v3.1_pro",
+ /// "sample_rate": 24000,
+ /// "output_format": "wav"
+ /// }' --output speech.wav
+ /// ```
+ /// ## Common gotchas
+ /// - **Set `Accept: audio/wav`.** Omitting it can return an empty or unplayable response.
+ /// - **Pair voice IDs with the right model.** Voice catalogs differ between `lightning_v3.1` and `lightning_v3.1_pro`. The API does not reject mismatched pairings, but using a Pro-only `voice_id` with `model=lightning_v3.1` (or omitting `model`) can return wrong or hallucinated audio. Pair Pro voices with `model=lightning_v3.1_pro`; standard catalog voices with `model=lightning_v3.1` (the default).
+ /// - **Cloned voices** (`voice_*` from `add_voice`) work with `lightning_v3.1` only; voice cloning is not available on `lightning_v3.1_pro`.
+ /// - **44.1 kHz output** is supported but most playback environments are happy with 24 kHz — drop the sample rate if bandwidth matters. + ///
+ /// + /// Default Value: audio/wav + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task SynthesizeSpeechAsStreamAsync( + + global::SmallestAI.TtsRequest request, + global::SmallestAI.WavesV1TtsPostParametersAccept accept = global::SmallestAI.WavesV1TtsPostParametersAccept.AudioWav, + global::SmallestAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Synthesize speech
+ /// Synthesize speech from text in a single request. Pass `text` + `voice_id`, get back binary audio.
+ /// Pick the model with the `model` body parameter: default `lightning_v3.1`, or `lightning_v3.1_pro` for the Pro pool. Other request parameters are identical across models.
+ /// ## When to use this
+ /// - **Use this** for short utterances you can render before playback (notifications, prompts, batch jobs, audio file generation).
+ /// - **Use `/waves/v1/tts/live`** when you want playback to start before the full audio is ready (long passages, latency-sensitive apps).
+ /// - **Use `/waves/v1/tts/live`** (WebSocket) when text arrives incrementally (LLM token streams, live captioning).
+ /// ## Key features
+ /// - 44 kHz natural, expressive synthesis
+ /// - Model selectable per request via `model` body parameter
+ /// - Cloned voice IDs (`voice_*`) work on `lightning_v3.1` — same param as catalog voices
+ /// - 12 documented languages on `lightning_v3.1`; English + Hindi on `lightning_v3.1_pro`
+ /// - Output formats: `pcm`, `mp3`, `wav`, `ulaw`, `alaw`
+ /// - Sample rates: 8 kHz – 44.1 kHz
+ /// - Speed: 0.5× – 2×
+ /// - Per-call pronunciation dictionaries via `pronunciation_dicts`
+ /// ## Examples
+ /// **cURL — Lightning v3.1 (default)**
+ /// ```bash
+ /// curl -X POST "https://api.smallest.ai/waves/v1/tts" \
+ /// -H "Authorization: Bearer $SMALLEST_API_KEY" \
+ /// -H "Content-Type: application/json" \
+ /// -H "Accept: audio/wav" \
+ /// -d '{
+ /// "text": "Hello from Waves TTS.",
+ /// "voice_id": "magnus",
+ /// "sample_rate": 24000,
+ /// "output_format": "wav"
+ /// }' --output speech.wav
+ /// ```
+ /// **cURL — Lightning v3.1 Pro**
+ /// ```bash
+ /// curl -X POST "https://api.smallest.ai/waves/v1/tts" \
+ /// -H "Authorization: Bearer $SMALLEST_API_KEY" \
+ /// -H "Content-Type: application/json" \
+ /// -H "Accept: audio/wav" \
+ /// -d '{
+ /// "text": "Hello from the Lightning v3.1 Pro pool.",
+ /// "voice_id": "meher",
+ /// "model": "lightning_v3.1_pro",
+ /// "sample_rate": 24000,
+ /// "output_format": "wav"
+ /// }' --output speech.wav
+ /// ```
+ /// ## Common gotchas
+ /// - **Set `Accept: audio/wav`.** Omitting it can return an empty or unplayable response.
+ /// - **Pair voice IDs with the right model.** Voice catalogs differ between `lightning_v3.1` and `lightning_v3.1_pro`. The API does not reject mismatched pairings, but using a Pro-only `voice_id` with `model=lightning_v3.1` (or omitting `model`) can return wrong or hallucinated audio. Pair Pro voices with `model=lightning_v3.1_pro`; standard catalog voices with `model=lightning_v3.1` (the default).
+ /// - **Cloned voices** (`voice_*` from `add_voice`) work with `lightning_v3.1` only; voice cloning is not available on `lightning_v3.1_pro`.
+ /// - **44.1 kHz output** is supported but most playback environments are happy with 24 kHz — drop the sample rate if bandwidth matters. + ///
+ /// + /// Default Value: audio/wav + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> SynthesizeSpeechAsResponseAsync( + + global::SmallestAI.TtsRequest request, + global::SmallestAI.WavesV1TtsPostParametersAccept accept = global::SmallestAI.WavesV1TtsPostParametersAccept.AudioWav, + global::SmallestAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Synthesize speech
+ /// Synthesize speech from text in a single request. Pass `text` + `voice_id`, get back binary audio.
+ /// Pick the model with the `model` body parameter: default `lightning_v3.1`, or `lightning_v3.1_pro` for the Pro pool. Other request parameters are identical across models.
+ /// ## When to use this
+ /// - **Use this** for short utterances you can render before playback (notifications, prompts, batch jobs, audio file generation).
+ /// - **Use `/waves/v1/tts/live`** when you want playback to start before the full audio is ready (long passages, latency-sensitive apps).
+ /// - **Use `/waves/v1/tts/live`** (WebSocket) when text arrives incrementally (LLM token streams, live captioning).
+ /// ## Key features
+ /// - 44 kHz natural, expressive synthesis
+ /// - Model selectable per request via `model` body parameter
+ /// - Cloned voice IDs (`voice_*`) work on `lightning_v3.1` — same param as catalog voices
+ /// - 12 documented languages on `lightning_v3.1`; English + Hindi on `lightning_v3.1_pro`
+ /// - Output formats: `pcm`, `mp3`, `wav`, `ulaw`, `alaw`
+ /// - Sample rates: 8 kHz – 44.1 kHz
+ /// - Speed: 0.5× – 2×
+ /// - Per-call pronunciation dictionaries via `pronunciation_dicts`
+ /// ## Examples
+ /// **cURL — Lightning v3.1 (default)**
+ /// ```bash
+ /// curl -X POST "https://api.smallest.ai/waves/v1/tts" \
+ /// -H "Authorization: Bearer $SMALLEST_API_KEY" \
+ /// -H "Content-Type: application/json" \
+ /// -H "Accept: audio/wav" \
+ /// -d '{
+ /// "text": "Hello from Waves TTS.",
+ /// "voice_id": "magnus",
+ /// "sample_rate": 24000,
+ /// "output_format": "wav"
+ /// }' --output speech.wav
+ /// ```
+ /// **cURL — Lightning v3.1 Pro**
+ /// ```bash
+ /// curl -X POST "https://api.smallest.ai/waves/v1/tts" \
+ /// -H "Authorization: Bearer $SMALLEST_API_KEY" \
+ /// -H "Content-Type: application/json" \
+ /// -H "Accept: audio/wav" \
+ /// -d '{
+ /// "text": "Hello from the Lightning v3.1 Pro pool.",
+ /// "voice_id": "meher",
+ /// "model": "lightning_v3.1_pro",
+ /// "sample_rate": 24000,
+ /// "output_format": "wav"
+ /// }' --output speech.wav
+ /// ```
+ /// ## Common gotchas
+ /// - **Set `Accept: audio/wav`.** Omitting it can return an empty or unplayable response.
+ /// - **Pair voice IDs with the right model.** Voice catalogs differ between `lightning_v3.1` and `lightning_v3.1_pro`. The API does not reject mismatched pairings, but using a Pro-only `voice_id` with `model=lightning_v3.1` (or omitting `model`) can return wrong or hallucinated audio. Pair Pro voices with `model=lightning_v3.1_pro`; standard catalog voices with `model=lightning_v3.1` (the default).
+ /// - **Cloned voices** (`voice_*` from `add_voice`) work with `lightning_v3.1` only; voice cloning is not available on `lightning_v3.1_pro`.
+ /// - **44.1 kHz output** is supported but most playback environments are happy with 24 kHz — drop the sample rate if bandwidth matters. + ///
+ /// + /// Default Value: audio/wav + /// + /// + /// The text to convert to speech.
+ /// Default Value: Hello from Waves TTS. + /// + /// + /// The voice identifier to use for speech generation. See the model card for available voices per model.
+ /// Default Value: magnus + /// + /// + /// TTS model to route the request to. Controls which model pool serves
+ /// this synthesis.
+ /// - `lightning_v3.1` (default) — standard Lightning v3.1.
+ /// - `lightning_v3.1_pro` — Lightning v3.1 Pro pool. Improved audio
+ /// quality and naturalness, with a curated voice catalog. See the
+ /// [Lightning v3.1 Pro model card](/waves/model-cards/text-to-speech/lightning-v-3-1-pro)
+ /// for supported voice IDs.
+ /// Same concurrency and latency profile across both. Other request
+ /// parameters behave identically.
+ /// Default Value: lightning_v3.1 + /// + /// + /// The sample rate for the generated audio.
+ /// Default Value: 44100 + /// + /// + /// The speed of the generated speech.
+ /// Default Value: 1 + /// + /// + /// Language code for synthesis. Influences pronunciation, number/date
+ /// normalization, and phoneme selection.
+ /// Each voice has its own `tags.language` set in the voice catalog —
+ /// query `GET /waves/v1/lightning-v3.1/get_voices`. Pass a language
+ /// the voice was trained on; passing other codes is accepted by the
+ /// API but produces English-pronounced output.
+ /// On `lightning_v3.1`, the full 12-language catalog applies. On
+ /// `lightning_v3.1_pro`, Indian voices speak `en` and `hi` (with
+ /// `auto` for code-switching); British and American voices speak
+ /// English only.
+ /// Default Value: en + /// + /// + /// Format of the returned audio. `pcm` is the lowest-latency option
+ /// but requires a decoder to play; `mp3` and `wav` are directly
+ /// playable in browsers and most media players. The server default
+ /// is `pcm` when the field is omitted — the API playground uses
+ /// `mp3` so the generated audio is directly playable.
+ /// Default Value: pcm + /// + /// + /// The IDs of the pronunciation dictionaries to use for speech generation. Available on both `lightning_v3.1` and `lightning_v3.1_pro`. + /// + /// + /// Optional client-provided session identifier for correlation. Only alphanumeric characters, hyphens, underscores, and dots are allowed. Max 128 characters. Echoed back in response headers as `X-External-Session-Id`. + /// + /// + /// Optional client-provided request identifier for correlation. Only alphanumeric characters, hyphens, underscores, and dots are allowed. Max 128 characters. Echoed back in response headers as `X-External-Request-Id`. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task SynthesizeSpeechAsync( + global::SmallestAI.WavesV1TtsPostParametersAccept accept = global::SmallestAI.WavesV1TtsPostParametersAccept.AudioWav, + string text = "Hello from Waves TTS.", + string voiceId = "magnus", + global::SmallestAI.TtsRequestModel? model = default, + global::SmallestAI.TtsRequestSampleRate? sampleRate = default, + double? speed = default, + global::SmallestAI.TtsRequestLanguage? language = default, + global::SmallestAI.TtsRequestOutputFormat? outputFormat = default, + global::System.Collections.Generic.IList? pronunciationDicts = default, + string? sessionId = default, + string? requestId = default, + global::SmallestAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/SmallestAI/Generated/SmallestAI.ISubpackageTextToSpeechClient.SynthesizeSpeechSse.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.ISubpackageTextToSpeechClient.SynthesizeSpeechSse.g.cs new file mode 100644 index 0000000..9a0c65b --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.ISubpackageTextToSpeechClient.SynthesizeSpeechSse.g.cs @@ -0,0 +1,159 @@ +#nullable enable + +namespace SmallestAI +{ + public partial interface ISubpackageTextToSpeechClient + { + /// + /// Stream speech (SSE)
+ /// 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](/waves/api-reference/api-reference/text-to-speech/live-tts-web-socket).
+ /// </Note>
+ /// ## When to use this
+ /// - **Use this** when you want playback to start before synthesis is complete — long passages, latency-sensitive UI, live narration.
+ /// - **Use sync `/waves/v1/tts`** when total latency doesn't matter and you'd rather get one buffer.
+ /// - **Use `/waves/v1/tts/live`** (WebSocket) when the *text* arrives incrementally (LLM token stream). SSE assumes you have the full text up front.
+ /// ## How it works
+ /// 1. POST your text + voice settings — same payload as `/waves/v1/tts`, plus optional `model`.
+ /// 2. The response is `Content-Type: text/event-stream`. Each chunk frame is `event: audio\n` followed by `data: {"audio": "<base64-pcm>"}\n\n`.
+ /// 3. 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.).
+ /// 4. A final `data: {"done": true}\n\n` frame marks end of stream.
+ /// ## Examples
+ /// **cURL**
+ /// ```bash
+ /// curl -N -X POST "https://api.smallest.ai/waves/v1/tts/live" \
+ /// -H "Authorization: Bearer $SMALLEST_API_KEY" \
+ /// -H "Content-Type: application/json" \
+ /// -d '{
+ /// "text": "Streaming this paragraph chunk by chunk so playback can start sooner.",
+ /// "voice_id": "magnus",
+ /// "sample_rate": 24000,
+ /// "output_format": "pcm"
+ /// }'
+ /// ```
+ /// ## Common gotchas
+ /// - **Use a streaming-friendly client.** `curl -N`, Python `iter_lines`, or a `fetch` `ReadableStream` reader. Buffering clients will hide the latency win.
+ /// - **Audio is base64 inside the event payload**, not the raw event bytes. Decode the `data.audio` field per event.
+ /// - **`output_format=pcm`** gives the lowest overhead for streaming playback. `wav`/`mp3` work but add per-chunk framing bytes. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Collections.Generic.IAsyncEnumerable SynthesizeSpeechSseAsync( + + global::SmallestAI.TtsRequest request, + global::SmallestAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Stream speech (SSE)
+ /// 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](/waves/api-reference/api-reference/text-to-speech/live-tts-web-socket).
+ /// </Note>
+ /// ## When to use this
+ /// - **Use this** when you want playback to start before synthesis is complete — long passages, latency-sensitive UI, live narration.
+ /// - **Use sync `/waves/v1/tts`** when total latency doesn't matter and you'd rather get one buffer.
+ /// - **Use `/waves/v1/tts/live`** (WebSocket) when the *text* arrives incrementally (LLM token stream). SSE assumes you have the full text up front.
+ /// ## How it works
+ /// 1. POST your text + voice settings — same payload as `/waves/v1/tts`, plus optional `model`.
+ /// 2. The response is `Content-Type: text/event-stream`. Each chunk frame is `event: audio\n` followed by `data: {"audio": "<base64-pcm>"}\n\n`.
+ /// 3. 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.).
+ /// 4. A final `data: {"done": true}\n\n` frame marks end of stream.
+ /// ## Examples
+ /// **cURL**
+ /// ```bash
+ /// curl -N -X POST "https://api.smallest.ai/waves/v1/tts/live" \
+ /// -H "Authorization: Bearer $SMALLEST_API_KEY" \
+ /// -H "Content-Type: application/json" \
+ /// -d '{
+ /// "text": "Streaming this paragraph chunk by chunk so playback can start sooner.",
+ /// "voice_id": "magnus",
+ /// "sample_rate": 24000,
+ /// "output_format": "pcm"
+ /// }'
+ /// ```
+ /// ## Common gotchas
+ /// - **Use a streaming-friendly client.** `curl -N`, Python `iter_lines`, or a `fetch` `ReadableStream` reader. Buffering clients will hide the latency win.
+ /// - **Audio is base64 inside the event payload**, not the raw event bytes. Decode the `data.audio` field per event.
+ /// - **`output_format=pcm`** gives the lowest overhead for streaming playback. `wav`/`mp3` work but add per-chunk framing bytes. + ///
+ /// + /// The text to convert to speech.
+ /// Default Value: Hello from Waves TTS. + /// + /// + /// The voice identifier to use for speech generation. See the model card for available voices per model.
+ /// Default Value: magnus + /// + /// + /// TTS model to route the request to. Controls which model pool serves
+ /// this synthesis.
+ /// - `lightning_v3.1` (default) — standard Lightning v3.1.
+ /// - `lightning_v3.1_pro` — Lightning v3.1 Pro pool. Improved audio
+ /// quality and naturalness, with a curated voice catalog. See the
+ /// [Lightning v3.1 Pro model card](/waves/model-cards/text-to-speech/lightning-v-3-1-pro)
+ /// for supported voice IDs.
+ /// Same concurrency and latency profile across both. Other request
+ /// parameters behave identically.
+ /// Default Value: lightning_v3.1 + /// + /// + /// The sample rate for the generated audio.
+ /// Default Value: 44100 + /// + /// + /// The speed of the generated speech.
+ /// Default Value: 1 + /// + /// + /// Language code for synthesis. Influences pronunciation, number/date
+ /// normalization, and phoneme selection.
+ /// Each voice has its own `tags.language` set in the voice catalog —
+ /// query `GET /waves/v1/lightning-v3.1/get_voices`. Pass a language
+ /// the voice was trained on; passing other codes is accepted by the
+ /// API but produces English-pronounced output.
+ /// On `lightning_v3.1`, the full 12-language catalog applies. On
+ /// `lightning_v3.1_pro`, Indian voices speak `en` and `hi` (with
+ /// `auto` for code-switching); British and American voices speak
+ /// English only.
+ /// Default Value: en + /// + /// + /// Format of the returned audio. `pcm` is the lowest-latency option
+ /// but requires a decoder to play; `mp3` and `wav` are directly
+ /// playable in browsers and most media players. The server default
+ /// is `pcm` when the field is omitted — the API playground uses
+ /// `mp3` so the generated audio is directly playable.
+ /// Default Value: pcm + /// + /// + /// The IDs of the pronunciation dictionaries to use for speech generation. Available on both `lightning_v3.1` and `lightning_v3.1_pro`. + /// + /// + /// Optional client-provided session identifier for correlation. Only alphanumeric characters, hyphens, underscores, and dots are allowed. Max 128 characters. Echoed back in response headers as `X-External-Session-Id`. + /// + /// + /// Optional client-provided request identifier for correlation. Only alphanumeric characters, hyphens, underscores, and dots are allowed. Max 128 characters. Echoed back in response headers as `X-External-Request-Id`. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Collections.Generic.IAsyncEnumerable SynthesizeSpeechSseAsync( + string text = "Hello from Waves TTS.", + string voiceId = "magnus", + global::SmallestAI.TtsRequestModel? model = default, + global::SmallestAI.TtsRequestSampleRate? sampleRate = default, + double? speed = default, + global::SmallestAI.TtsRequestLanguage? language = default, + global::SmallestAI.TtsRequestOutputFormat? outputFormat = default, + global::System.Collections.Generic.IList? pronunciationDicts = default, + string? sessionId = default, + string? requestId = default, + global::SmallestAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/SmallestAI/Generated/SmallestAI.ISubpackageVoicesClient.GetWavesVoices.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.ISubpackageVoicesClient.GetWavesVoices.g.cs index a98d3ef..9407480 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.ISubpackageVoicesClient.GetWavesVoices.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.ISubpackageVoicesClient.GetWavesVoices.g.cs @@ -6,7 +6,7 @@ public partial interface ISubpackageVoicesClient { /// /// Get Voices
- /// Get voices supported for a given model using the new Waves API. + /// List voices available for Lightning v3.1. The response is the union of the standard and Pro voice catalogs — the API does not return a per-voice "is Pro" flag, so consult the [Lightning v3.1 Pro](/waves/model-cards/text-to-speech/lightning-v-3-1-pro) and [Lightning v3.1](/waves/model-cards/text-to-speech/lightning-v-3-1) model cards for the canonical per-pool voice lists. Use the `voice_id` from this response together with `"model": "lightning_v3.1"` (default) or `"model": "lightning_v3.1_pro"` on the unified `/waves/v1/tts` route to pick the pool. ///
/// /// Default Value: lightning-v3.1 @@ -20,7 +20,7 @@ public partial interface ISubpackageVoicesClient global::System.Threading.CancellationToken cancellationToken = default); /// /// Get Voices
- /// Get voices supported for a given model using the new Waves API. + /// List voices available for Lightning v3.1. The response is the union of the standard and Pro voice catalogs — the API does not return a per-voice "is Pro" flag, so consult the [Lightning v3.1 Pro](/waves/model-cards/text-to-speech/lightning-v-3-1-pro) and [Lightning v3.1](/waves/model-cards/text-to-speech/lightning-v-3-1) model cards for the canonical per-pool voice lists. Use the `voice_id` from this response together with `"model": "lightning_v3.1"` (default) or `"model": "lightning_v3.1_pro"` on the unified `/waves/v1/tts` route to pick the pool. ///
/// /// Default Value: lightning-v3.1 diff --git a/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.LightningV31RequestModel.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.LightningV31RequestModel.g.cs new file mode 100644 index 0000000..d5dc91f --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.LightningV31RequestModel.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace SmallestAI.JsonConverters +{ + /// + public sealed class LightningV31RequestModelJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::SmallestAI.LightningV31RequestModel Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::SmallestAI.LightningV31RequestModelExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::SmallestAI.LightningV31RequestModel)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::SmallestAI.LightningV31RequestModel); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::SmallestAI.LightningV31RequestModel value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::SmallestAI.LightningV31RequestModelExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.LightningV31RequestModelNullable.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.LightningV31RequestModelNullable.g.cs new file mode 100644 index 0000000..a8432df --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.LightningV31RequestModelNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace SmallestAI.JsonConverters +{ + /// + public sealed class LightningV31RequestModelNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::SmallestAI.LightningV31RequestModel? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::SmallestAI.LightningV31RequestModelExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::SmallestAI.LightningV31RequestModel)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::SmallestAI.LightningV31RequestModel?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::SmallestAI.LightningV31RequestModel? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::SmallestAI.LightningV31RequestModelExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.TtsRequestLanguage.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.TtsRequestLanguage.g.cs new file mode 100644 index 0000000..ff2b6eb --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.TtsRequestLanguage.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace SmallestAI.JsonConverters +{ + /// + public sealed class TtsRequestLanguageJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::SmallestAI.TtsRequestLanguage Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::SmallestAI.TtsRequestLanguageExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::SmallestAI.TtsRequestLanguage)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::SmallestAI.TtsRequestLanguage); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::SmallestAI.TtsRequestLanguage value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::SmallestAI.TtsRequestLanguageExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.TtsRequestLanguageNullable.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.TtsRequestLanguageNullable.g.cs new file mode 100644 index 0000000..31535bb --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.TtsRequestLanguageNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace SmallestAI.JsonConverters +{ + /// + public sealed class TtsRequestLanguageNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::SmallestAI.TtsRequestLanguage? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::SmallestAI.TtsRequestLanguageExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::SmallestAI.TtsRequestLanguage)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::SmallestAI.TtsRequestLanguage?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::SmallestAI.TtsRequestLanguage? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::SmallestAI.TtsRequestLanguageExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.TtsRequestModel.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.TtsRequestModel.g.cs new file mode 100644 index 0000000..1fba1dc --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.TtsRequestModel.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace SmallestAI.JsonConverters +{ + /// + public sealed class TtsRequestModelJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::SmallestAI.TtsRequestModel Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::SmallestAI.TtsRequestModelExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::SmallestAI.TtsRequestModel)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::SmallestAI.TtsRequestModel); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::SmallestAI.TtsRequestModel value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::SmallestAI.TtsRequestModelExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.TtsRequestModelNullable.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.TtsRequestModelNullable.g.cs new file mode 100644 index 0000000..bd33315 --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.TtsRequestModelNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace SmallestAI.JsonConverters +{ + /// + public sealed class TtsRequestModelNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::SmallestAI.TtsRequestModel? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::SmallestAI.TtsRequestModelExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::SmallestAI.TtsRequestModel)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::SmallestAI.TtsRequestModel?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::SmallestAI.TtsRequestModel? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::SmallestAI.TtsRequestModelExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.TtsRequestOutputFormat.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.TtsRequestOutputFormat.g.cs new file mode 100644 index 0000000..7d99b25 --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.TtsRequestOutputFormat.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace SmallestAI.JsonConverters +{ + /// + public sealed class TtsRequestOutputFormatJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::SmallestAI.TtsRequestOutputFormat Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::SmallestAI.TtsRequestOutputFormatExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::SmallestAI.TtsRequestOutputFormat)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::SmallestAI.TtsRequestOutputFormat); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::SmallestAI.TtsRequestOutputFormat value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::SmallestAI.TtsRequestOutputFormatExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.TtsRequestOutputFormatNullable.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.TtsRequestOutputFormatNullable.g.cs new file mode 100644 index 0000000..8566d48 --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.TtsRequestOutputFormatNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace SmallestAI.JsonConverters +{ + /// + public sealed class TtsRequestOutputFormatNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::SmallestAI.TtsRequestOutputFormat? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::SmallestAI.TtsRequestOutputFormatExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::SmallestAI.TtsRequestOutputFormat)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::SmallestAI.TtsRequestOutputFormat?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::SmallestAI.TtsRequestOutputFormat? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::SmallestAI.TtsRequestOutputFormatExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.TtsRequestSampleRate.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.TtsRequestSampleRate.g.cs new file mode 100644 index 0000000..c6c30b5 --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.TtsRequestSampleRate.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace SmallestAI.JsonConverters +{ + /// + public sealed class TtsRequestSampleRateJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::SmallestAI.TtsRequestSampleRate Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::SmallestAI.TtsRequestSampleRateExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::SmallestAI.TtsRequestSampleRate)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::SmallestAI.TtsRequestSampleRate); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::SmallestAI.TtsRequestSampleRate value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::SmallestAI.TtsRequestSampleRateExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.TtsRequestSampleRateNullable.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.TtsRequestSampleRateNullable.g.cs new file mode 100644 index 0000000..30234ee --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.TtsRequestSampleRateNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace SmallestAI.JsonConverters +{ + /// + public sealed class TtsRequestSampleRateNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::SmallestAI.TtsRequestSampleRate? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::SmallestAI.TtsRequestSampleRateExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::SmallestAI.TtsRequestSampleRate)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::SmallestAI.TtsRequestSampleRate?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::SmallestAI.TtsRequestSampleRate? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::SmallestAI.TtsRequestSampleRateExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.WavesV1TtsPostParametersAccept.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.WavesV1TtsPostParametersAccept.g.cs new file mode 100644 index 0000000..4c21e12 --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.WavesV1TtsPostParametersAccept.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace SmallestAI.JsonConverters +{ + /// + public sealed class WavesV1TtsPostParametersAcceptJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::SmallestAI.WavesV1TtsPostParametersAccept Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::SmallestAI.WavesV1TtsPostParametersAcceptExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::SmallestAI.WavesV1TtsPostParametersAccept)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::SmallestAI.WavesV1TtsPostParametersAccept); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::SmallestAI.WavesV1TtsPostParametersAccept value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::SmallestAI.WavesV1TtsPostParametersAcceptExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.WavesV1TtsPostParametersAcceptNullable.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.WavesV1TtsPostParametersAcceptNullable.g.cs new file mode 100644 index 0000000..d1f3006 --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.WavesV1TtsPostParametersAcceptNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace SmallestAI.JsonConverters +{ + /// + public sealed class WavesV1TtsPostParametersAcceptNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::SmallestAI.WavesV1TtsPostParametersAccept? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::SmallestAI.WavesV1TtsPostParametersAcceptExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::SmallestAI.WavesV1TtsPostParametersAccept)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::SmallestAI.WavesV1TtsPostParametersAccept?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::SmallestAI.WavesV1TtsPostParametersAccept? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::SmallestAI.WavesV1TtsPostParametersAcceptExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/SmallestAI/Generated/SmallestAI.JsonSerializerContext.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.JsonSerializerContext.g.cs index e6b6db1..f788916 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.JsonSerializerContext.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.JsonSerializerContext.g.cs @@ -13,10 +13,34 @@ namespace SmallestAI DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, Converters = new global::System.Type[] { + typeof(global::SmallestAI.JsonConverters.WavesV1TtsPostParametersAcceptJsonConverter), + + typeof(global::SmallestAI.JsonConverters.WavesV1TtsPostParametersAcceptNullableJsonConverter), + + typeof(global::SmallestAI.JsonConverters.TtsRequestModelJsonConverter), + + typeof(global::SmallestAI.JsonConverters.TtsRequestModelNullableJsonConverter), + + typeof(global::SmallestAI.JsonConverters.TtsRequestSampleRateJsonConverter), + + typeof(global::SmallestAI.JsonConverters.TtsRequestSampleRateNullableJsonConverter), + + typeof(global::SmallestAI.JsonConverters.TtsRequestLanguageJsonConverter), + + typeof(global::SmallestAI.JsonConverters.TtsRequestLanguageNullableJsonConverter), + + typeof(global::SmallestAI.JsonConverters.TtsRequestOutputFormatJsonConverter), + + typeof(global::SmallestAI.JsonConverters.TtsRequestOutputFormatNullableJsonConverter), + typeof(global::SmallestAI.JsonConverters.WavesV1LightningV31GetSpeechPostParametersAcceptJsonConverter), typeof(global::SmallestAI.JsonConverters.WavesV1LightningV31GetSpeechPostParametersAcceptNullableJsonConverter), + typeof(global::SmallestAI.JsonConverters.LightningV31RequestModelJsonConverter), + + typeof(global::SmallestAI.JsonConverters.LightningV31RequestModelNullableJsonConverter), + typeof(global::SmallestAI.JsonConverters.LightningV31RequestSampleRateJsonConverter), typeof(global::SmallestAI.JsonConverters.LightningV31RequestSampleRateNullableJsonConverter), @@ -100,14 +124,22 @@ namespace SmallestAI typeof(global::SmallestAI.JsonConverters.UnixTimestampJsonConverter), })] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.JsonSerializerContextTypes))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.WavesV1TtsPostParametersAccept), TypeInfoPropertyName = "WavesV1TtsPostParametersAccept2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.TtsRequestModel), TypeInfoPropertyName = "TtsRequestModel2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.TtsRequestSampleRate), TypeInfoPropertyName = "TtsRequestSampleRate2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.TtsRequestLanguage), TypeInfoPropertyName = "TtsRequestLanguage2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.TtsRequestOutputFormat), TypeInfoPropertyName = "TtsRequestOutputFormat2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.TtsRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.TtsError))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.WavesV1LightningV31GetSpeechPostParametersAccept), TypeInfoPropertyName = "WavesV1LightningV31GetSpeechPostParametersAccept2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.LightningV31RequestModel), TypeInfoPropertyName = "LightningV31RequestModel2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.LightningV31RequestSampleRate), TypeInfoPropertyName = "LightningV31RequestSampleRate2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.LightningV31RequestLanguage), TypeInfoPropertyName = "LightningV31RequestLanguage2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.LightningV31RequestOutputFormat), TypeInfoPropertyName = "LightningV31RequestOutputFormat2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.LightningV31Request))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.SynthesizeLightningV31SpeechRequestBadRequestError))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.SynthesizeLightningV31SpeechRequestUnauthorizedError))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.SynthesizeLightningV31SpeechRequestInternalServerError))] diff --git a/src/libs/SmallestAI/Generated/SmallestAI.JsonSerializerContextTypes.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.JsonSerializerContextTypes.g.cs index 6e53c0e..05168eb 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.JsonSerializerContextTypes.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.JsonSerializerContextTypes.g.cs @@ -28,387 +28,419 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::SmallestAI.WavesV1LightningV31GetSpeechPostParametersAccept? Type0 { get; set; } + public global::SmallestAI.WavesV1TtsPostParametersAccept? Type0 { get; set; } /// /// /// - public global::SmallestAI.LightningV31RequestSampleRate? Type1 { get; set; } + public global::SmallestAI.TtsRequestModel? Type1 { get; set; } /// /// /// - public global::SmallestAI.LightningV31RequestLanguage? Type2 { get; set; } + public global::SmallestAI.TtsRequestSampleRate? Type2 { get; set; } /// /// /// - public global::SmallestAI.LightningV31RequestOutputFormat? Type3 { get; set; } + public global::SmallestAI.TtsRequestLanguage? Type3 { get; set; } /// /// /// - public global::SmallestAI.LightningV31Request? Type4 { get; set; } + public global::SmallestAI.TtsRequestOutputFormat? Type4 { get; set; } /// /// /// - public string? Type5 { get; set; } + public global::SmallestAI.TtsRequest? Type5 { get; set; } /// /// /// - public double? Type6 { get; set; } + public string? Type6 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type7 { get; set; } + public double? Type7 { get; set; } /// /// /// - public global::SmallestAI.SynthesizeLightningV31SpeechRequestBadRequestError? Type8 { get; set; } + public global::System.Collections.Generic.IList? Type8 { get; set; } /// /// /// - public global::SmallestAI.SynthesizeLightningV31SpeechRequestUnauthorizedError? Type9 { get; set; } + public global::SmallestAI.TtsError? Type9 { get; set; } /// /// /// - public global::SmallestAI.SynthesizeLightningV31SpeechRequestInternalServerError? Type10 { get; set; } + public global::SmallestAI.WavesV1LightningV31GetSpeechPostParametersAccept? Type10 { get; set; } /// /// /// - public global::SmallestAI.StreamLightningV31SpeechRequestBadRequestError? Type11 { get; set; } + public global::SmallestAI.LightningV31RequestModel? Type11 { get; set; } /// /// /// - public global::SmallestAI.StreamLightningV31SpeechRequestUnauthorizedError? Type12 { get; set; } + public global::SmallestAI.LightningV31RequestSampleRate? Type12 { get; set; } /// /// /// - public global::SmallestAI.StreamLightningV31SpeechRequestInternalServerError? Type13 { get; set; } + public global::SmallestAI.LightningV31RequestLanguage? Type13 { get; set; } /// /// /// - public global::SmallestAI.Lightningv2RequestLanguage? Type14 { get; set; } + public global::SmallestAI.LightningV31RequestOutputFormat? Type14 { get; set; } /// /// /// - public global::SmallestAI.Lightningv2RequestOutputFormat? Type15 { get; set; } + public global::SmallestAI.LightningV31Request? Type15 { get; set; } /// /// /// - public global::SmallestAI.Lightningv2Request? Type16 { get; set; } + public global::SmallestAI.SynthesizeLightningV31SpeechRequestBadRequestError? Type16 { get; set; } /// /// /// - public int? Type17 { get; set; } + public global::SmallestAI.SynthesizeLightningV31SpeechRequestUnauthorizedError? Type17 { get; set; } /// /// /// - public global::SmallestAI.SynthesizeLightningv2SpeechRequestBadRequestError? Type18 { get; set; } + public global::SmallestAI.SynthesizeLightningV31SpeechRequestInternalServerError? Type18 { get; set; } /// /// /// - public global::SmallestAI.SynthesizeLightningv2SpeechRequestUnauthorizedError? Type19 { get; set; } + public global::SmallestAI.StreamLightningV31SpeechRequestBadRequestError? Type19 { get; set; } /// /// /// - public global::SmallestAI.SynthesizeLightningv2SpeechRequestInternalServerError? Type20 { get; set; } + public global::SmallestAI.StreamLightningV31SpeechRequestUnauthorizedError? Type20 { get; set; } /// /// /// - public global::SmallestAI.StreamLightningv2SpeechRequestBadRequestError? Type21 { get; set; } + public global::SmallestAI.StreamLightningV31SpeechRequestInternalServerError? Type21 { get; set; } /// /// /// - public global::SmallestAI.StreamLightningv2SpeechRequestUnauthorizedError? Type22 { get; set; } + public global::SmallestAI.Lightningv2RequestLanguage? Type22 { get; set; } /// /// /// - public global::SmallestAI.StreamLightningv2SpeechRequestInternalServerError? Type23 { get; set; } + public global::SmallestAI.Lightningv2RequestOutputFormat? Type23 { get; set; } /// /// /// - public global::SmallestAI.WavesV1PulseGetTextPostParametersLanguage? Type24 { get; set; } + public global::SmallestAI.Lightningv2Request? Type24 { get; set; } /// /// /// - public global::SmallestAI.WavesV1PulseGetTextPostParametersEncoding? Type25 { get; set; } + public int? Type25 { get; set; } /// /// /// - public global::SmallestAI.WavesV1PulseGetTextPostParametersGenderDetection? Type26 { get; set; } + public global::SmallestAI.SynthesizeLightningv2SpeechRequestBadRequestError? Type26 { get; set; } /// /// /// - public global::SmallestAI.WavesV1PulseGetTextPostParametersEmotionDetection? Type27 { get; set; } + public global::SmallestAI.SynthesizeLightningv2SpeechRequestUnauthorizedError? Type27 { get; set; } /// /// /// - public global::SmallestAI.WavesV1PulseGetTextPostParametersFormat? Type28 { get; set; } + public global::SmallestAI.SynthesizeLightningv2SpeechRequestInternalServerError? Type28 { get; set; } /// /// /// - public global::SmallestAI.WavesV1PulseGetTextPostParametersPunctuate? Type29 { get; set; } + public global::SmallestAI.StreamLightningv2SpeechRequestBadRequestError? Type29 { get; set; } /// /// /// - public global::SmallestAI.WavesV1PulseGetTextPostParametersCapitalize? Type30 { get; set; } + public global::SmallestAI.StreamLightningv2SpeechRequestUnauthorizedError? Type30 { get; set; } /// /// /// - public global::SmallestAI.WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaWordsItems? Type31 { get; set; } + public global::SmallestAI.StreamLightningv2SpeechRequestInternalServerError? Type31 { get; set; } /// /// /// - public global::SmallestAI.WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaUtterancesItems? Type32 { get; set; } + public global::SmallestAI.WavesV1PulseGetTextPostParametersLanguage? Type32 { get; set; } /// /// /// - public global::SmallestAI.WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaGender? Type33 { get; set; } + public global::SmallestAI.WavesV1PulseGetTextPostParametersEncoding? Type33 { get; set; } /// /// /// - public global::SmallestAI.WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaEmotions? Type34 { get; set; } + public global::SmallestAI.WavesV1PulseGetTextPostParametersGenderDetection? Type34 { get; set; } /// /// /// - public global::SmallestAI.WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaMetadata? Type35 { get; set; } + public global::SmallestAI.WavesV1PulseGetTextPostParametersEmotionDetection? Type35 { get; set; } /// /// /// - public global::SmallestAI.SpeechToTextPulseSpeechToTextResponse200? Type36 { get; set; } + public global::SmallestAI.WavesV1PulseGetTextPostParametersFormat? Type36 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type37 { get; set; } + public global::SmallestAI.WavesV1PulseGetTextPostParametersPunctuate? Type37 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type38 { get; set; } + public global::SmallestAI.WavesV1PulseGetTextPostParametersCapitalize? Type38 { get; set; } /// /// /// - public global::SmallestAI.ErrorResponseStatus? Type39 { get; set; } + public global::SmallestAI.WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaWordsItems? Type39 { get; set; } /// /// /// - public global::SmallestAI.ErrorResponseError? Type40 { get; set; } + public global::SmallestAI.WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaUtterancesItems? Type40 { get; set; } /// /// /// - public global::SmallestAI.ErrorResponse? Type41 { get; set; } + public global::SmallestAI.WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaGender? Type41 { get; set; } /// /// /// - public global::SmallestAI.WavesV1ModelGetVoicesGetParametersModel? Type42 { get; set; } + public global::SmallestAI.WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaEmotions? Type42 { get; set; } /// /// /// - public global::SmallestAI.WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItemsTags? Type43 { get; set; } + public global::SmallestAI.WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaMetadata? Type43 { get; set; } /// /// /// - public global::SmallestAI.WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItems? Type44 { get; set; } + public global::SmallestAI.SpeechToTextPulseSpeechToTextResponse200? Type44 { get; set; } /// /// /// - public global::SmallestAI.VoicesGetWavesVoicesResponse200? Type45 { get; set; } + public global::System.Collections.Generic.IList? Type45 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type46 { get; set; } + public global::System.Collections.Generic.IList? Type46 { get; set; } /// /// /// - public global::SmallestAI.GetWavesVoicesRequestBadRequestError? Type47 { get; set; } + public global::SmallestAI.ErrorResponseStatus? Type47 { get; set; } /// /// /// - public global::SmallestAI.GetWavesVoicesRequestUnauthorizedError? Type48 { get; set; } + public global::SmallestAI.ErrorResponseError? Type48 { get; set; } /// /// /// - public global::SmallestAI.GetWavesVoicesRequestInternalServerError? Type49 { get; set; } + public global::SmallestAI.ErrorResponse? Type49 { get; set; } /// /// /// - public global::SmallestAI.WavesV1VoiceCloningPostRequestBodyContentMultipartFormDataSchemaModel? Type50 { get; set; } + public global::SmallestAI.WavesV1ModelGetVoicesGetParametersModel? Type50 { get; set; } /// /// /// - public global::SmallestAI.WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaDataStatus? Type51 { get; set; } + public global::SmallestAI.WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItemsTags? Type51 { get; set; } /// /// /// - public global::SmallestAI.WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaDataSamplesItems? Type52 { get; set; } + public global::SmallestAI.WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItems? Type52 { get; set; } /// /// /// - public global::SmallestAI.WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaData? Type53 { get; set; } + public global::SmallestAI.VoicesGetWavesVoicesResponse200? Type53 { get; set; } /// /// /// - public global::System.DateTime? Type54 { get; set; } + public global::System.Collections.Generic.IList? Type54 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type55 { get; set; } + public global::SmallestAI.GetWavesVoicesRequestBadRequestError? Type55 { get; set; } /// /// /// - public global::SmallestAI.VoiceCloningCreateVoiceCloneResponse200? Type56 { get; set; } + public global::SmallestAI.GetWavesVoicesRequestUnauthorizedError? Type56 { get; set; } /// /// /// - public global::SmallestAI.CreateVoiceCloneRequestBadRequestError? Type57 { get; set; } + public global::SmallestAI.GetWavesVoicesRequestInternalServerError? Type57 { get; set; } /// /// /// - public global::SmallestAI.CreateVoiceCloneRequestUnauthorizedError? Type58 { get; set; } + public global::SmallestAI.WavesV1VoiceCloningPostRequestBodyContentMultipartFormDataSchemaModel? Type58 { get; set; } /// /// /// - public global::SmallestAI.WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaErrorCode? Type59 { get; set; } + public global::SmallestAI.WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaDataStatus? Type59 { get; set; } /// /// /// - public global::SmallestAI.CreateVoiceCloneRequestInternalServerError? Type60 { get; set; } + public global::SmallestAI.WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaDataSamplesItems? Type60 { get; set; } /// /// /// - public global::SmallestAI.WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItemsStatus? Type61 { get; set; } + public global::SmallestAI.WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaData? Type61 { get; set; } /// /// /// - public global::SmallestAI.WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItemsCloningType? Type62 { get; set; } + public global::System.DateTime? Type62 { get; set; } /// /// /// - public global::SmallestAI.WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItems? Type63 { get; set; } + public global::System.Collections.Generic.IList? Type63 { get; set; } /// /// /// - public global::SmallestAI.VoiceCloningListVoiceClonesResponse200? Type64 { get; set; } + public global::SmallestAI.VoiceCloningCreateVoiceCloneResponse200? Type64 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type65 { get; set; } + public global::SmallestAI.CreateVoiceCloneRequestBadRequestError? Type65 { get; set; } /// /// /// - public global::SmallestAI.VoiceCloningDeleteVoiceCloneResponse200? Type66 { get; set; } + public global::SmallestAI.CreateVoiceCloneRequestUnauthorizedError? Type66 { get; set; } /// /// /// - public bool? Type67 { get; set; } + public global::SmallestAI.WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaErrorCode? Type67 { get; set; } /// /// /// - public global::SmallestAI.DeleteVoiceCloneRequestBadRequestError? Type68 { get; set; } + public global::SmallestAI.CreateVoiceCloneRequestInternalServerError? Type68 { get; set; } /// /// /// - public global::SmallestAI.DeleteVoiceCloneRequestUnauthorizedError? Type69 { get; set; } + public global::SmallestAI.WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItemsStatus? Type69 { get; set; } /// /// /// - public global::SmallestAI.DeleteVoiceCloneRequestInternalServerError? Type70 { get; set; } + public global::SmallestAI.WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItemsCloningType? Type70 { get; set; } /// /// /// - public global::SmallestAI.WavesV1LightningLargeAddVoicePostResponsesContentApplicationJsonSchemaData? Type71 { get; set; } + public global::SmallestAI.WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItems? Type71 { get; set; } /// /// /// - public global::SmallestAI.VoiceCloningAddVoiceToModelResponse200? Type72 { get; set; } + public global::SmallestAI.VoiceCloningListVoiceClonesResponse200? Type72 { get; set; } /// /// /// - public global::SmallestAI.AddVoiceToModelRequestBadRequestError? Type73 { get; set; } + public global::System.Collections.Generic.IList? Type73 { get; set; } /// /// /// - public global::SmallestAI.AddVoiceToModelRequestUnauthorizedError? Type74 { get; set; } + public global::SmallestAI.VoiceCloningDeleteVoiceCloneResponse200? Type74 { get; set; } /// /// /// - public global::SmallestAI.AddVoiceToModelRequestInternalServerError? Type75 { get; set; } + public bool? Type75 { get; set; } /// /// /// - public global::SmallestAI.WavesV1LightningLargeGetClonedVoicesGetResponsesContentApplicationJsonSchemaVoicesItems? Type76 { get; set; } + public global::SmallestAI.DeleteVoiceCloneRequestBadRequestError? Type76 { get; set; } /// /// /// - public global::SmallestAI.VoiceCloningGetClonedVoicesResponse200? Type77 { get; set; } + public global::SmallestAI.DeleteVoiceCloneRequestUnauthorizedError? Type77 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type78 { get; set; } + public global::SmallestAI.DeleteVoiceCloneRequestInternalServerError? Type78 { get; set; } /// /// /// - public global::SmallestAI.GetClonedVoicesRequestBadRequestError? Type79 { get; set; } + public global::SmallestAI.WavesV1LightningLargeAddVoicePostResponsesContentApplicationJsonSchemaData? Type79 { get; set; } /// /// /// - public global::SmallestAI.GetClonedVoicesRequestUnauthorizedError? Type80 { get; set; } + public global::SmallestAI.VoiceCloningAddVoiceToModelResponse200? Type80 { get; set; } /// /// /// - public global::SmallestAI.GetClonedVoicesRequestInternalServerError? Type81 { get; set; } + public global::SmallestAI.AddVoiceToModelRequestBadRequestError? Type81 { get; set; } /// /// /// - public global::SmallestAI.PronunciationItem? Type82 { get; set; } + public global::SmallestAI.AddVoiceToModelRequestUnauthorizedError? Type82 { get; set; } /// /// /// - public global::SmallestAI.PronunciationDict? Type83 { get; set; } + public global::SmallestAI.AddVoiceToModelRequestInternalServerError? Type83 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type84 { get; set; } + public global::SmallestAI.WavesV1LightningLargeGetClonedVoicesGetResponsesContentApplicationJsonSchemaVoicesItems? Type84 { get; set; } /// /// /// - public global::SmallestAI.CreatePronunciationDictRequest? Type85 { get; set; } + public global::SmallestAI.VoiceCloningGetClonedVoicesResponse200? Type85 { get; set; } /// /// /// - public global::SmallestAI.UpdatePronunciationDictRequest? Type86 { get; set; } + public global::System.Collections.Generic.IList? Type86 { get; set; } /// /// /// - public global::SmallestAI.UpdatePronunciationDictResponse? Type87 { get; set; } + public global::SmallestAI.GetClonedVoicesRequestBadRequestError? Type87 { get; set; } /// /// /// - public global::SmallestAI.DeletePronunciationDictRequest? Type88 { get; set; } + public global::SmallestAI.GetClonedVoicesRequestUnauthorizedError? Type88 { get; set; } /// /// /// - public global::SmallestAI.DeletePronunciationDictResponse? Type89 { get; set; } + public global::SmallestAI.GetClonedVoicesRequestInternalServerError? Type89 { get; set; } /// /// /// - public byte[]? Type90 { get; set; } + public global::SmallestAI.PronunciationItem? Type90 { get; set; } /// /// /// - public global::SmallestAI.CreateVoiceCloneRequest? Type91 { get; set; } + public global::SmallestAI.PronunciationDict? Type91 { get; set; } /// /// /// - public global::SmallestAI.DeleteVoiceCloneRequest? Type92 { get; set; } + public global::System.Collections.Generic.IList? Type92 { get; set; } /// /// /// - public global::SmallestAI.AddVoiceToModelRequest? Type93 { get; set; } + public global::SmallestAI.CreatePronunciationDictRequest? Type93 { get; set; } /// /// /// - public object? Type94 { get; set; } + public global::SmallestAI.UpdatePronunciationDictRequest? Type94 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type95 { get; set; } + public global::SmallestAI.UpdatePronunciationDictResponse? Type95 { get; set; } + /// + /// + /// + public global::SmallestAI.DeletePronunciationDictRequest? Type96 { get; set; } + /// + /// + /// + public global::SmallestAI.DeletePronunciationDictResponse? Type97 { get; set; } + /// + /// + /// + public byte[]? Type98 { get; set; } + /// + /// + /// + public global::SmallestAI.CreateVoiceCloneRequest? Type99 { get; set; } + /// + /// + /// + public global::SmallestAI.DeleteVoiceCloneRequest? Type100 { get; set; } + /// + /// + /// + public global::SmallestAI.AddVoiceToModelRequest? Type101 { get; set; } + /// + /// + /// + public object? Type102 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type103 { get; set; } /// /// diff --git a/src/libs/SmallestAI/Generated/SmallestAI.Models.LightningV31Request.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.Models.LightningV31Request.g.cs index 8a86735..f97b8a0 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.Models.LightningV31Request.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.Models.LightningV31Request.g.cs @@ -26,6 +26,21 @@ public sealed partial class LightningV31Request [global::System.Text.Json.Serialization.JsonRequired] public required string VoiceId { get; set; } = "daniel"; + /// + /// TTS model to route the request to.
+ /// - `lightning_v3.1` (default) — standard Lightning v3.1 pool.
+ /// - `lightning_v3.1_pro` — Lightning v3.1 Pro pool with a curated
+ /// voice catalog. See the
+ /// [Pro model card](/waves/model-cards/text-to-speech/lightning-v-3-1-pro).
+ /// New integrations should use the unified
+ /// `/waves/v1/tts` route instead of this endpoint, but the `model`
+ /// field is supported here for backwards-compatible Pro opt-in.
+ /// Default Value: lightning_v3.1 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::SmallestAI.JsonConverters.LightningV31RequestModelJsonConverter))] + public global::SmallestAI.LightningV31RequestModel? Model { get; set; } + /// /// The sample rate for the generated audio.
/// Default Value: 44100 @@ -102,6 +117,17 @@ public sealed partial class LightningV31Request /// The voice identifier to use for speech generation.
/// Default Value: daniel /// + /// + /// TTS model to route the request to.
+ /// - `lightning_v3.1` (default) — standard Lightning v3.1 pool.
+ /// - `lightning_v3.1_pro` — Lightning v3.1 Pro pool with a curated
+ /// voice catalog. See the
+ /// [Pro model card](/waves/model-cards/text-to-speech/lightning-v-3-1-pro).
+ /// New integrations should use the unified
+ /// `/waves/v1/tts` route instead of this endpoint, but the `model`
+ /// field is supported here for backwards-compatible Pro opt-in.
+ /// Default Value: lightning_v3.1 + /// /// /// The sample rate for the generated audio.
/// Default Value: 44100 @@ -143,6 +169,7 @@ public sealed partial class LightningV31Request public LightningV31Request( string text, string voiceId, + global::SmallestAI.LightningV31RequestModel? model, global::SmallestAI.LightningV31RequestSampleRate? sampleRate, double? speed, global::SmallestAI.LightningV31RequestLanguage? language, @@ -153,6 +180,7 @@ public LightningV31Request( { this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); this.VoiceId = voiceId ?? throw new global::System.ArgumentNullException(nameof(voiceId)); + this.Model = model; this.SampleRate = sampleRate; this.Speed = speed; this.Language = language; diff --git a/src/libs/SmallestAI/Generated/SmallestAI.Models.LightningV31RequestModel.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.Models.LightningV31RequestModel.g.cs new file mode 100644 index 0000000..9ba98e8 --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.Models.LightningV31RequestModel.g.cs @@ -0,0 +1,59 @@ + +#nullable enable + +namespace SmallestAI +{ + /// + /// TTS model to route the request to.
+ /// - `lightning_v3.1` (default) — standard Lightning v3.1 pool.
+ /// - `lightning_v3.1_pro` — Lightning v3.1 Pro pool with a curated
+ /// voice catalog. See the
+ /// [Pro model card](/waves/model-cards/text-to-speech/lightning-v-3-1-pro).
+ /// New integrations should use the unified
+ /// `/waves/v1/tts` route instead of this endpoint, but the `model`
+ /// field is supported here for backwards-compatible Pro opt-in.
+ /// Default Value: lightning_v3.1 + ///
+ public enum LightningV31RequestModel + { + /// + /// + /// + LightningV31, + /// + /// + /// + LightningV31Pro, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class LightningV31RequestModelExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this LightningV31RequestModel value) + { + return value switch + { + LightningV31RequestModel.LightningV31 => "lightning_v3.1", + LightningV31RequestModel.LightningV31Pro => "lightning_v3.1_pro", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static LightningV31RequestModel? ToEnum(string value) + { + return value switch + { + "lightning_v3.1" => LightningV31RequestModel.LightningV31, + "lightning_v3.1_pro" => LightningV31RequestModel.LightningV31Pro, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsError.Json.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsError.Json.g.cs new file mode 100644 index 0000000..7821c53 --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsError.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace SmallestAI +{ + public sealed partial class TtsError + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::SmallestAI.TtsError? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::SmallestAI.TtsError), + jsonSerializerContext) as global::SmallestAI.TtsError; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::SmallestAI.TtsError? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::SmallestAI.TtsError), + jsonSerializerContext).ConfigureAwait(false)) as global::SmallestAI.TtsError; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsError.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsError.g.cs new file mode 100644 index 0000000..7e2c385 --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsError.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace SmallestAI +{ + /// + /// + /// + public sealed partial class TtsError + { + /// + /// Error type. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("error")] + public string? Error { get; set; } + + /// + /// Error message. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + public string? Message { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Error type. + /// + /// + /// Error message. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public TtsError( + string? error, + string? message) + { + this.Error = error; + this.Message = message; + } + + /// + /// Initializes a new instance of the class. + /// + public TtsError() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequest.Json.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequest.Json.g.cs new file mode 100644 index 0000000..83b4ff4 --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequest.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace SmallestAI +{ + public sealed partial class TtsRequest + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::SmallestAI.TtsRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::SmallestAI.TtsRequest), + jsonSerializerContext) as global::SmallestAI.TtsRequest; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::SmallestAI.TtsRequest? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::SmallestAI.TtsRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::SmallestAI.TtsRequest; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequest.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequest.g.cs new file mode 100644 index 0000000..63c1f4c --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequest.g.cs @@ -0,0 +1,209 @@ + +#nullable enable + +namespace SmallestAI +{ + /// + /// + /// + public sealed partial class TtsRequest + { + /// + /// The text to convert to speech.
+ /// Default Value: Hello from Waves TTS. + ///
+ /// "Hello from Waves TTS." + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } = "Hello from Waves TTS."; + + /// + /// The voice identifier to use for speech generation. See the model card for available voices per model.
+ /// Default Value: magnus + ///
+ /// "magnus" + [global::System.Text.Json.Serialization.JsonPropertyName("voice_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string VoiceId { get; set; } = "magnus"; + + /// + /// TTS model to route the request to. Controls which model pool serves
+ /// this synthesis.
+ /// - `lightning_v3.1` (default) — standard Lightning v3.1.
+ /// - `lightning_v3.1_pro` — Lightning v3.1 Pro pool. Improved audio
+ /// quality and naturalness, with a curated voice catalog. See the
+ /// [Lightning v3.1 Pro model card](/waves/model-cards/text-to-speech/lightning-v-3-1-pro)
+ /// for supported voice IDs.
+ /// Same concurrency and latency profile across both. Other request
+ /// parameters behave identically.
+ /// Default Value: lightning_v3.1 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::SmallestAI.JsonConverters.TtsRequestModelJsonConverter))] + public global::SmallestAI.TtsRequestModel? Model { get; set; } + + /// + /// The sample rate for the generated audio.
+ /// Default Value: 44100 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("sample_rate")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::SmallestAI.JsonConverters.TtsRequestSampleRateJsonConverter))] + public global::SmallestAI.TtsRequestSampleRate? SampleRate { get; set; } + + /// + /// The speed of the generated speech.
+ /// Default Value: 1 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("speed")] + public double? Speed { get; set; } + + /// + /// Language code for synthesis. Influences pronunciation, number/date
+ /// normalization, and phoneme selection.
+ /// Each voice has its own `tags.language` set in the voice catalog —
+ /// query `GET /waves/v1/lightning-v3.1/get_voices`. Pass a language
+ /// the voice was trained on; passing other codes is accepted by the
+ /// API but produces English-pronounced output.
+ /// On `lightning_v3.1`, the full 12-language catalog applies. On
+ /// `lightning_v3.1_pro`, Indian voices speak `en` and `hi` (with
+ /// `auto` for code-switching); British and American voices speak
+ /// English only.
+ /// Default Value: en + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("language")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::SmallestAI.JsonConverters.TtsRequestLanguageJsonConverter))] + public global::SmallestAI.TtsRequestLanguage? Language { get; set; } + + /// + /// Format of the returned audio. `pcm` is the lowest-latency option
+ /// but requires a decoder to play; `mp3` and `wav` are directly
+ /// playable in browsers and most media players. The server default
+ /// is `pcm` when the field is omitted — the API playground uses
+ /// `mp3` so the generated audio is directly playable.
+ /// Default Value: pcm + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("output_format")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::SmallestAI.JsonConverters.TtsRequestOutputFormatJsonConverter))] + public global::SmallestAI.TtsRequestOutputFormat? OutputFormat { get; set; } + + /// + /// The IDs of the pronunciation dictionaries to use for speech generation. Available on both `lightning_v3.1` and `lightning_v3.1_pro`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("pronunciation_dicts")] + public global::System.Collections.Generic.IList? PronunciationDicts { get; set; } + + /// + /// Optional client-provided session identifier for correlation. Only alphanumeric characters, hyphens, underscores, and dots are allowed. Max 128 characters. Echoed back in response headers as `X-External-Session-Id`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("session_id")] + public string? SessionId { get; set; } + + /// + /// Optional client-provided request identifier for correlation. Only alphanumeric characters, hyphens, underscores, and dots are allowed. Max 128 characters. Echoed back in response headers as `X-External-Request-Id`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("request_id")] + public string? RequestId { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The text to convert to speech.
+ /// Default Value: Hello from Waves TTS. + /// + /// + /// The voice identifier to use for speech generation. See the model card for available voices per model.
+ /// Default Value: magnus + /// + /// + /// TTS model to route the request to. Controls which model pool serves
+ /// this synthesis.
+ /// - `lightning_v3.1` (default) — standard Lightning v3.1.
+ /// - `lightning_v3.1_pro` — Lightning v3.1 Pro pool. Improved audio
+ /// quality and naturalness, with a curated voice catalog. See the
+ /// [Lightning v3.1 Pro model card](/waves/model-cards/text-to-speech/lightning-v-3-1-pro)
+ /// for supported voice IDs.
+ /// Same concurrency and latency profile across both. Other request
+ /// parameters behave identically.
+ /// Default Value: lightning_v3.1 + /// + /// + /// The sample rate for the generated audio.
+ /// Default Value: 44100 + /// + /// + /// The speed of the generated speech.
+ /// Default Value: 1 + /// + /// + /// Language code for synthesis. Influences pronunciation, number/date
+ /// normalization, and phoneme selection.
+ /// Each voice has its own `tags.language` set in the voice catalog —
+ /// query `GET /waves/v1/lightning-v3.1/get_voices`. Pass a language
+ /// the voice was trained on; passing other codes is accepted by the
+ /// API but produces English-pronounced output.
+ /// On `lightning_v3.1`, the full 12-language catalog applies. On
+ /// `lightning_v3.1_pro`, Indian voices speak `en` and `hi` (with
+ /// `auto` for code-switching); British and American voices speak
+ /// English only.
+ /// Default Value: en + /// + /// + /// Format of the returned audio. `pcm` is the lowest-latency option
+ /// but requires a decoder to play; `mp3` and `wav` are directly
+ /// playable in browsers and most media players. The server default
+ /// is `pcm` when the field is omitted — the API playground uses
+ /// `mp3` so the generated audio is directly playable.
+ /// Default Value: pcm + /// + /// + /// The IDs of the pronunciation dictionaries to use for speech generation. Available on both `lightning_v3.1` and `lightning_v3.1_pro`. + /// + /// + /// Optional client-provided session identifier for correlation. Only alphanumeric characters, hyphens, underscores, and dots are allowed. Max 128 characters. Echoed back in response headers as `X-External-Session-Id`. + /// + /// + /// Optional client-provided request identifier for correlation. Only alphanumeric characters, hyphens, underscores, and dots are allowed. Max 128 characters. Echoed back in response headers as `X-External-Request-Id`. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public TtsRequest( + string text, + string voiceId, + global::SmallestAI.TtsRequestModel? model, + global::SmallestAI.TtsRequestSampleRate? sampleRate, + double? speed, + global::SmallestAI.TtsRequestLanguage? language, + global::SmallestAI.TtsRequestOutputFormat? outputFormat, + global::System.Collections.Generic.IList? pronunciationDicts, + string? sessionId, + string? requestId) + { + this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); + this.VoiceId = voiceId ?? throw new global::System.ArgumentNullException(nameof(voiceId)); + this.Model = model; + this.SampleRate = sampleRate; + this.Speed = speed; + this.Language = language; + this.OutputFormat = outputFormat; + this.PronunciationDicts = pronunciationDicts; + this.SessionId = sessionId; + this.RequestId = requestId; + } + + /// + /// Initializes a new instance of the class. + /// + public TtsRequest() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequestLanguage.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequestLanguage.g.cs new file mode 100644 index 0000000..f13a2bf --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequestLanguage.g.cs @@ -0,0 +1,127 @@ + +#nullable enable + +namespace SmallestAI +{ + /// + /// Language code for synthesis. Influences pronunciation, number/date
+ /// normalization, and phoneme selection.
+ /// Each voice has its own `tags.language` set in the voice catalog —
+ /// query `GET /waves/v1/lightning-v3.1/get_voices`. Pass a language
+ /// the voice was trained on; passing other codes is accepted by the
+ /// API but produces English-pronounced output.
+ /// On `lightning_v3.1`, the full 12-language catalog applies. On
+ /// `lightning_v3.1_pro`, Indian voices speak `en` and `hi` (with
+ /// `auto` for code-switching); British and American voices speak
+ /// English only.
+ /// Default Value: en + ///
+ public enum TtsRequestLanguage + { + /// + /// + /// + Auto, + /// + /// + /// + Bn, + /// + /// + /// + En, + /// + /// + /// + Es, + /// + /// + /// + Gu, + /// + /// + /// + Hi, + /// + /// + /// + Kn, + /// + /// + /// + Ml, + /// + /// + /// + Mr, + /// + /// + /// + Or, + /// + /// + /// + Pa, + /// + /// + /// + Ta, + /// + /// + /// + Te, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class TtsRequestLanguageExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this TtsRequestLanguage value) + { + return value switch + { + TtsRequestLanguage.Auto => "auto", + TtsRequestLanguage.Bn => "bn", + TtsRequestLanguage.En => "en", + TtsRequestLanguage.Es => "es", + TtsRequestLanguage.Gu => "gu", + TtsRequestLanguage.Hi => "hi", + TtsRequestLanguage.Kn => "kn", + TtsRequestLanguage.Ml => "ml", + TtsRequestLanguage.Mr => "mr", + TtsRequestLanguage.Or => "or", + TtsRequestLanguage.Pa => "pa", + TtsRequestLanguage.Ta => "ta", + TtsRequestLanguage.Te => "te", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static TtsRequestLanguage? ToEnum(string value) + { + return value switch + { + "auto" => TtsRequestLanguage.Auto, + "bn" => TtsRequestLanguage.Bn, + "en" => TtsRequestLanguage.En, + "es" => TtsRequestLanguage.Es, + "gu" => TtsRequestLanguage.Gu, + "hi" => TtsRequestLanguage.Hi, + "kn" => TtsRequestLanguage.Kn, + "ml" => TtsRequestLanguage.Ml, + "mr" => TtsRequestLanguage.Mr, + "or" => TtsRequestLanguage.Or, + "pa" => TtsRequestLanguage.Pa, + "ta" => TtsRequestLanguage.Ta, + "te" => TtsRequestLanguage.Te, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequestModel.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequestModel.g.cs new file mode 100644 index 0000000..c22412b --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequestModel.g.cs @@ -0,0 +1,60 @@ + +#nullable enable + +namespace SmallestAI +{ + /// + /// TTS model to route the request to. Controls which model pool serves
+ /// this synthesis.
+ /// - `lightning_v3.1` (default) — standard Lightning v3.1.
+ /// - `lightning_v3.1_pro` — Lightning v3.1 Pro pool. Improved audio
+ /// quality and naturalness, with a curated voice catalog. See the
+ /// [Lightning v3.1 Pro model card](/waves/model-cards/text-to-speech/lightning-v-3-1-pro)
+ /// for supported voice IDs.
+ /// Same concurrency and latency profile across both. Other request
+ /// parameters behave identically.
+ /// Default Value: lightning_v3.1 + ///
+ public enum TtsRequestModel + { + /// + /// + /// + LightningV31, + /// + /// + /// + LightningV31Pro, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class TtsRequestModelExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this TtsRequestModel value) + { + return value switch + { + TtsRequestModel.LightningV31 => "lightning_v3.1", + TtsRequestModel.LightningV31Pro => "lightning_v3.1_pro", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static TtsRequestModel? ToEnum(string value) + { + return value switch + { + "lightning_v3.1" => TtsRequestModel.LightningV31, + "lightning_v3.1_pro" => TtsRequestModel.LightningV31Pro, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequestOutputFormat.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequestOutputFormat.g.cs new file mode 100644 index 0000000..c69e508 --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequestOutputFormat.g.cs @@ -0,0 +1,74 @@ + +#nullable enable + +namespace SmallestAI +{ + /// + /// Format of the returned audio. `pcm` is the lowest-latency option
+ /// but requires a decoder to play; `mp3` and `wav` are directly
+ /// playable in browsers and most media players. The server default
+ /// is `pcm` when the field is omitted — the API playground uses
+ /// `mp3` so the generated audio is directly playable.
+ /// Default Value: pcm + ///
+ public enum TtsRequestOutputFormat + { + /// + /// + /// + Alaw, + /// + /// + /// + Mp3, + /// + /// + /// + Pcm, + /// + /// + /// + Ulaw, + /// + /// + /// + Wav, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class TtsRequestOutputFormatExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this TtsRequestOutputFormat value) + { + return value switch + { + TtsRequestOutputFormat.Alaw => "alaw", + TtsRequestOutputFormat.Mp3 => "mp3", + TtsRequestOutputFormat.Pcm => "pcm", + TtsRequestOutputFormat.Ulaw => "ulaw", + TtsRequestOutputFormat.Wav => "wav", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static TtsRequestOutputFormat? ToEnum(string value) + { + return value switch + { + "alaw" => TtsRequestOutputFormat.Alaw, + "mp3" => TtsRequestOutputFormat.Mp3, + "pcm" => TtsRequestOutputFormat.Pcm, + "ulaw" => TtsRequestOutputFormat.Ulaw, + "wav" => TtsRequestOutputFormat.Wav, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequestSampleRate.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequestSampleRate.g.cs new file mode 100644 index 0000000..06eafcd --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequestSampleRate.g.cs @@ -0,0 +1,63 @@ + +#nullable enable + +namespace SmallestAI +{ + /// + /// The sample rate for the generated audio. + /// + public enum TtsRequestSampleRate + { + /// + /// + /// + x16000, + /// + /// + /// + x24000, + /// + /// + /// + x44100, + /// + /// + /// + x8000, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class TtsRequestSampleRateExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this TtsRequestSampleRate value) + { + return value switch + { + TtsRequestSampleRate.x16000 => "16000", + TtsRequestSampleRate.x24000 => "24000", + TtsRequestSampleRate.x44100 => "44100", + TtsRequestSampleRate.x8000 => "8000", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static TtsRequestSampleRate? ToEnum(string value) + { + return value switch + { + "16000" => TtsRequestSampleRate.x16000, + "24000" => TtsRequestSampleRate.x24000, + "44100" => TtsRequestSampleRate.x44100, + "8000" => TtsRequestSampleRate.x8000, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/SmallestAI/Generated/SmallestAI.Models.WavesV1ModelGetVoicesGetParametersModel.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.Models.WavesV1ModelGetVoicesGetParametersModel.g.cs index fc98a4b..8c2e2cf 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.Models.WavesV1ModelGetVoicesGetParametersModel.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.Models.WavesV1ModelGetVoicesGetParametersModel.g.cs @@ -8,18 +8,6 @@ namespace SmallestAI ///
public enum WavesV1ModelGetVoicesGetParametersModel { - /// - /// - /// - Lightning, - /// - /// - /// - LightningLarge, - /// - /// - /// - LightningV2, /// /// /// @@ -38,9 +26,6 @@ public static string ToValueString(this WavesV1ModelGetVoicesGetParametersModel { return value switch { - WavesV1ModelGetVoicesGetParametersModel.Lightning => "lightning", - WavesV1ModelGetVoicesGetParametersModel.LightningLarge => "lightning-large", - WavesV1ModelGetVoicesGetParametersModel.LightningV2 => "lightning-v2", WavesV1ModelGetVoicesGetParametersModel.LightningV31 => "lightning-v3.1", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; @@ -52,9 +37,6 @@ public static string ToValueString(this WavesV1ModelGetVoicesGetParametersModel { return value switch { - "lightning" => WavesV1ModelGetVoicesGetParametersModel.Lightning, - "lightning-large" => WavesV1ModelGetVoicesGetParametersModel.LightningLarge, - "lightning-v2" => WavesV1ModelGetVoicesGetParametersModel.LightningV2, "lightning-v3.1" => WavesV1ModelGetVoicesGetParametersModel.LightningV31, _ => null, }; diff --git a/src/libs/SmallestAI/Generated/SmallestAI.Models.WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItems.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.Models.WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItems.g.cs index 7a15498..e4e0687 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.Models.WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItems.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.Models.WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItems.g.cs @@ -23,7 +23,7 @@ public sealed partial class WavesV1ModelGetVoicesGetResponsesContentApplicationJ public required string DisplayName { get; set; } /// - /// List of tags associated with the voice. + /// Tag metadata used to identify the voice's characteristics. Filter on these fields to find voices for a target language, accent, or use case. /// [global::System.Text.Json.Serialization.JsonPropertyName("tags")] public global::SmallestAI.WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItemsTags? Tags { get; set; } @@ -44,7 +44,7 @@ public sealed partial class WavesV1ModelGetVoicesGetResponsesContentApplicationJ /// Display name for the voice. /// /// - /// List of tags associated with the voice. + /// Tag metadata used to identify the voice's characteristics. Filter on these fields to find voices for a target language, accent, or use case. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/SmallestAI/Generated/SmallestAI.Models.WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItemsTags.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.Models.WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItemsTags.g.cs index bf0a8df..f3daabe 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.Models.WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItemsTags.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.Models.WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItemsTags.g.cs @@ -4,28 +4,46 @@ namespace SmallestAI { /// - /// List of tags associated with the voice. + /// Tag metadata used to identify the voice's characteristics. Filter on these fields to find voices for a target language, accent, or use case. /// public sealed partial class WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItemsTags { /// - /// Language of the voice. + /// Languages the voice was trained on (e.g., `["english"]`, `["english", "hindi"]`). /// [global::System.Text.Json.Serialization.JsonPropertyName("language")] public global::System.Collections.Generic.IList? Language { get; set; } /// - /// Accent of the voice. + /// Accent of the voice (e.g., `american`, `british`, `indian`). /// [global::System.Text.Json.Serialization.JsonPropertyName("accent")] public string? Accent { get; set; } /// - /// Gender of the voice. + /// Gender of the voice (`male` or `female`). /// [global::System.Text.Json.Serialization.JsonPropertyName("gender")] public string? Gender { get; set; } + /// + /// Age range of the voice (e.g., `young`, `middle-aged`, `senior`). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("age")] + public string? Age { get; set; } + + /// + /// Emotional ranges the voice supports. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("emotions")] + public global::System.Collections.Generic.IList? Emotions { get; set; } + + /// + /// Recommended use cases for the voice (e.g., `conversational`, `narration`). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("usecases")] + public global::System.Collections.Generic.IList? Usecases { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -36,13 +54,22 @@ public sealed partial class WavesV1ModelGetVoicesGetResponsesContentApplicationJ /// Initializes a new instance of the class. ///
/// - /// Language of the voice. + /// Languages the voice was trained on (e.g., `["english"]`, `["english", "hindi"]`). /// /// - /// Accent of the voice. + /// Accent of the voice (e.g., `american`, `british`, `indian`). /// /// - /// Gender of the voice. + /// Gender of the voice (`male` or `female`). + /// + /// + /// Age range of the voice (e.g., `young`, `middle-aged`, `senior`). + /// + /// + /// Emotional ranges the voice supports. + /// + /// + /// Recommended use cases for the voice (e.g., `conversational`, `narration`). /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] @@ -50,11 +77,17 @@ public sealed partial class WavesV1ModelGetVoicesGetResponsesContentApplicationJ public WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItemsTags( global::System.Collections.Generic.IList? language, string? accent, - string? gender) + string? gender, + string? age, + global::System.Collections.Generic.IList? emotions, + global::System.Collections.Generic.IList? usecases) { this.Language = language; this.Accent = accent; this.Gender = gender; + this.Age = age; + this.Emotions = emotions; + this.Usecases = usecases; } /// diff --git a/src/libs/SmallestAI/Generated/SmallestAI.Models.WavesV1TtsPostParametersAccept.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.Models.WavesV1TtsPostParametersAccept.g.cs new file mode 100644 index 0000000..f1c02c1 --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.Models.WavesV1TtsPostParametersAccept.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace SmallestAI +{ + /// + /// Default Value: audio/wav + /// + public enum WavesV1TtsPostParametersAccept + { + /// + /// + /// + AudioWav, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class WavesV1TtsPostParametersAcceptExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this WavesV1TtsPostParametersAccept value) + { + return value switch + { + WavesV1TtsPostParametersAccept.AudioWav => "audio/wav", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static WavesV1TtsPostParametersAccept? ToEnum(string value) + { + return value switch + { + "audio/wav" => WavesV1TtsPostParametersAccept.AudioWav, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/SmallestAI/Generated/SmallestAI.SubpackageTextToSpeechClient.StreamLightningV31Speech.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.SubpackageTextToSpeechClient.StreamLightningV31Speech.g.cs index b8eb8a1..c586ac6 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.SubpackageTextToSpeechClient.StreamLightningV31Speech.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.SubpackageTextToSpeechClient.StreamLightningV31Speech.g.cs @@ -42,7 +42,8 @@ partial void ProcessStreamLightningV31SpeechResponseContent( ref string content); /// - /// Lightning v3.1 SSE
+ /// Lightning v3.1 SSE (Endpoint Deprecated)
+ /// <Warning>**Endpoint scheduled for retirement.** This URL will stop accepting requests **60 days from the Lightning v3.1 Pro launch (2026-05-15)** — i.e. on **2026-07-14**. The Lightning v3.1 model itself is current and stays. Migrate to [`POST /waves/v1/tts/live`](/waves/api-reference/api-reference/text-to-speech/stream-speech-sse) and select Lightning v3.1 via the `model` body field (default).</Warning>
/// Synthesize speech and stream the audio back over Server-Sent Events. The body and parameters are identical to the sync `/get_speech` endpoint — the difference is the response is a stream of base64-encoded PCM chunks instead of one binary blob.
/// ## When to use this
/// - **Use this** when you want playback to start before synthesis is complete — long passages, latency-sensitive UI, live narration.
@@ -149,7 +150,8 @@ partial void ProcessStreamLightningV31SpeechResponseContent( return __response.Body; } /// - /// Lightning v3.1 SSE
+ /// Lightning v3.1 SSE (Endpoint Deprecated)
+ /// <Warning>**Endpoint scheduled for retirement.** This URL will stop accepting requests **60 days from the Lightning v3.1 Pro launch (2026-05-15)** — i.e. on **2026-07-14**. The Lightning v3.1 model itself is current and stays. Migrate to [`POST /waves/v1/tts/live`](/waves/api-reference/api-reference/text-to-speech/stream-speech-sse) and select Lightning v3.1 via the `model` body field (default).</Warning>
/// Synthesize speech and stream the audio back over Server-Sent Events. The body and parameters are identical to the sync `/get_speech` endpoint — the difference is the response is a stream of base64-encoded PCM chunks instead of one binary blob.
/// ## When to use this
/// - **Use this** when you want playback to start before synthesis is complete — long passages, latency-sensitive UI, live narration.
@@ -716,7 +718,8 @@ partial void ProcessStreamLightningV31SpeechResponseContent( } } /// - /// Lightning v3.1 SSE
+ /// Lightning v3.1 SSE (Endpoint Deprecated)
+ /// <Warning>**Endpoint scheduled for retirement.** This URL will stop accepting requests **60 days from the Lightning v3.1 Pro launch (2026-05-15)** — i.e. on **2026-07-14**. The Lightning v3.1 model itself is current and stays. Migrate to [`POST /waves/v1/tts/live`](/waves/api-reference/api-reference/text-to-speech/stream-speech-sse) and select Lightning v3.1 via the `model` body field (default).</Warning>
/// Synthesize speech and stream the audio back over Server-Sent Events. The body and parameters are identical to the sync `/get_speech` endpoint — the difference is the response is a stream of base64-encoded PCM chunks instead of one binary blob.
/// ## When to use this
/// - **Use this** when you want playback to start before synthesis is complete — long passages, latency-sensitive UI, live narration.
@@ -811,6 +814,17 @@ partial void ProcessStreamLightningV31SpeechResponseContent( /// The voice identifier to use for speech generation.
/// Default Value: daniel /// + /// + /// TTS model to route the request to.
+ /// - `lightning_v3.1` (default) — standard Lightning v3.1 pool.
+ /// - `lightning_v3.1_pro` — Lightning v3.1 Pro pool with a curated
+ /// voice catalog. See the
+ /// [Pro model card](/waves/model-cards/text-to-speech/lightning-v-3-1-pro).
+ /// New integrations should use the unified
+ /// `/waves/v1/tts` route instead of this endpoint, but the `model`
+ /// field is supported here for backwards-compatible Pro opt-in.
+ /// Default Value: lightning_v3.1 + /// /// /// The sample rate for the generated audio.
/// Default Value: 44100 @@ -852,6 +866,7 @@ partial void ProcessStreamLightningV31SpeechResponseContent( public async global::System.Threading.Tasks.Task StreamLightningV31SpeechAsync( string text = "Hey i am your a text to speech model", string voiceId = "daniel", + global::SmallestAI.LightningV31RequestModel? model = default, global::SmallestAI.LightningV31RequestSampleRate? sampleRate = default, double? speed = default, global::SmallestAI.LightningV31RequestLanguage? language = default, @@ -866,6 +881,7 @@ partial void ProcessStreamLightningV31SpeechResponseContent( { Text = text, VoiceId = voiceId, + Model = model, SampleRate = sampleRate, Speed = speed, Language = language, diff --git a/src/libs/SmallestAI/Generated/SmallestAI.SubpackageTextToSpeechClient.SynthesizeLightningV31Speech.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.SubpackageTextToSpeechClient.SynthesizeLightningV31Speech.g.cs index a043f81..8627016 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.SubpackageTextToSpeechClient.SynthesizeLightningV31Speech.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.SubpackageTextToSpeechClient.SynthesizeLightningV31Speech.g.cs @@ -44,7 +44,8 @@ partial void ProcessSynthesizeLightningV31SpeechResponseContent( ref byte[] content); /// - /// Lightning v3.1
+ /// Lightning v3.1 (Endpoint Deprecated)
+ /// <Warning>**Endpoint scheduled for retirement.** This URL will stop accepting requests **60 days from the Lightning v3.1 Pro launch (2026-05-15)** — i.e. on **2026-07-14**. The Lightning v3.1 model itself is current and stays. Migrate to [`POST /waves/v1/tts`](/waves/api-reference/api-reference/text-to-speech/synthesize-speech) and select Lightning v3.1 via the `model` body field (default).</Warning>
/// Synthesize speech from text in a single request. The simplest way to get audio when you have the full text up front — pass `text` + `voice_id`, get back binary audio.
/// ## When to use this
/// - **Use this** for short utterances you can render before playback (notifications, prompts, batch jobs, audio file generation).
@@ -141,7 +142,8 @@ partial void ProcessSynthesizeLightningV31SpeechResponseContent( return __response.Body; } /// - /// Lightning v3.1
+ /// Lightning v3.1 (Endpoint Deprecated)
+ /// <Warning>**Endpoint scheduled for retirement.** This URL will stop accepting requests **60 days from the Lightning v3.1 Pro launch (2026-05-15)** — i.e. on **2026-07-14**. The Lightning v3.1 model itself is current and stays. Migrate to [`POST /waves/v1/tts`](/waves/api-reference/api-reference/text-to-speech/synthesize-speech) and select Lightning v3.1 via the `model` body field (default).</Warning>
/// Synthesize speech from text in a single request. The simplest way to get audio when you have the full text up front — pass `text` + `voice_id`, get back binary audio.
/// ## When to use this
/// - **Use this** for short utterances you can render before playback (notifications, prompts, batch jobs, audio file generation).
@@ -659,7 +661,8 @@ partial void ProcessSynthesizeLightningV31SpeechResponseContent( } } /// - /// Lightning v3.1
+ /// Lightning v3.1 (Endpoint Deprecated)
+ /// <Warning>**Endpoint scheduled for retirement.** This URL will stop accepting requests **60 days from the Lightning v3.1 Pro launch (2026-05-15)** — i.e. on **2026-07-14**. The Lightning v3.1 model itself is current and stays. Migrate to [`POST /waves/v1/tts`](/waves/api-reference/api-reference/text-to-speech/synthesize-speech) and select Lightning v3.1 via the `model` body field (default).</Warning>
/// Synthesize speech from text in a single request. The simplest way to get audio when you have the full text up front — pass `text` + `voice_id`, get back binary audio.
/// ## When to use this
/// - **Use this** for short utterances you can render before playback (notifications, prompts, batch jobs, audio file generation).
@@ -1215,7 +1218,8 @@ partial void ProcessSynthesizeLightningV31SpeechResponseContent( } } /// - /// Lightning v3.1
+ /// Lightning v3.1 (Endpoint Deprecated)
+ /// <Warning>**Endpoint scheduled for retirement.** This URL will stop accepting requests **60 days from the Lightning v3.1 Pro launch (2026-05-15)** — i.e. on **2026-07-14**. The Lightning v3.1 model itself is current and stays. Migrate to [`POST /waves/v1/tts`](/waves/api-reference/api-reference/text-to-speech/synthesize-speech) and select Lightning v3.1 via the `model` body field (default).</Warning>
/// Synthesize speech from text in a single request. The simplest way to get audio when you have the full text up front — pass `text` + `voice_id`, get back binary audio.
/// ## When to use this
/// - **Use this** for short utterances you can render before playback (notifications, prompts, batch jobs, audio file generation).
@@ -1298,6 +1302,17 @@ partial void ProcessSynthesizeLightningV31SpeechResponseContent( /// The voice identifier to use for speech generation.
/// Default Value: daniel /// + /// + /// TTS model to route the request to.
+ /// - `lightning_v3.1` (default) — standard Lightning v3.1 pool.
+ /// - `lightning_v3.1_pro` — Lightning v3.1 Pro pool with a curated
+ /// voice catalog. See the
+ /// [Pro model card](/waves/model-cards/text-to-speech/lightning-v-3-1-pro).
+ /// New integrations should use the unified
+ /// `/waves/v1/tts` route instead of this endpoint, but the `model`
+ /// field is supported here for backwards-compatible Pro opt-in.
+ /// Default Value: lightning_v3.1 + /// /// /// The sample rate for the generated audio.
/// Default Value: 44100 @@ -1340,6 +1355,7 @@ partial void ProcessSynthesizeLightningV31SpeechResponseContent( global::SmallestAI.WavesV1LightningV31GetSpeechPostParametersAccept accept = global::SmallestAI.WavesV1LightningV31GetSpeechPostParametersAccept.AudioWav, string text = "Hey i am your a text to speech model", string voiceId = "daniel", + global::SmallestAI.LightningV31RequestModel? model = default, global::SmallestAI.LightningV31RequestSampleRate? sampleRate = default, double? speed = default, global::SmallestAI.LightningV31RequestLanguage? language = default, @@ -1354,6 +1370,7 @@ partial void ProcessSynthesizeLightningV31SpeechResponseContent( { Text = text, VoiceId = voiceId, + Model = model, SampleRate = sampleRate, Speed = speed, Language = language, diff --git a/src/libs/SmallestAI/Generated/SmallestAI.SubpackageTextToSpeechClient.SynthesizeSpeech.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.SubpackageTextToSpeechClient.SynthesizeSpeech.g.cs new file mode 100644 index 0000000..9ee5415 --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.SubpackageTextToSpeechClient.SynthesizeSpeech.g.cs @@ -0,0 +1,1302 @@ + +#nullable enable + +namespace SmallestAI +{ + public partial class SubpackageTextToSpeechClient + { + + + private static readonly global::SmallestAI.EndPointSecurityRequirement s_SynthesizeSpeechSecurityRequirement0 = + new global::SmallestAI.EndPointSecurityRequirement + { + Authorizations = new global::SmallestAI.EndPointAuthorizationRequirement[] + { new global::SmallestAI.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::SmallestAI.EndPointSecurityRequirement[] s_SynthesizeSpeechSecurityRequirements = + new global::SmallestAI.EndPointSecurityRequirement[] + { s_SynthesizeSpeechSecurityRequirement0, + }; + partial void PrepareSynthesizeSpeechArguments( + global::System.Net.Http.HttpClient httpClient, + ref global::SmallestAI.WavesV1TtsPostParametersAccept accept, + global::SmallestAI.TtsRequest request); + partial void PrepareSynthesizeSpeechRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::SmallestAI.WavesV1TtsPostParametersAccept accept, + global::SmallestAI.TtsRequest request); + partial void ProcessSynthesizeSpeechResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessSynthesizeSpeechResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref byte[] content); + + /// + /// Synthesize speech
+ /// Synthesize speech from text in a single request. Pass `text` + `voice_id`, get back binary audio.
+ /// Pick the model with the `model` body parameter: default `lightning_v3.1`, or `lightning_v3.1_pro` for the Pro pool. Other request parameters are identical across models.
+ /// ## When to use this
+ /// - **Use this** for short utterances you can render before playback (notifications, prompts, batch jobs, audio file generation).
+ /// - **Use `/waves/v1/tts/live`** when you want playback to start before the full audio is ready (long passages, latency-sensitive apps).
+ /// - **Use `/waves/v1/tts/live`** (WebSocket) when text arrives incrementally (LLM token streams, live captioning).
+ /// ## Key features
+ /// - 44 kHz natural, expressive synthesis
+ /// - Model selectable per request via `model` body parameter
+ /// - Cloned voice IDs (`voice_*`) work on `lightning_v3.1` — same param as catalog voices
+ /// - 12 documented languages on `lightning_v3.1`; English + Hindi on `lightning_v3.1_pro`
+ /// - Output formats: `pcm`, `mp3`, `wav`, `ulaw`, `alaw`
+ /// - Sample rates: 8 kHz – 44.1 kHz
+ /// - Speed: 0.5× – 2×
+ /// - Per-call pronunciation dictionaries via `pronunciation_dicts`
+ /// ## Examples
+ /// **cURL — Lightning v3.1 (default)**
+ /// ```bash
+ /// curl -X POST "https://api.smallest.ai/waves/v1/tts" \
+ /// -H "Authorization: Bearer $SMALLEST_API_KEY" \
+ /// -H "Content-Type: application/json" \
+ /// -H "Accept: audio/wav" \
+ /// -d '{
+ /// "text": "Hello from Waves TTS.",
+ /// "voice_id": "magnus",
+ /// "sample_rate": 24000,
+ /// "output_format": "wav"
+ /// }' --output speech.wav
+ /// ```
+ /// **cURL — Lightning v3.1 Pro**
+ /// ```bash
+ /// curl -X POST "https://api.smallest.ai/waves/v1/tts" \
+ /// -H "Authorization: Bearer $SMALLEST_API_KEY" \
+ /// -H "Content-Type: application/json" \
+ /// -H "Accept: audio/wav" \
+ /// -d '{
+ /// "text": "Hello from the Lightning v3.1 Pro pool.",
+ /// "voice_id": "meher",
+ /// "model": "lightning_v3.1_pro",
+ /// "sample_rate": 24000,
+ /// "output_format": "wav"
+ /// }' --output speech.wav
+ /// ```
+ /// ## Common gotchas
+ /// - **Set `Accept: audio/wav`.** Omitting it can return an empty or unplayable response.
+ /// - **Pair voice IDs with the right model.** Voice catalogs differ between `lightning_v3.1` and `lightning_v3.1_pro`. The API does not reject mismatched pairings, but using a Pro-only `voice_id` with `model=lightning_v3.1` (or omitting `model`) can return wrong or hallucinated audio. Pair Pro voices with `model=lightning_v3.1_pro`; standard catalog voices with `model=lightning_v3.1` (the default).
+ /// - **Cloned voices** (`voice_*` from `add_voice`) work with `lightning_v3.1` only; voice cloning is not available on `lightning_v3.1_pro`.
+ /// - **44.1 kHz output** is supported but most playback environments are happy with 24 kHz — drop the sample rate if bandwidth matters. + ///
+ /// + /// Default Value: audio/wav + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task SynthesizeSpeechAsync( + + global::SmallestAI.TtsRequest request, + global::SmallestAI.WavesV1TtsPostParametersAccept accept = global::SmallestAI.WavesV1TtsPostParametersAccept.AudioWav, + global::SmallestAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await SynthesizeSpeechAsResponseAsync( + + request: request, + accept: accept, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Synthesize speech
+ /// Synthesize speech from text in a single request. Pass `text` + `voice_id`, get back binary audio.
+ /// Pick the model with the `model` body parameter: default `lightning_v3.1`, or `lightning_v3.1_pro` for the Pro pool. Other request parameters are identical across models.
+ /// ## When to use this
+ /// - **Use this** for short utterances you can render before playback (notifications, prompts, batch jobs, audio file generation).
+ /// - **Use `/waves/v1/tts/live`** when you want playback to start before the full audio is ready (long passages, latency-sensitive apps).
+ /// - **Use `/waves/v1/tts/live`** (WebSocket) when text arrives incrementally (LLM token streams, live captioning).
+ /// ## Key features
+ /// - 44 kHz natural, expressive synthesis
+ /// - Model selectable per request via `model` body parameter
+ /// - Cloned voice IDs (`voice_*`) work on `lightning_v3.1` — same param as catalog voices
+ /// - 12 documented languages on `lightning_v3.1`; English + Hindi on `lightning_v3.1_pro`
+ /// - Output formats: `pcm`, `mp3`, `wav`, `ulaw`, `alaw`
+ /// - Sample rates: 8 kHz – 44.1 kHz
+ /// - Speed: 0.5× – 2×
+ /// - Per-call pronunciation dictionaries via `pronunciation_dicts`
+ /// ## Examples
+ /// **cURL — Lightning v3.1 (default)**
+ /// ```bash
+ /// curl -X POST "https://api.smallest.ai/waves/v1/tts" \
+ /// -H "Authorization: Bearer $SMALLEST_API_KEY" \
+ /// -H "Content-Type: application/json" \
+ /// -H "Accept: audio/wav" \
+ /// -d '{
+ /// "text": "Hello from Waves TTS.",
+ /// "voice_id": "magnus",
+ /// "sample_rate": 24000,
+ /// "output_format": "wav"
+ /// }' --output speech.wav
+ /// ```
+ /// **cURL — Lightning v3.1 Pro**
+ /// ```bash
+ /// curl -X POST "https://api.smallest.ai/waves/v1/tts" \
+ /// -H "Authorization: Bearer $SMALLEST_API_KEY" \
+ /// -H "Content-Type: application/json" \
+ /// -H "Accept: audio/wav" \
+ /// -d '{
+ /// "text": "Hello from the Lightning v3.1 Pro pool.",
+ /// "voice_id": "meher",
+ /// "model": "lightning_v3.1_pro",
+ /// "sample_rate": 24000,
+ /// "output_format": "wav"
+ /// }' --output speech.wav
+ /// ```
+ /// ## Common gotchas
+ /// - **Set `Accept: audio/wav`.** Omitting it can return an empty or unplayable response.
+ /// - **Pair voice IDs with the right model.** Voice catalogs differ between `lightning_v3.1` and `lightning_v3.1_pro`. The API does not reject mismatched pairings, but using a Pro-only `voice_id` with `model=lightning_v3.1` (or omitting `model`) can return wrong or hallucinated audio. Pair Pro voices with `model=lightning_v3.1_pro`; standard catalog voices with `model=lightning_v3.1` (the default).
+ /// - **Cloned voices** (`voice_*` from `add_voice`) work with `lightning_v3.1` only; voice cloning is not available on `lightning_v3.1_pro`.
+ /// - **44.1 kHz output** is supported but most playback environments are happy with 24 kHz — drop the sample rate if bandwidth matters. + ///
+ /// + /// Default Value: audio/wav + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task SynthesizeSpeechAsStreamAsync( + + global::SmallestAI.TtsRequest request, + global::SmallestAI.WavesV1TtsPostParametersAccept accept = global::SmallestAI.WavesV1TtsPostParametersAccept.AudioWav, + global::SmallestAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareSynthesizeSpeechArguments( + httpClient: HttpClient, + accept: ref accept, + request: request); + + + var __authorizations = global::SmallestAI.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_SynthesizeSpeechSecurityRequirements, + operationName: "SynthesizeSpeechAsync"); + + using var __timeoutCancellationTokenSource = global::SmallestAI.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::SmallestAI.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::SmallestAI.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::SmallestAI.PathBuilder( + path: "/waves/v1/tts", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::SmallestAI.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + __httpRequest.Headers.TryAddWithoutValidation("Accept", accept.ToValueString()); + + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::SmallestAI.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareSynthesizeSpeechRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + accept: accept!, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::SmallestAI.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::SmallestAI.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "SynthesizeSpeech", + methodName: "SynthesizeSpeechAsync", + pathTemplate: "\"/waves/v1/tts\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseHeadersRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::SmallestAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::SmallestAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::SmallestAI.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "SynthesizeSpeech", + methodName: "SynthesizeSpeechAsync", + pathTemplate: "\"/waves/v1/tts\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::SmallestAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::SmallestAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::SmallestAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::SmallestAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::SmallestAI.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "SynthesizeSpeech", + methodName: "SynthesizeSpeechAsync", + pathTemplate: "\"/waves/v1/tts\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::SmallestAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + try + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessSynthesizeSpeechResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::SmallestAI.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::SmallestAI.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "SynthesizeSpeech", + methodName: "SynthesizeSpeechAsync", + pathTemplate: "\"/waves/v1/tts\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::SmallestAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::SmallestAI.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "SynthesizeSpeech", + methodName: "SynthesizeSpeechAsync", + pathTemplate: "\"/waves/v1/tts\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Bad request. + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + global::SmallestAI.TtsError? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = global::SmallestAI.TtsError.FromJson(__content_400, JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = global::SmallestAI.TtsError.FromJson(__content_400, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + throw new global::SmallestAI.ApiException( + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + statusCode: __response.StatusCode) + { + ResponseBody = __content_400, + ResponseObject = __value_400, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Unauthorized. + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::SmallestAI.TtsError? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::SmallestAI.TtsError.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::SmallestAI.TtsError.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + throw new global::SmallestAI.ApiException( + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + statusCode: __response.StatusCode) + { + ResponseBody = __content_401, + ResponseObject = __value_401, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Server error occurred. + if ((int)__response.StatusCode == 500) + { + string? __content_500 = null; + global::System.Exception? __exception_500 = null; + global::SmallestAI.TtsError? __value_500 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_500 = global::SmallestAI.TtsError.FromJson(__content_500, JsonSerializerContext); + } + else + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_500 = global::SmallestAI.TtsError.FromJson(__content_500, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_500 = __ex; + } + + throw new global::SmallestAI.ApiException( + message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_500, + statusCode: __response.StatusCode) + { + ResponseBody = __content_500, + ResponseObject = __value_500, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + try + { + __response.EnsureSuccessStatusCode(); + + var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return new global::SmallestAI.ResponseStream(__response, __content); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::SmallestAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + } + catch + { + __response.Dispose(); + throw; + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Synthesize speech
+ /// Synthesize speech from text in a single request. Pass `text` + `voice_id`, get back binary audio.
+ /// Pick the model with the `model` body parameter: default `lightning_v3.1`, or `lightning_v3.1_pro` for the Pro pool. Other request parameters are identical across models.
+ /// ## When to use this
+ /// - **Use this** for short utterances you can render before playback (notifications, prompts, batch jobs, audio file generation).
+ /// - **Use `/waves/v1/tts/live`** when you want playback to start before the full audio is ready (long passages, latency-sensitive apps).
+ /// - **Use `/waves/v1/tts/live`** (WebSocket) when text arrives incrementally (LLM token streams, live captioning).
+ /// ## Key features
+ /// - 44 kHz natural, expressive synthesis
+ /// - Model selectable per request via `model` body parameter
+ /// - Cloned voice IDs (`voice_*`) work on `lightning_v3.1` — same param as catalog voices
+ /// - 12 documented languages on `lightning_v3.1`; English + Hindi on `lightning_v3.1_pro`
+ /// - Output formats: `pcm`, `mp3`, `wav`, `ulaw`, `alaw`
+ /// - Sample rates: 8 kHz – 44.1 kHz
+ /// - Speed: 0.5× – 2×
+ /// - Per-call pronunciation dictionaries via `pronunciation_dicts`
+ /// ## Examples
+ /// **cURL — Lightning v3.1 (default)**
+ /// ```bash
+ /// curl -X POST "https://api.smallest.ai/waves/v1/tts" \
+ /// -H "Authorization: Bearer $SMALLEST_API_KEY" \
+ /// -H "Content-Type: application/json" \
+ /// -H "Accept: audio/wav" \
+ /// -d '{
+ /// "text": "Hello from Waves TTS.",
+ /// "voice_id": "magnus",
+ /// "sample_rate": 24000,
+ /// "output_format": "wav"
+ /// }' --output speech.wav
+ /// ```
+ /// **cURL — Lightning v3.1 Pro**
+ /// ```bash
+ /// curl -X POST "https://api.smallest.ai/waves/v1/tts" \
+ /// -H "Authorization: Bearer $SMALLEST_API_KEY" \
+ /// -H "Content-Type: application/json" \
+ /// -H "Accept: audio/wav" \
+ /// -d '{
+ /// "text": "Hello from the Lightning v3.1 Pro pool.",
+ /// "voice_id": "meher",
+ /// "model": "lightning_v3.1_pro",
+ /// "sample_rate": 24000,
+ /// "output_format": "wav"
+ /// }' --output speech.wav
+ /// ```
+ /// ## Common gotchas
+ /// - **Set `Accept: audio/wav`.** Omitting it can return an empty or unplayable response.
+ /// - **Pair voice IDs with the right model.** Voice catalogs differ between `lightning_v3.1` and `lightning_v3.1_pro`. The API does not reject mismatched pairings, but using a Pro-only `voice_id` with `model=lightning_v3.1` (or omitting `model`) can return wrong or hallucinated audio. Pair Pro voices with `model=lightning_v3.1_pro`; standard catalog voices with `model=lightning_v3.1` (the default).
+ /// - **Cloned voices** (`voice_*` from `add_voice`) work with `lightning_v3.1` only; voice cloning is not available on `lightning_v3.1_pro`.
+ /// - **44.1 kHz output** is supported but most playback environments are happy with 24 kHz — drop the sample rate if bandwidth matters. + ///
+ /// + /// Default Value: audio/wav + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> SynthesizeSpeechAsResponseAsync( + + global::SmallestAI.TtsRequest request, + global::SmallestAI.WavesV1TtsPostParametersAccept accept = global::SmallestAI.WavesV1TtsPostParametersAccept.AudioWav, + global::SmallestAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareSynthesizeSpeechArguments( + httpClient: HttpClient, + accept: ref accept, + request: request); + + + var __authorizations = global::SmallestAI.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_SynthesizeSpeechSecurityRequirements, + operationName: "SynthesizeSpeechAsync"); + + using var __timeoutCancellationTokenSource = global::SmallestAI.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::SmallestAI.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::SmallestAI.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::SmallestAI.PathBuilder( + path: "/waves/v1/tts", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::SmallestAI.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + __httpRequest.Headers.TryAddWithoutValidation("Accept", accept.ToValueString()); + + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::SmallestAI.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareSynthesizeSpeechRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + accept: accept!, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::SmallestAI.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::SmallestAI.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "SynthesizeSpeech", + methodName: "SynthesizeSpeechAsync", + pathTemplate: "\"/waves/v1/tts\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::SmallestAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::SmallestAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::SmallestAI.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "SynthesizeSpeech", + methodName: "SynthesizeSpeechAsync", + pathTemplate: "\"/waves/v1/tts\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::SmallestAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::SmallestAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::SmallestAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::SmallestAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::SmallestAI.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "SynthesizeSpeech", + methodName: "SynthesizeSpeechAsync", + pathTemplate: "\"/waves/v1/tts\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::SmallestAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessSynthesizeSpeechResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::SmallestAI.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::SmallestAI.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "SynthesizeSpeech", + methodName: "SynthesizeSpeechAsync", + pathTemplate: "\"/waves/v1/tts\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::SmallestAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::SmallestAI.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "SynthesizeSpeech", + methodName: "SynthesizeSpeechAsync", + pathTemplate: "\"/waves/v1/tts\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Bad request. + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + global::SmallestAI.TtsError? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = global::SmallestAI.TtsError.FromJson(__content_400, JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = global::SmallestAI.TtsError.FromJson(__content_400, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + throw new global::SmallestAI.ApiException( + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + statusCode: __response.StatusCode) + { + ResponseBody = __content_400, + ResponseObject = __value_400, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Unauthorized. + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::SmallestAI.TtsError? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::SmallestAI.TtsError.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::SmallestAI.TtsError.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + throw new global::SmallestAI.ApiException( + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + statusCode: __response.StatusCode) + { + ResponseBody = __content_401, + ResponseObject = __value_401, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Server error occurred. + if ((int)__response.StatusCode == 500) + { + string? __content_500 = null; + global::System.Exception? __exception_500 = null; + global::SmallestAI.TtsError? __value_500 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_500 = global::SmallestAI.TtsError.FromJson(__content_500, JsonSerializerContext); + } + else + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_500 = global::SmallestAI.TtsError.FromJson(__content_500, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_500 = __ex; + } + + throw new global::SmallestAI.ApiException( + message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_500, + statusCode: __response.StatusCode) + { + ResponseBody = __content_500, + ResponseObject = __value_500, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsByteArrayAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessSynthesizeSpeechResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return new global::SmallestAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::SmallestAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); + } + catch (global::System.Exception __ex) + { + throw new global::SmallestAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsByteArrayAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return new global::SmallestAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::SmallestAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::SmallestAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Synthesize speech
+ /// Synthesize speech from text in a single request. Pass `text` + `voice_id`, get back binary audio.
+ /// Pick the model with the `model` body parameter: default `lightning_v3.1`, or `lightning_v3.1_pro` for the Pro pool. Other request parameters are identical across models.
+ /// ## When to use this
+ /// - **Use this** for short utterances you can render before playback (notifications, prompts, batch jobs, audio file generation).
+ /// - **Use `/waves/v1/tts/live`** when you want playback to start before the full audio is ready (long passages, latency-sensitive apps).
+ /// - **Use `/waves/v1/tts/live`** (WebSocket) when text arrives incrementally (LLM token streams, live captioning).
+ /// ## Key features
+ /// - 44 kHz natural, expressive synthesis
+ /// - Model selectable per request via `model` body parameter
+ /// - Cloned voice IDs (`voice_*`) work on `lightning_v3.1` — same param as catalog voices
+ /// - 12 documented languages on `lightning_v3.1`; English + Hindi on `lightning_v3.1_pro`
+ /// - Output formats: `pcm`, `mp3`, `wav`, `ulaw`, `alaw`
+ /// - Sample rates: 8 kHz – 44.1 kHz
+ /// - Speed: 0.5× – 2×
+ /// - Per-call pronunciation dictionaries via `pronunciation_dicts`
+ /// ## Examples
+ /// **cURL — Lightning v3.1 (default)**
+ /// ```bash
+ /// curl -X POST "https://api.smallest.ai/waves/v1/tts" \
+ /// -H "Authorization: Bearer $SMALLEST_API_KEY" \
+ /// -H "Content-Type: application/json" \
+ /// -H "Accept: audio/wav" \
+ /// -d '{
+ /// "text": "Hello from Waves TTS.",
+ /// "voice_id": "magnus",
+ /// "sample_rate": 24000,
+ /// "output_format": "wav"
+ /// }' --output speech.wav
+ /// ```
+ /// **cURL — Lightning v3.1 Pro**
+ /// ```bash
+ /// curl -X POST "https://api.smallest.ai/waves/v1/tts" \
+ /// -H "Authorization: Bearer $SMALLEST_API_KEY" \
+ /// -H "Content-Type: application/json" \
+ /// -H "Accept: audio/wav" \
+ /// -d '{
+ /// "text": "Hello from the Lightning v3.1 Pro pool.",
+ /// "voice_id": "meher",
+ /// "model": "lightning_v3.1_pro",
+ /// "sample_rate": 24000,
+ /// "output_format": "wav"
+ /// }' --output speech.wav
+ /// ```
+ /// ## Common gotchas
+ /// - **Set `Accept: audio/wav`.** Omitting it can return an empty or unplayable response.
+ /// - **Pair voice IDs with the right model.** Voice catalogs differ between `lightning_v3.1` and `lightning_v3.1_pro`. The API does not reject mismatched pairings, but using a Pro-only `voice_id` with `model=lightning_v3.1` (or omitting `model`) can return wrong or hallucinated audio. Pair Pro voices with `model=lightning_v3.1_pro`; standard catalog voices with `model=lightning_v3.1` (the default).
+ /// - **Cloned voices** (`voice_*` from `add_voice`) work with `lightning_v3.1` only; voice cloning is not available on `lightning_v3.1_pro`.
+ /// - **44.1 kHz output** is supported but most playback environments are happy with 24 kHz — drop the sample rate if bandwidth matters. + ///
+ /// + /// Default Value: audio/wav + /// + /// + /// The text to convert to speech.
+ /// Default Value: Hello from Waves TTS. + /// + /// + /// The voice identifier to use for speech generation. See the model card for available voices per model.
+ /// Default Value: magnus + /// + /// + /// TTS model to route the request to. Controls which model pool serves
+ /// this synthesis.
+ /// - `lightning_v3.1` (default) — standard Lightning v3.1.
+ /// - `lightning_v3.1_pro` — Lightning v3.1 Pro pool. Improved audio
+ /// quality and naturalness, with a curated voice catalog. See the
+ /// [Lightning v3.1 Pro model card](/waves/model-cards/text-to-speech/lightning-v-3-1-pro)
+ /// for supported voice IDs.
+ /// Same concurrency and latency profile across both. Other request
+ /// parameters behave identically.
+ /// Default Value: lightning_v3.1 + /// + /// + /// The sample rate for the generated audio.
+ /// Default Value: 44100 + /// + /// + /// The speed of the generated speech.
+ /// Default Value: 1 + /// + /// + /// Language code for synthesis. Influences pronunciation, number/date
+ /// normalization, and phoneme selection.
+ /// Each voice has its own `tags.language` set in the voice catalog —
+ /// query `GET /waves/v1/lightning-v3.1/get_voices`. Pass a language
+ /// the voice was trained on; passing other codes is accepted by the
+ /// API but produces English-pronounced output.
+ /// On `lightning_v3.1`, the full 12-language catalog applies. On
+ /// `lightning_v3.1_pro`, Indian voices speak `en` and `hi` (with
+ /// `auto` for code-switching); British and American voices speak
+ /// English only.
+ /// Default Value: en + /// + /// + /// Format of the returned audio. `pcm` is the lowest-latency option
+ /// but requires a decoder to play; `mp3` and `wav` are directly
+ /// playable in browsers and most media players. The server default
+ /// is `pcm` when the field is omitted — the API playground uses
+ /// `mp3` so the generated audio is directly playable.
+ /// Default Value: pcm + /// + /// + /// The IDs of the pronunciation dictionaries to use for speech generation. Available on both `lightning_v3.1` and `lightning_v3.1_pro`. + /// + /// + /// Optional client-provided session identifier for correlation. Only alphanumeric characters, hyphens, underscores, and dots are allowed. Max 128 characters. Echoed back in response headers as `X-External-Session-Id`. + /// + /// + /// Optional client-provided request identifier for correlation. Only alphanumeric characters, hyphens, underscores, and dots are allowed. Max 128 characters. Echoed back in response headers as `X-External-Request-Id`. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task SynthesizeSpeechAsync( + global::SmallestAI.WavesV1TtsPostParametersAccept accept = global::SmallestAI.WavesV1TtsPostParametersAccept.AudioWav, + string text = "Hello from Waves TTS.", + string voiceId = "magnus", + global::SmallestAI.TtsRequestModel? model = default, + global::SmallestAI.TtsRequestSampleRate? sampleRate = default, + double? speed = default, + global::SmallestAI.TtsRequestLanguage? language = default, + global::SmallestAI.TtsRequestOutputFormat? outputFormat = default, + global::System.Collections.Generic.IList? pronunciationDicts = default, + string? sessionId = default, + string? requestId = default, + global::SmallestAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::SmallestAI.TtsRequest + { + Text = text, + VoiceId = voiceId, + Model = model, + SampleRate = sampleRate, + Speed = speed, + Language = language, + OutputFormat = outputFormat, + PronunciationDicts = pronunciationDicts, + SessionId = sessionId, + RequestId = requestId, + }; + + return await SynthesizeSpeechAsync( + accept: accept, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/SmallestAI/Generated/SmallestAI.SubpackageTextToSpeechClient.SynthesizeSpeechSse.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.SubpackageTextToSpeechClient.SynthesizeSpeechSse.g.cs new file mode 100644 index 0000000..2510101 --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.SubpackageTextToSpeechClient.SynthesizeSpeechSse.g.cs @@ -0,0 +1,546 @@ + +#nullable enable + +namespace SmallestAI +{ + public partial class SubpackageTextToSpeechClient + { + + + private static readonly global::SmallestAI.EndPointSecurityRequirement s_SynthesizeSpeechSseSecurityRequirement0 = + new global::SmallestAI.EndPointSecurityRequirement + { + Authorizations = new global::SmallestAI.EndPointAuthorizationRequirement[] + { new global::SmallestAI.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::SmallestAI.EndPointSecurityRequirement[] s_SynthesizeSpeechSseSecurityRequirements = + new global::SmallestAI.EndPointSecurityRequirement[] + { s_SynthesizeSpeechSseSecurityRequirement0, + }; + partial void PrepareSynthesizeSpeechSseArguments( + global::System.Net.Http.HttpClient httpClient, + global::SmallestAI.TtsRequest request); + partial void PrepareSynthesizeSpeechSseRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::SmallestAI.TtsRequest request); + partial void ProcessSynthesizeSpeechSseResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// Stream speech (SSE)
+ /// 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](/waves/api-reference/api-reference/text-to-speech/live-tts-web-socket).
+ /// </Note>
+ /// ## When to use this
+ /// - **Use this** when you want playback to start before synthesis is complete — long passages, latency-sensitive UI, live narration.
+ /// - **Use sync `/waves/v1/tts`** when total latency doesn't matter and you'd rather get one buffer.
+ /// - **Use `/waves/v1/tts/live`** (WebSocket) when the *text* arrives incrementally (LLM token stream). SSE assumes you have the full text up front.
+ /// ## How it works
+ /// 1. POST your text + voice settings — same payload as `/waves/v1/tts`, plus optional `model`.
+ /// 2. The response is `Content-Type: text/event-stream`. Each chunk frame is `event: audio\n` followed by `data: {"audio": "<base64-pcm>"}\n\n`.
+ /// 3. 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.).
+ /// 4. A final `data: {"done": true}\n\n` frame marks end of stream.
+ /// ## Examples
+ /// **cURL**
+ /// ```bash
+ /// curl -N -X POST "https://api.smallest.ai/waves/v1/tts/live" \
+ /// -H "Authorization: Bearer $SMALLEST_API_KEY" \
+ /// -H "Content-Type: application/json" \
+ /// -d '{
+ /// "text": "Streaming this paragraph chunk by chunk so playback can start sooner.",
+ /// "voice_id": "magnus",
+ /// "sample_rate": 24000,
+ /// "output_format": "pcm"
+ /// }'
+ /// ```
+ /// ## Common gotchas
+ /// - **Use a streaming-friendly client.** `curl -N`, Python `iter_lines`, or a `fetch` `ReadableStream` reader. Buffering clients will hide the latency win.
+ /// - **Audio is base64 inside the event payload**, not the raw event bytes. Decode the `data.audio` field per event.
+ /// - **`output_format=pcm`** gives the lowest overhead for streaming playback. `wav`/`mp3` work but add per-chunk framing bytes. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Collections.Generic.IAsyncEnumerable SynthesizeSpeechSseAsync( + + global::SmallestAI.TtsRequest request, + global::SmallestAI.AutoSDKRequestOptions? requestOptions = default, + [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareSynthesizeSpeechSseArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::SmallestAI.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_SynthesizeSpeechSseSecurityRequirements, + operationName: "SynthesizeSpeechSseAsync"); + + using var __timeoutCancellationTokenSource = global::SmallestAI.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::SmallestAI.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::SmallestAI.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::SmallestAI.PathBuilder( + path: "/waves/v1/tts/live", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::SmallestAI.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::SmallestAI.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareSynthesizeSpeechSseRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::SmallestAI.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::SmallestAI.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "SynthesizeSpeechSse", + methodName: "SynthesizeSpeechSseAsync", + pathTemplate: "\"/waves/v1/tts/live\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseHeadersRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::SmallestAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::SmallestAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::SmallestAI.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "SynthesizeSpeechSse", + methodName: "SynthesizeSpeechSseAsync", + pathTemplate: "\"/waves/v1/tts/live\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::SmallestAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::SmallestAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::SmallestAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::SmallestAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::SmallestAI.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "SynthesizeSpeechSse", + methodName: "SynthesizeSpeechSseAsync", + pathTemplate: "\"/waves/v1/tts/live\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::SmallestAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessSynthesizeSpeechSseResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::SmallestAI.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::SmallestAI.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "SynthesizeSpeechSse", + methodName: "SynthesizeSpeechSseAsync", + pathTemplate: "\"/waves/v1/tts/live\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::SmallestAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::SmallestAI.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "SynthesizeSpeechSse", + methodName: "SynthesizeSpeechSseAsync", + pathTemplate: "\"/waves/v1/tts/live\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::SmallestAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __stream = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + await foreach (var __sseEvent in global::System.Net.ServerSentEvents.SseParser + .Create(__stream).EnumerateAsync(__effectiveCancellationToken)) + { + var __content = __sseEvent.Data; + if (__content == "[DONE]") + { + yield break; + } + + var __streamedResponse = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(string), JsonSerializerContext) ?? + throw new global::SmallestAI.ApiException( + message: $"Response deserialization failed for \"{__content}\" ", + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + + yield return __streamedResponse; + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Stream speech (SSE)
+ /// 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](/waves/api-reference/api-reference/text-to-speech/live-tts-web-socket).
+ /// </Note>
+ /// ## When to use this
+ /// - **Use this** when you want playback to start before synthesis is complete — long passages, latency-sensitive UI, live narration.
+ /// - **Use sync `/waves/v1/tts`** when total latency doesn't matter and you'd rather get one buffer.
+ /// - **Use `/waves/v1/tts/live`** (WebSocket) when the *text* arrives incrementally (LLM token stream). SSE assumes you have the full text up front.
+ /// ## How it works
+ /// 1. POST your text + voice settings — same payload as `/waves/v1/tts`, plus optional `model`.
+ /// 2. The response is `Content-Type: text/event-stream`. Each chunk frame is `event: audio\n` followed by `data: {"audio": "<base64-pcm>"}\n\n`.
+ /// 3. 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.).
+ /// 4. A final `data: {"done": true}\n\n` frame marks end of stream.
+ /// ## Examples
+ /// **cURL**
+ /// ```bash
+ /// curl -N -X POST "https://api.smallest.ai/waves/v1/tts/live" \
+ /// -H "Authorization: Bearer $SMALLEST_API_KEY" \
+ /// -H "Content-Type: application/json" \
+ /// -d '{
+ /// "text": "Streaming this paragraph chunk by chunk so playback can start sooner.",
+ /// "voice_id": "magnus",
+ /// "sample_rate": 24000,
+ /// "output_format": "pcm"
+ /// }'
+ /// ```
+ /// ## Common gotchas
+ /// - **Use a streaming-friendly client.** `curl -N`, Python `iter_lines`, or a `fetch` `ReadableStream` reader. Buffering clients will hide the latency win.
+ /// - **Audio is base64 inside the event payload**, not the raw event bytes. Decode the `data.audio` field per event.
+ /// - **`output_format=pcm`** gives the lowest overhead for streaming playback. `wav`/`mp3` work but add per-chunk framing bytes. + ///
+ /// + /// The text to convert to speech.
+ /// Default Value: Hello from Waves TTS. + /// + /// + /// The voice identifier to use for speech generation. See the model card for available voices per model.
+ /// Default Value: magnus + /// + /// + /// TTS model to route the request to. Controls which model pool serves
+ /// this synthesis.
+ /// - `lightning_v3.1` (default) — standard Lightning v3.1.
+ /// - `lightning_v3.1_pro` — Lightning v3.1 Pro pool. Improved audio
+ /// quality and naturalness, with a curated voice catalog. See the
+ /// [Lightning v3.1 Pro model card](/waves/model-cards/text-to-speech/lightning-v-3-1-pro)
+ /// for supported voice IDs.
+ /// Same concurrency and latency profile across both. Other request
+ /// parameters behave identically.
+ /// Default Value: lightning_v3.1 + /// + /// + /// The sample rate for the generated audio.
+ /// Default Value: 44100 + /// + /// + /// The speed of the generated speech.
+ /// Default Value: 1 + /// + /// + /// Language code for synthesis. Influences pronunciation, number/date
+ /// normalization, and phoneme selection.
+ /// Each voice has its own `tags.language` set in the voice catalog —
+ /// query `GET /waves/v1/lightning-v3.1/get_voices`. Pass a language
+ /// the voice was trained on; passing other codes is accepted by the
+ /// API but produces English-pronounced output.
+ /// On `lightning_v3.1`, the full 12-language catalog applies. On
+ /// `lightning_v3.1_pro`, Indian voices speak `en` and `hi` (with
+ /// `auto` for code-switching); British and American voices speak
+ /// English only.
+ /// Default Value: en + /// + /// + /// Format of the returned audio. `pcm` is the lowest-latency option
+ /// but requires a decoder to play; `mp3` and `wav` are directly
+ /// playable in browsers and most media players. The server default
+ /// is `pcm` when the field is omitted — the API playground uses
+ /// `mp3` so the generated audio is directly playable.
+ /// Default Value: pcm + /// + /// + /// The IDs of the pronunciation dictionaries to use for speech generation. Available on both `lightning_v3.1` and `lightning_v3.1_pro`. + /// + /// + /// Optional client-provided session identifier for correlation. Only alphanumeric characters, hyphens, underscores, and dots are allowed. Max 128 characters. Echoed back in response headers as `X-External-Session-Id`. + /// + /// + /// Optional client-provided request identifier for correlation. Only alphanumeric characters, hyphens, underscores, and dots are allowed. Max 128 characters. Echoed back in response headers as `X-External-Request-Id`. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Collections.Generic.IAsyncEnumerable SynthesizeSpeechSseAsync( + string text = "Hello from Waves TTS.", + string voiceId = "magnus", + global::SmallestAI.TtsRequestModel? model = default, + global::SmallestAI.TtsRequestSampleRate? sampleRate = default, + double? speed = default, + global::SmallestAI.TtsRequestLanguage? language = default, + global::SmallestAI.TtsRequestOutputFormat? outputFormat = default, + global::System.Collections.Generic.IList? pronunciationDicts = default, + string? sessionId = default, + string? requestId = default, + global::SmallestAI.AutoSDKRequestOptions? requestOptions = default, + [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::SmallestAI.TtsRequest + { + Text = text, + VoiceId = voiceId, + Model = model, + SampleRate = sampleRate, + Speed = speed, + Language = language, + OutputFormat = outputFormat, + PronunciationDicts = pronunciationDicts, + SessionId = sessionId, + RequestId = requestId, + }; + + var __enumerable = SynthesizeSpeechSseAsync( + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + + await foreach (var __response in __enumerable) + { + yield return __response; + } + } + } +} \ No newline at end of file diff --git a/src/libs/SmallestAI/Generated/SmallestAI.SubpackageVoicesClient.GetWavesVoices.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.SubpackageVoicesClient.GetWavesVoices.g.cs index da8ac86..b57bcbd 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.SubpackageVoicesClient.GetWavesVoices.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.SubpackageVoicesClient.GetWavesVoices.g.cs @@ -43,7 +43,7 @@ partial void ProcessGetWavesVoicesResponseContent( /// /// Get Voices
- /// Get voices supported for a given model using the new Waves API. + /// List voices available for Lightning v3.1. The response is the union of the standard and Pro voice catalogs — the API does not return a per-voice "is Pro" flag, so consult the [Lightning v3.1 Pro](/waves/model-cards/text-to-speech/lightning-v-3-1-pro) and [Lightning v3.1](/waves/model-cards/text-to-speech/lightning-v-3-1) model cards for the canonical per-pool voice lists. Use the `voice_id` from this response together with `"model": "lightning_v3.1"` (default) or `"model": "lightning_v3.1_pro"` on the unified `/waves/v1/tts` route to pick the pool. ///
/// /// Default Value: lightning-v3.1 @@ -66,7 +66,7 @@ partial void ProcessGetWavesVoicesResponseContent( } /// /// Get Voices
- /// Get voices supported for a given model using the new Waves API. + /// List voices available for Lightning v3.1. The response is the union of the standard and Pro voice catalogs — the API does not return a per-voice "is Pro" flag, so consult the [Lightning v3.1 Pro](/waves/model-cards/text-to-speech/lightning-v-3-1-pro) and [Lightning v3.1](/waves/model-cards/text-to-speech/lightning-v-3-1) model cards for the canonical per-pool voice lists. Use the `voice_id` from this response together with `"model": "lightning_v3.1"` (default) or `"model": "lightning_v3.1_pro"` on the unified `/waves/v1/tts` route to pick the pool. ///
/// /// Default Value: lightning-v3.1 diff --git a/src/libs/SmallestAI/openapi.yaml b/src/libs/SmallestAI/openapi.yaml index ddcb610..8527e36 100644 --- a/src/libs/SmallestAI/openapi.yaml +++ b/src/libs/SmallestAI/openapi.yaml @@ -1 +1 @@ -{"openapi":"3.1.0","info":{"title":"API Reference","version":"1.0.0"},"paths":{"/waves/v1/lightning-v3.1/get_speech":{"post":{"operationId":"synthesize-lightning-v-31-speech","summary":"Lightning v3.1","description":"Synthesize speech from text in a single request. The simplest way to get audio when you have the full text up front — pass `text` + `voice_id`, get back binary audio.\n\n## When to use this\n\n- **Use this** for short utterances you can render before playback (notifications, prompts, batch jobs, audio file generation).\n- **Use the SSE streaming endpoint** when you want playback to start before the full audio is ready (long passages, latency-sensitive apps).\n- **Use the WebSocket endpoint** when text arrives incrementally (LLM token streams, live captioning).\n\n## Key features\n\n- 44 kHz natural, expressive synthesis\n- Cloned voice IDs (`voice_*`) work — same param as catalog voices\n- 12 documented languages — see the model card for the full list\n- Output formats: `pcm`, `mp3`, `wav`, `ulaw`, `alaw`\n- Sample rates: 8 kHz – 44.1 kHz\n- Speed: 0.5× – 2×\n- Per-call pronunciation dictionaries via `pronunciation_dicts`\n\n## Examples\n\n**cURL**\n```bash\ncurl -X POST \"https://api.smallest.ai/waves/v1/lightning-v3.1/get_speech\" \\\n -H \"Authorization: Bearer $SMALLEST_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -H \"Accept: audio/wav\" \\\n -d '{\n \"text\": \"Hello from Lightning v3.1.\",\n \"voice_id\": \"magnus\",\n \"sample_rate\": 24000,\n \"output_format\": \"wav\"\n }' --output speech.wav\n```\n\n**Python** (`pip install smallestai>=4.4.0`)\n```python\nfrom smallestai import SmallestAI\n\nclient = SmallestAI(token=\"YOUR_API_KEY\")\n\nwith open(\"speech.wav\", \"wb\") as f:\n for chunk in client.waves.synthesize_lightning_v3_1(\n text=\"Hello from Lightning v3.1.\",\n voice_id=\"magnus\",\n sample_rate=24000,\n output_format=\"wav\",\n # Optional: cloned voice support\n # voice_id=\"voice_FlPKRWI7DX\",\n # Optional: pin pronunciations for specific words\n # pronunciation_dicts=[\"\"],\n ):\n f.write(chunk)\n```\n\n**JavaScript / TypeScript** (using `fetch`)\n```typescript\nconst res = await fetch(\"https://api.smallest.ai/waves/v1/lightning-v3.1/get_speech\", {\n method: \"POST\",\n headers: {\n Authorization: `Bearer ${process.env.SMALLEST_API_KEY}`,\n \"Content-Type\": \"application/json\",\n Accept: \"audio/wav\",\n },\n body: JSON.stringify({\n text: \"Hello from Lightning v3.1.\",\n voice_id: \"magnus\",\n sample_rate: 24000,\n output_format: \"wav\",\n }),\n});\nconst audio = Buffer.from(await res.arrayBuffer());\nrequire(\"node:fs\").writeFileSync(\"speech.wav\", audio);\n```\n\n## Common gotchas\n\n- **Set `Accept: audio/wav`.** Omitting it can return an empty or unplayable response.\n- **Cloned voices** (`voice_*` from `add_voice`) work on this endpoint and support `pronunciation_dicts`.\n- **`pronunciation_dicts` validates IDs at request time.** Passing an unknown ID returns `Invalid input data` — create the dict first via the pronunciation-dicts endpoint and save the returned `id`.\n- **Pronunciation matching is case-sensitive.** Add both `Synopsis` and `synopsis` if your text uses both casings.\n- **44.1 kHz output** is supported but most playback environments are happy with 24 kHz — drop the sample rate if bandwidth matters.\n- **JavaScript / TypeScript**: the official `smallestai` npm package predates Lightning v3.1, so call this endpoint with `fetch` or `axios` as shown above.\n","tags":["subpackage_textToSpeech"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","description":"Must be `audio/wav` to receive binary audio. Required for proper playback.","required":true,"schema":{"$ref":"#/components/schemas/WavesV1LightningV31GetSpeechPostParametersAccept"}}],"responses":{"200":{"description":"Synthesized speech retrieved successfully.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SynthesizeLightningV31SpeechRequestBadRequestError"}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SynthesizeLightningV31SpeechRequestUnauthorizedError"}}}},"500":{"description":"Server error occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SynthesizeLightningV31SpeechRequestInternalServerError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LightningV31Request"}}}}}},"/waves/v1/lightning-v3.1/stream":{"post":{"operationId":"stream-lightning-v-31-speech","summary":"Lightning v3.1 SSE","description":"Synthesize speech and stream the audio back over Server-Sent Events. The body and parameters are identical to the sync `/get_speech` endpoint — the difference is the response is a stream of base64-encoded PCM chunks instead of one binary blob.\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 `/get_speech`** when total latency doesn't matter and you'd rather get one buffer.\n- **Use the WebSocket endpoint** 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 `/get_speech`.\n2. The response is `Content-Type: text/event-stream`. Each chunk frame is `event: audio\\n` followed by `data: {\"audio\": \"\"}\\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: {\"done\": true}\\n\\n` frame marks end of stream.\n\n## Examples\n\n**cURL**\n```bash\ncurl -N -X POST \"https://api.smallest.ai/waves/v1/lightning-v3.1/stream\" \\\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**Python** (`pip install smallestai>=4.4.0`)\n```python\nimport base64\nfrom smallestai import SmallestAI\n\nclient = SmallestAI(token=\"YOUR_API_KEY\")\n\nwith open(\"stream.pcm\", \"wb\") as f:\n for chunk in client.waves.synthesize_sse_lightning_v3_1(\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 # Each chunk is `{\"audio\": \"\"}`.\n # Decode and pipe to your audio pipeline.\n if chunk.get(\"audio\"):\n f.write(base64.b64decode(chunk[\"audio\"]))\n```\n\n**JavaScript / TypeScript** (using `fetch` + a reader)\n```typescript\nconst res = await fetch(\"https://api.smallest.ai/waves/v1/lightning-v3.1/stream\", {\n method: \"POST\",\n headers: {\n Authorization: `Bearer ${process.env.SMALLEST_API_KEY}`,\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\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\nconst reader = res.body!.getReader();\nconst decoder = new TextDecoder();\nlet buf = \"\";\nlet finished = false;\nwhile (!finished) {\n const { value, done } = await reader.read();\n if (done) break;\n buf += decoder.decode(value);\n const events = buf.split(\"\\n\\n\");\n buf = events.pop() ?? \"\";\n for (const ev of events) {\n // SSE frames are \"event: audio\\ndata: {json}\" or just \"data: {json}\".\n // We only care about the data line — pull it out and parse.\n const dataLine = ev.split(\"\\n\").find((l) => l.startsWith(\"data:\"));\n if (!dataLine) continue;\n const payload = JSON.parse(dataLine.slice(5).trim());\n if (payload.done) { finished = true; break; }\n if (payload.audio) {\n const pcm = Buffer.from(payload.audio, \"base64\");\n // … hand pcm to your audio pipeline\n }\n }\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- **First-chunk latency** depends on model warm-up + network distance. Use `output_format=pcm` and a streaming-friendly client to minimize what you can control.\n- **JavaScript / TypeScript**: the official `smallestai` npm package predates Lightning v3.1, so call this endpoint with `fetch` as shown above.\n","tags":["subpackage_textToSpeech"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Synthesized speech retrieved successfully.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamLightningV31SpeechRequestBadRequestError"}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamLightningV31SpeechRequestUnauthorizedError"}}}},"500":{"description":"Server error occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamLightningV31SpeechRequestInternalServerError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LightningV31Request"}}}}}},"/waves/v1/lightning-v2/get_speech":{"post":{"operationId":"synthesize-lightningv-2-speech","summary":"Lightning v2","description":"Get speech for given text using the Waves API","tags":["subpackage_textToSpeech"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Synthesized speech retrieved successfully.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SynthesizeLightningv2SpeechRequestBadRequestError"}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SynthesizeLightningv2SpeechRequestUnauthorizedError"}}}},"500":{"description":"Server error occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SynthesizeLightningv2SpeechRequestInternalServerError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lightningv2Request"}}}}}},"/waves/v1/lightning-v2/stream":{"post":{"operationId":"stream-lightningv-2-speech","summary":"Lightning v2 SSE","description":"The Lightning v2 SSE API provides real-time text-to-speech streaming capabilities with high-quality voice synthesis. This API uses Server-Sent Events (SSE) to deliver audio chunks as they're generated, enabling low-latency audio playback without waiting for the entire audio file to process.\nFor an end-to-end example of how to use the Lightning v2 SSE API, check out [Text to Speech (SSE) Example](https://github.com/smallest-inc/waves-examples/blob/main/lightning_v2/http_streaming/http_streaming_api.py)\n\n## When to Use\n\n- **Interactive Applications**: Perfect for chatbots, virtual assistants, and other applications requiring immediate voice responses\n- **Long-Form Content**: Efficiently stream audio for articles, stories, or other long-form content without buffering delays\n- **Voice User Interfaces**: Create natural-sounding voice interfaces with minimal perceived latency\n- **Accessibility Solutions**: Provide real-time audio versions of written content for users with visual impairments\n\n## How It Works\n\n1. **Make a POST Request**: Send your text and voice settings to the API endpoint\n2. **Receive Audio Chunks**: The API processes your text and streams audio back as base64-encoded chunks with 1024 byte size\n3. **Process the Stream**: Handle the SSE events to decode and play audio chunks sequentially\n4. **End of Stream**: The API sends a completion event when all audio has been delivered\n","tags":["subpackage_textToSpeech"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Synthesized speech retrieved successfully.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamLightningv2SpeechRequestBadRequestError"}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamLightningv2SpeechRequestUnauthorizedError"}}}},"500":{"description":"Server error occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamLightningv2SpeechRequestInternalServerError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lightningv2Request"}}}}}},"/waves/v1/pulse/get_text":{"post":{"operationId":"pulse-speech-to-text","summary":"Pulse (Pre-Recorded)","description":"Transcribe an audio file to text using the Pulse model. The fastest way to get a transcript when you already have a recording — pass either the raw bytes or a URL.\n\n## When to use this\n\nUse this endpoint when you have a complete audio file (call recording, voicemail, podcast episode) and want the transcript back in one response. For live transcription as audio arrives, use the realtime WebSocket endpoint (`WSS /waves/v1/pulse/get_text`) instead.\n\n## Input methods\n\nSend the audio in one of two ways:\n\n1. **Raw bytes** — `Content-Type: application/octet-stream` with the audio in the body. All knobs (`language`, `word_timestamps`, etc.) are query parameters.\n2. **URL** — `Content-Type: application/json` with `{\"url\": \"...\"}` in the body. Useful when the audio already lives in object storage. Same query parameters apply.\n\nPulse autodetects the language across 30+ supported locales. Pass `language` explicitly when you already know it — detection is fast but skipping it is faster.\n\n## Examples\n\n**cURL** (raw bytes)\n```bash\ncurl -X POST \"https://api.smallest.ai/waves/v1/pulse/get_text?language=en&word_timestamps=true\" \\\n -H \"Authorization: Bearer $SMALLEST_API_KEY\" \\\n -H \"Content-Type: application/octet-stream\" \\\n --data-binary \"@./call.wav\"\n```\n\n**cURL** (URL)\n```bash\ncurl -X POST \"https://api.smallest.ai/waves/v1/pulse/get_text?language=en\" \\\n -H \"Authorization: Bearer $SMALLEST_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"url\": \"https://your-bucket.s3.amazonaws.com/call.wav\"}'\n```\n\n**Python** (`pip install smallestai>=4.4.0`)\n```python\nfrom smallestai import SmallestAI\n\nclient = SmallestAI(token=\"YOUR_API_KEY\")\nwith open(\"./call.wav\", \"rb\") as f:\n result = client.waves.transcribe_pulse(\n request=f.read(),\n language=\"en\",\n word_timestamps=True,\n diarize=True,\n )\nprint(result.status) # \"success\"\nprint(result.transcription) # the transcript string\n```\n\n**JavaScript / TypeScript** (using `fetch`)\n```typescript\nimport { readFileSync } from \"node:fs\";\n\nconst audio = readFileSync(\"./call.wav\");\nconst params = new URLSearchParams({ language: \"en\", word_timestamps: \"true\", diarize: \"true\" });\n\nconst res = await fetch(`https://api.smallest.ai/waves/v1/pulse/get_text?${params}`, {\n method: \"POST\",\n headers: {\n Authorization: `Bearer ${process.env.SMALLEST_API_KEY}`,\n \"Content-Type\": \"application/octet-stream\",\n },\n body: audio,\n});\nconst result = await res.json();\nconsole.log(result.transcription);\n```\n\n## Common gotchas\n\n- **Max file size is 25 MB.** Larger files return HTTP `413`. Compress to mono 16 kHz PCM if you're close to the limit; quality is unaffected.\n- **Formatting flags (`format`, `punctuate`, `capitalize`)** are accepted at the wire level and exposed in the Python SDK as of `smallestai>=4.4.0`. Today they currently return the same transcript regardless of value — pass them in your integration so it works as the behavior changes.\n- **Webhook-driven flow**: pass `webhook_url` to receive the transcript asynchronously. The endpoint returns immediately; the transcript hits your webhook when ready. Useful for long files where you don't want to hold an HTTP connection open.\n- **Speaker diarization** (`diarize=true`) adds latency. Skip it if you only need the words.\n- **JavaScript / TypeScript**: the official `smallestai` npm package predates the Pulse model, so call this endpoint with `fetch` or `axios` as shown above.\n","tags":["subpackage_speechToText"],"parameters":[{"name":"language","in":"query","description":"Language of the audio file. Set explicitly to the known language for best accuracy.\n\nAuto-detection scopes:\n- `multi-eu` (default) — European set: de, en, fr, it, nl, pt, ru, es.\n- `multi-indic` — Indic set: en, hi, mr, pa, gu, or, ka, ta, te, ml, bn.\n- `multi-asian` — East Asian set: en, ja, ko, zh, yue.\n- `multi` — full multilingual auto-detection across all supported languages.\n\nOmitting `language` routes to `multi-eu`, which can mis-detect on non-European audio. Always pass `language` explicitly when the source language is known, or pick the regional `multi-*` scope that matches your audio.\n","required":false,"schema":{"$ref":"#/components/schemas/WavesV1PulseGetTextPostParametersLanguage","default":"multi-eu"}},{"name":"encoding","in":"query","description":"Audio encoding of the bytes you upload. Mirrors the `encoding`\nparameter on the realtime WS endpoint.\n\n- `linear16`, `linear32` — raw PCM (16-bit and 32-bit)\n- `alaw`, `mulaw` — 8 kHz telephony codecs\n- `opus`, `ogg_opus` — Opus compressed audio (raw and Ogg container)\n\nWhen omitted, the server detects the format from the file's\ncontainer header (works for `.wav`, `.mp3`, `.flac`, `.ogg`,\n`.m4a`, `.webm`).\n","required":false,"schema":{"$ref":"#/components/schemas/WavesV1PulseGetTextPostParametersEncoding"}},{"name":"webhook_url","in":"query","required":false,"schema":{"type":"string","format":"uri"}},{"name":"webhook_extra","in":"query","required":false,"schema":{"type":"string"}},{"name":"word_timestamps","in":"query","description":"Whether to include word and utterance level timestamps in the response","required":false,"schema":{"type":"boolean","default":false}},{"name":"diarize","in":"query","description":"Whether to perform speaker diarization","required":false,"schema":{"type":"boolean","default":false}},{"name":"gender_detection","in":"query","description":"Whether to predict the gender of the speaker","required":false,"schema":{"$ref":"#/components/schemas/WavesV1PulseGetTextPostParametersGenderDetection","default":"false"}},{"name":"emotion_detection","in":"query","description":"Whether to predict speaker emotions","required":false,"schema":{"$ref":"#/components/schemas/WavesV1PulseGetTextPostParametersEmotionDetection","default":"false"}},{"name":"format","in":"query","description":"Master formatting switch for the transcript. When `false`, forces\n`punctuate=false`, `capitalize=false`, and also disables Inverse\nText Normalization (ITN) so it cannot silently reintroduce\npunctuation or casing.\n\nWhen `true`, the `punctuate` and `capitalize` params take effect\nindependently. Leave `format=true` and use those two to fine-tune.\n","required":false,"schema":{"$ref":"#/components/schemas/WavesV1PulseGetTextPostParametersFormat","default":"true"}},{"name":"punctuate","in":"query","description":"When `false`, strips end-of-sentence punctuation (`.`, `,`, `?`, `!`)\nfrom the transcript, `words[].word`, and\n`utterances[].transcript`. Does not affect casing — use\n`capitalize` for that. Overridden to `false` when `format=false`.\n","required":false,"schema":{"$ref":"#/components/schemas/WavesV1PulseGetTextPostParametersPunctuate","default":"true"}},{"name":"capitalize","in":"query","description":"When `false`, lowercases the entire transcript output (transcript,\n`words[].word`, and `utterances[].transcript`). Does not affect\npunctuation — use `punctuate` for that. Overridden to `false`\nwhen `format=false`.\n","required":false,"schema":{"$ref":"#/components/schemas/WavesV1PulseGetTextPostParametersCapitalize","default":"true"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Speech transcribed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Speech to Text_pulseSpeechToText_Response_200"}}}},"400":{"description":"Bad request - Invalid parameters or file format","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload too large - File size exceeds limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests - Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}}},"/waves/v1/{model}/get_voices":{"get":{"operationId":"get-waves-voices","summary":"Get Voices","description":"Get voices supported for a given model using the new Waves API.","tags":["subpackage_voices"],"parameters":[{"name":"model","in":"path","description":"The model to use for speech synthesis.","required":true,"schema":{"$ref":"#/components/schemas/WavesV1ModelGetVoicesGetParametersModel"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Voices retrieved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Voices_getWavesVoices_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWavesVoicesRequestBadRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWavesVoicesRequestUnauthorizedError"}}}},"500":{"description":"Server error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWavesVoicesRequestInternalServerError"}}}}}}},"/waves/v1/voice-cloning":{"post":{"operationId":"create-voice-clone","summary":"Create a Voice Clone","description":"Create an instant voice clone in a single call. Defaults to `lightning-v3.1`.\n","tags":["subpackage_voiceCloning"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Voice clone created. Includes pre-generated sample clips of the new voice.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Voice Cloning_createVoiceClone_Response_200"}}}},"400":{"description":"Validation error. Common causes: no file provided, invalid MIME type,\nfile too large, clone limit exceeded, invalid language, or\n`model=lightning-v2` (deprecated).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVoiceCloneRequestBadRequestError"}}}},"401":{"description":"Unauthorized — missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVoiceCloneRequestUnauthorizedError"}}}},"500":{"description":"Server error. The `error_code` field may be populated for known failure modes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVoiceCloneRequestInternalServerError"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"displayName":{"type":"string","description":"Human-readable name for the voice clone."},"file":{"type":"string","format":"binary","description":"Audio file to clone from. Supported MIME types:\n`audio/mpeg`, `audio/mpeg-3`, `audio/wav`, `audio/wave`,\n`audio/webm`, `video/webm`, `audio/mp4`, `video/mp4`.\nMaximum size: 5 MB.\n"},"description":{"type":"string","description":"Optional longer description for the voice clone."},"accent":{"type":"string","description":"Optional accent tag (e.g. \"general\", \"indian\")."},"tags":{"type":"string","description":"Optional comma-separated list of tags. Server splits on\ncommas and trims whitespace (`\"en, tone-test\"` → `[\"en\", \"tone-test\"]`).\n"},"language":{"type":"string","description":"Primary language the clone will be used for. Optional, but\n**strongly recommended** — set it to the language of your\nreference audio. When a TTS request later uses\n`language: \"auto\"`, the server falls back to this value, so\nsetting it now avoids silent language mismatches at inference\ntime.\n\nMust be one of the languages supported by `lightning-v3.1`\n(e.g. `en`, `hi`, `multi`). The server validates and rejects\nunsupported codes with a 400.\n"},"model":{"$ref":"#/components/schemas/WavesV1VoiceCloningPostRequestBodyContentMultipartFormDataSchemaModel","default":"lightning-v3.1","description":"Voice cloning model. Defaults to `lightning-v3.1`.\n`lightning-v2` is accepted by the schema for historical\nreasons but is deprecated — the server returns 400 with\n`\"Voice cloning for lightning-v2 is deprecated. Please use lightning-v3.1\"`.\n"}},"required":["displayName","file"]}}}}},"get":{"operationId":"list-voice-clones","summary":"List Voice Clones","description":"Retrieve all voice clones in your organization.\n","tags":["subpackage_voiceCloning"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of voice clones.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Voice Cloning_listVoiceClones_Response_200"}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Server error.","content":{"application/json":{"schema":{"description":"Any type"}}}}}}},"/waves/v1/lightning-large":{"delete":{"operationId":"delete-voice-clone","summary":"Delete a Voice Clone","description":"Delete a voice clone by `voiceId`. Despite the `/lightning-large/`\npath, this endpoint deletes any voice clone on the organization,\nincluding clones created via `POST /waves/v1/voice-cloning`.\n","tags":["subpackage_voiceCloning"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Voice clone deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Voice Cloning_deleteVoiceClone_Response_200"}}}},"400":{"description":"Bad request (Invalid voice ID or validation error)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteVoiceCloneRequestBadRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteVoiceCloneRequestUnauthorizedError"}}}},"500":{"description":"Server error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteVoiceCloneRequestInternalServerError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"voiceId":{"type":"string","description":"The unique identifier of the voice clone to delete."}},"required":["voiceId"]}}}}}},"/waves/v1/lightning-large/add_voice":{"post":{"operationId":"add-voice-to-model","summary":"Add your Voice (Deprecated)","description":"**Deprecated** — use `POST /waves/v1/voice-cloning` instead. The new\nendpoint defaults to `lightning-v3.1`, supports optional metadata,\nand returns pre-generated sample clips. This endpoint only clones\nonto `lightning-large` and the resulting voices do not work on\n`lightning-v3.1` (returns an empty WAV). Kept live for backward\ncompatibility; new integrations should migrate.\n","tags":["subpackage_voiceCloning"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Voice clone created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Voice Cloning_addVoiceToModel_Response_200"}}}},"400":{"description":"Bad request or limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddVoiceToModelRequestBadRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddVoiceToModelRequestUnauthorizedError"}}}},"500":{"description":"Server error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddVoiceToModelRequestInternalServerError"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"displayName":{"type":"string","description":"Display name for the voice clone."},"file":{"type":"string","format":"binary","description":"Audio file to create voice clone from."}},"required":["displayName","file"]}}}}}},"/waves/v1/lightning-large/get_cloned_voices":{"get":{"operationId":"get-cloned-voices","summary":"Get your cloned Voices (Deprecated)","description":"**Deprecated** — use `GET /waves/v1/voice-cloning` instead. The new\nlist endpoint returns the same data plus a `modelIds` array per\nclone. Kept live for backward compatibility.\n","tags":["subpackage_voiceCloning"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Voices retrieved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Voice Cloning_getClonedVoices_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetClonedVoicesRequestBadRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetClonedVoicesRequestUnauthorizedError"}}}},"500":{"description":"Server error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetClonedVoicesRequestInternalServerError"}}}}}}},"/waves/v1/pronunciation-dicts":{"get":{"operationId":"get-pronunciation-dicts","summary":"List","description":"Retrieve all pronunciation dictionaries for the authenticated user","tags":["subpackage_pronunciationDictionaries"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of pronunciation dictionaries","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PronunciationDict"}}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"operationId":"create-pronunciation-dict","summary":"Create","description":"Create a new pronunciation dictionary for the authenticated user","tags":["subpackage_pronunciationDictionaries"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully created pronunciation dictionary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PronunciationDict"}}}},"400":{"description":"Bad request - Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePronunciationDictRequest"}}}}},"put":{"operationId":"update-pronunciation-dict","summary":"Update","description":"Update an existing pronunciation dictionary for the authenticated user","tags":["subpackage_pronunciationDictionaries"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully updated pronunciation dictionary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePronunciationDictResponse"}}}},"400":{"description":"Bad request - Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePronunciationDictRequest"}}}}},"delete":{"operationId":"delete-pronunciation-dict","summary":"Delete","description":"Delete an existing pronunciation dictionary for the authenticated user","tags":["subpackage_pronunciationDictionaries"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully deleted pronunciation dictionary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletePronunciationDictResponse"}}}},"400":{"description":"Bad request - Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletePronunciationDictRequest"}}}}}}},"servers":[{"url":"https://api.smallest.ai"}],"components":{"schemas":{"WavesV1LightningV31GetSpeechPostParametersAccept":{"type":"string","enum":["audio/wav"],"default":"audio/wav","title":"WavesV1LightningV31GetSpeechPostParametersAccept"},"LightningV31RequestSampleRate":{"type":"string","enum":["8000","16000","24000","44100"],"description":"The sample rate for the generated audio.","title":"LightningV31RequestSampleRate"},"LightningV31RequestLanguage":{"type":"string","enum":["auto","en","hi","mr","kn","ta","bn","gu","te","ml","pa","or","es"],"default":"en","description":"Language code for synthesis. Influences pronunciation, number/date\nnormalization, and phoneme selection.\n\n- **Indian:** `en`, `hi`, `mr` (Marathi), `kn` (Kannada), `ta` (Tamil),\n `bn` (Bengali), `gu` (Gujarati), `te` (Telugu), `ml` (Malayalam),\n `pa` (Punjabi), `or` (Odia)\n- **European:** `es` (Spanish)\n- `auto` — auto-detect from input text (recommended for code-switching)\n","title":"LightningV31RequestLanguage"},"LightningV31RequestOutputFormat":{"type":"string","enum":["mp3","pcm","wav","ulaw","alaw"],"default":"pcm","description":"Format of the returned audio. `pcm` is the lowest-latency option\nbut requires a decoder to play; `mp3` and `wav` are directly\nplayable in browsers and most media players. The server default\nis `pcm` when the field is omitted — the API playground uses\n`mp3` so the generated audio is directly playable.\n","title":"LightningV31RequestOutputFormat"},"LightningV31Request":{"type":"object","properties":{"text":{"type":"string","default":"Hey i am your a text to speech model","description":"The text to convert to speech."},"voice_id":{"type":"string","default":"daniel","description":"The voice identifier to use for speech generation."},"sample_rate":{"$ref":"#/components/schemas/LightningV31RequestSampleRate","default":44100,"description":"The sample rate for the generated audio."},"speed":{"type":"number","format":"double","default":1,"description":"The speed of the generated speech."},"language":{"$ref":"#/components/schemas/LightningV31RequestLanguage","default":"en","description":"Language code for synthesis. Influences pronunciation, number/date\nnormalization, and phoneme selection.\n\n- **Indian:** `en`, `hi`, `mr` (Marathi), `kn` (Kannada), `ta` (Tamil),\n `bn` (Bengali), `gu` (Gujarati), `te` (Telugu), `ml` (Malayalam),\n `pa` (Punjabi), `or` (Odia)\n- **European:** `es` (Spanish)\n- `auto` — auto-detect from input text (recommended for code-switching)\n"},"output_format":{"$ref":"#/components/schemas/LightningV31RequestOutputFormat","default":"pcm","description":"Format of the returned audio. `pcm` is the lowest-latency option\nbut requires a decoder to play; `mp3` and `wav` are directly\nplayable in browsers and most media players. The server default\nis `pcm` when the field is omitted — the API playground uses\n`mp3` so the generated audio is directly playable.\n"},"pronunciation_dicts":{"type":"array","items":{"type":"string"},"description":"The IDs of the pronunciation dictionaries to use for speech generation."},"session_id":{"type":"string","description":"Optional client-provided session identifier for correlation. Only alphanumeric characters, hyphens, underscores, and dots are allowed. Max 128 characters. Echoed back in response headers as `X-External-Session-Id`."},"request_id":{"type":"string","description":"Optional client-provided request identifier for correlation. Only alphanumeric characters, hyphens, underscores, and dots are allowed. Max 128 characters. Echoed back in response headers as `X-External-Request-Id`."}},"required":["text","voice_id"],"title":"LightningV31Request"},"SynthesizeLightningV31SpeechRequestBadRequestError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"SynthesizeLightningV31SpeechRequestBadRequestError"},"SynthesizeLightningV31SpeechRequestUnauthorizedError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"SynthesizeLightningV31SpeechRequestUnauthorizedError"},"SynthesizeLightningV31SpeechRequestInternalServerError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"SynthesizeLightningV31SpeechRequestInternalServerError"},"StreamLightningV31SpeechRequestBadRequestError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"StreamLightningV31SpeechRequestBadRequestError"},"StreamLightningV31SpeechRequestUnauthorizedError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"StreamLightningV31SpeechRequestUnauthorizedError"},"StreamLightningV31SpeechRequestInternalServerError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"StreamLightningV31SpeechRequestInternalServerError"},"Lightningv2RequestLanguage":{"type":"string","enum":["en","hi","ta","kn","mr","bn","gu","ar","he","fr","de","pl","ru","it","nl","es","sv","ml","te"],"default":"en","description":"Determines how numbers are spelled out. If set to 'en', numbers will be read as individual digits in English. If set to 'hi', numbers will be read as individual digits in Hindi.","title":"Lightningv2RequestLanguage"},"Lightningv2RequestOutputFormat":{"type":"string","enum":["pcm","mp3","wav","ulaw","alaw"],"default":"pcm","description":"The format of the output audio.","title":"Lightningv2RequestOutputFormat"},"Lightningv2Request":{"type":"object","properties":{"text":{"type":"string","default":"Hey i am your a text to speech model","description":"The text to convert to speech."},"voice_id":{"type":"string","default":"malcom","description":"The voice identifier to use for speech generation."},"sample_rate":{"type":"integer","default":24000,"description":"The sample rate for the generated audio."},"speed":{"type":"number","format":"double","default":1,"description":"The speed of the generated speech."},"consistency":{"type":"number","format":"double","default":0.5,"description":"This parameter controls word repetition and skipping. Decrease it to prevent skipped words, and increase it to prevent repetition."},"similarity":{"type":"number","format":"double","default":0,"description":"This parameter controls the similarity between the generated speech and the reference audio. Increase it to make the speech more similar to the reference audio."},"enhancement":{"type":"number","format":"double","default":1,"description":"Enhances speech quality at the cost of increased latency."},"language":{"$ref":"#/components/schemas/Lightningv2RequestLanguage","default":"en","description":"Determines how numbers are spelled out. If set to 'en', numbers will be read as individual digits in English. If set to 'hi', numbers will be read as individual digits in Hindi."},"output_format":{"$ref":"#/components/schemas/Lightningv2RequestOutputFormat","default":"pcm","description":"The format of the output audio."},"pronunciation_dicts":{"type":"array","items":{"type":"string"},"description":"The IDs of the pronunciation dictionaries to use for speech generation."}},"required":["text","voice_id"],"title":"Lightningv2Request"},"SynthesizeLightningv2SpeechRequestBadRequestError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"SynthesizeLightningv2SpeechRequestBadRequestError"},"SynthesizeLightningv2SpeechRequestUnauthorizedError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"SynthesizeLightningv2SpeechRequestUnauthorizedError"},"SynthesizeLightningv2SpeechRequestInternalServerError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"SynthesizeLightningv2SpeechRequestInternalServerError"},"StreamLightningv2SpeechRequestBadRequestError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"StreamLightningv2SpeechRequestBadRequestError"},"StreamLightningv2SpeechRequestUnauthorizedError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"StreamLightningv2SpeechRequestUnauthorizedError"},"StreamLightningv2SpeechRequestInternalServerError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"StreamLightningv2SpeechRequestInternalServerError"},"WavesV1PulseGetTextPostParametersLanguage":{"type":"string","enum":["it","es","en","pt","hi","de","fr","uk","ru","kn","ml","pl","mr","gu","cs","sk","te","or","nl","bn","lv","et","ro","pa","fi","sv","bg","ta","hu","da","lt","mt","multi","multi-eu","multi-indic","multi-asian"],"default":"multi-eu","title":"WavesV1PulseGetTextPostParametersLanguage"},"WavesV1PulseGetTextPostParametersEncoding":{"type":"string","enum":["linear16","linear32","alaw","mulaw","opus","ogg_opus"],"title":"WavesV1PulseGetTextPostParametersEncoding"},"WavesV1PulseGetTextPostParametersGenderDetection":{"type":"string","enum":["true","false"],"default":"false","title":"WavesV1PulseGetTextPostParametersGenderDetection"},"WavesV1PulseGetTextPostParametersEmotionDetection":{"type":"string","enum":["true","false"],"default":"false","title":"WavesV1PulseGetTextPostParametersEmotionDetection"},"WavesV1PulseGetTextPostParametersFormat":{"type":"string","enum":["true","false"],"default":"true","title":"WavesV1PulseGetTextPostParametersFormat"},"WavesV1PulseGetTextPostParametersPunctuate":{"type":"string","enum":["true","false"],"default":"true","title":"WavesV1PulseGetTextPostParametersPunctuate"},"WavesV1PulseGetTextPostParametersCapitalize":{"type":"string","enum":["true","false"],"default":"true","title":"WavesV1PulseGetTextPostParametersCapitalize"},"WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaWordsItems":{"type":"object","properties":{"start":{"type":"number","format":"double"},"end":{"type":"number","format":"double"},"speaker":{"type":"string","description":"Speaker if diarization is enabled"},"word":{"type":"string"}},"title":"WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaWordsItems"},"WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaUtterancesItems":{"type":"object","properties":{"text":{"type":"string"},"start":{"type":"number","format":"double"},"end":{"type":"number","format":"double"},"speaker":{"type":"string","description":"Speaker if diarization is enabled"}},"title":"WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaUtterancesItems"},"WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaGender":{"type":"string","enum":["male","female"],"description":"Predicted gender of the speaker if requested","title":"WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaGender"},"WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaEmotions":{"type":"object","properties":{"happiness":{"type":"number","format":"double"},"sadness":{"type":"number","format":"double"},"disgust":{"type":"number","format":"double"},"fear":{"type":"number","format":"double"},"anger":{"type":"number","format":"double"}},"description":"Predicted emotions of the speaker if requested","title":"WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaEmotions"},"WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaMetadata":{"type":"object","properties":{"filename":{"type":"string","description":"Name of the audio file"},"duration":{"type":"number","format":"double","description":"Duration of the audio file in minutes"},"fileSize":{"type":"number","format":"double","description":"Size of the audio file in bytes"}},"description":"Metadata about the transcription","title":"WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaMetadata"},"Speech to Text_pulseSpeechToText_Response_200":{"type":"object","properties":{"status":{"type":"string","description":"Status of the transcription request"},"transcription":{"type":"string","description":"The transcribed text from the audio file"},"audio_length":{"type":"number","format":"double","description":"Duration of the audio file in seconds"},"words":{"type":"array","items":{"$ref":"#/components/schemas/WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaWordsItems"},"description":"Word-level timestamps in seconds."},"utterances":{"type":"array","items":{"$ref":"#/components/schemas/WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaUtterancesItems"},"description":"List of utterances with start and end times"},"gender":{"$ref":"#/components/schemas/WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaGender","description":"Predicted gender of the speaker if requested"},"emotions":{"$ref":"#/components/schemas/WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaEmotions","description":"Predicted emotions of the speaker if requested"},"metadata":{"$ref":"#/components/schemas/WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaMetadata","description":"Metadata about the transcription"}},"title":"Speech to Text_pulseSpeechToText_Response_200"},"ErrorResponseStatus":{"type":"string","enum":["error"],"title":"ErrorResponseStatus"},"ErrorResponseError":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"title":"ErrorResponseError"},"ErrorResponse":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/ErrorResponseStatus"},"error":{"$ref":"#/components/schemas/ErrorResponseError"}},"title":"ErrorResponse"},"WavesV1ModelGetVoicesGetParametersModel":{"type":"string","enum":["lightning","lightning-large","lightning-v2","lightning-v3.1"],"default":"lightning-v3.1","title":"WavesV1ModelGetVoicesGetParametersModel"},"WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItemsTags":{"type":"object","properties":{"language":{"type":"array","items":{"type":"string"},"description":"Language of the voice."},"accent":{"type":"string","description":"Accent of the voice."},"gender":{"type":"string","description":"Gender of the voice."}},"description":"List of tags associated with the voice.","title":"WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItemsTags"},"WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItems":{"type":"object","properties":{"voiceId":{"type":"string","description":"Unique Voice ID."},"displayName":{"type":"string","description":"Display name for the voice."},"tags":{"$ref":"#/components/schemas/WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItemsTags","description":"List of tags associated with the voice."}},"required":["voiceId","displayName"],"title":"WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItems"},"Voices_getWavesVoices_Response_200":{"type":"object","properties":{"voices":{"type":"array","items":{"$ref":"#/components/schemas/WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItems"},"description":"List of available voices."}},"title":"Voices_getWavesVoices_Response_200"},"GetWavesVoicesRequestBadRequestError":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"title":"GetWavesVoicesRequestBadRequestError"},"GetWavesVoicesRequestUnauthorizedError":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"title":"GetWavesVoicesRequestUnauthorizedError"},"GetWavesVoicesRequestInternalServerError":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"title":"GetWavesVoicesRequestInternalServerError"},"WavesV1VoiceCloningPostRequestBodyContentMultipartFormDataSchemaModel":{"type":"string","enum":["lightning-v3.1"],"default":"lightning-v3.1","description":"Voice cloning model. Defaults to `lightning-v3.1`.\n`lightning-v2` is accepted by the schema for historical\nreasons but is deprecated — the server returns 400 with\n`\"Voice cloning for lightning-v2 is deprecated. Please use lightning-v3.1\"`.\n","title":"WavesV1VoiceCloningPostRequestBodyContentMultipartFormDataSchemaModel"},"WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaDataStatus":{"type":"string","enum":["pending","processing","completed","failed"],"title":"WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaDataStatus"},"WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaDataSamplesItems":{"type":"object","properties":{"text":{"type":"string","description":"Text that was synthesized."},"audioUrl":{"type":"string","description":"Signed URL to the generated sample audio."}},"title":"WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaDataSamplesItems"},"WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"voiceId":{"type":"string","description":"Unique voice ID. Pass this as `voice_id` in TTS requests."},"displayName":{"type":"string"},"model":{"type":"string","description":"Internal model document for the cloned voice."},"status":{"$ref":"#/components/schemas/WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaDataStatus"},"language":{"type":"string"},"audioFileNames":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time"},"organizationId":{"type":"string"},"samples":{"type":"array","items":{"$ref":"#/components/schemas/WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaDataSamplesItems"},"description":"Pre-generated sample audio clips in the cloned voice."}},"title":"WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaData"},"Voice Cloning_createVoiceClone_Response_200":{"type":"object","properties":{"message":{"type":"string"},"data":{"$ref":"#/components/schemas/WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaData"}},"title":"Voice Cloning_createVoiceClone_Response_200"},"CreateVoiceCloneRequestBadRequestError":{"type":"object","properties":{"error":{"type":"string","description":"Error message."}},"title":"CreateVoiceCloneRequestBadRequestError"},"CreateVoiceCloneRequestUnauthorizedError":{"type":"object","properties":{"error":{"type":"string"}},"title":"CreateVoiceCloneRequestUnauthorizedError"},"WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaErrorCode":{"type":"string","enum":["voice_clone_timeout","voice_clone_error"],"description":"Present when a known failure mode occurred.","title":"WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaErrorCode"},"CreateVoiceCloneRequestInternalServerError":{"type":"object","properties":{"error":{"type":"string"},"error_code":{"$ref":"#/components/schemas/WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaErrorCode","description":"Present when a known failure mode occurred."}},"title":"CreateVoiceCloneRequestInternalServerError"},"WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItemsStatus":{"type":"string","enum":["pending","processing","completed","failed"],"title":"WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItemsStatus"},"WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItemsCloningType":{"type":"string","enum":["instant","professional"],"title":"WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItemsCloningType"},"WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItems":{"type":"object","properties":{"_id":{"type":"string"},"voiceId":{"type":"string"},"displayName":{"type":"string"},"description":{"type":"string"},"accent":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"language":{"type":"string"},"status":{"$ref":"#/components/schemas/WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItemsStatus"},"cloningType":{"$ref":"#/components/schemas/WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItemsCloningType"},"modelIds":{"type":"array","items":{"type":"string"},"description":"Models this clone is compatible with. `lightning-v3.1`\nis the current default. Older entries may list\n`lightning-large`.\n"},"createdAt":{"type":"string","format":"date-time"}},"title":"WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItems"},"Voice Cloning_listVoiceClones_Response_200":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItems"}}},"title":"Voice Cloning_listVoiceClones_Response_200"},"Voice Cloning_deleteVoiceClone_Response_200":{"type":"object","properties":{"success":{"type":"boolean","description":"Status if the voice clone was deleted successfully."},"voiceId":{"type":"string","description":"Voice ID of the deleted voice clone."}},"required":["voiceId"],"title":"Voice Cloning_deleteVoiceClone_Response_200"},"DeleteVoiceCloneRequestBadRequestError":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"title":"DeleteVoiceCloneRequestBadRequestError"},"DeleteVoiceCloneRequestUnauthorizedError":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"title":"DeleteVoiceCloneRequestUnauthorizedError"},"DeleteVoiceCloneRequestInternalServerError":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"title":"DeleteVoiceCloneRequestInternalServerError"},"WavesV1LightningLargeAddVoicePostResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"voiceId":{"type":"string","description":"Unique Voice ID."},"model":{"type":"string","description":"Model used to generate the voice."},"status":{"type":"string","description":"Status of the voice creation."}},"required":["voiceId","model","status"],"title":"WavesV1LightningLargeAddVoicePostResponsesContentApplicationJsonSchemaData"},"Voice Cloning_addVoiceToModel_Response_200":{"type":"object","properties":{"message":{"type":"string","description":"Message if the voice clone was created successfully."},"data":{"$ref":"#/components/schemas/WavesV1LightningLargeAddVoicePostResponsesContentApplicationJsonSchemaData"}},"title":"Voice Cloning_addVoiceToModel_Response_200"},"AddVoiceToModelRequestBadRequestError":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"title":"AddVoiceToModelRequestBadRequestError"},"AddVoiceToModelRequestUnauthorizedError":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"title":"AddVoiceToModelRequestUnauthorizedError"},"AddVoiceToModelRequestInternalServerError":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"title":"AddVoiceToModelRequestInternalServerError"},"WavesV1LightningLargeGetClonedVoicesGetResponsesContentApplicationJsonSchemaVoicesItems":{"type":"object","properties":{"displayName":{"type":"string","description":"Display name for the voice."},"accent":{"type":"string","description":"Accent of the voice."},"tags":{"type":"array","items":{"type":"string"},"description":"List of tags associated with the voice."},"voiceId":{"type":"string","description":"Unique Voice ID."},"model":{"type":"string","description":"Model used to generate the voice."},"status":{"type":"string","description":"Status of the voice generation."},"createdAt":{"type":"string","format":"date-time","description":"Date and time the voice was created."}},"required":["displayName","voiceId"],"title":"WavesV1LightningLargeGetClonedVoicesGetResponsesContentApplicationJsonSchemaVoicesItems"},"Voice Cloning_getClonedVoices_Response_200":{"type":"object","properties":{"voices":{"type":"array","items":{"$ref":"#/components/schemas/WavesV1LightningLargeGetClonedVoicesGetResponsesContentApplicationJsonSchemaVoicesItems"},"description":"List of available voices."}},"title":"Voice Cloning_getClonedVoices_Response_200"},"GetClonedVoicesRequestBadRequestError":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"title":"GetClonedVoicesRequestBadRequestError"},"GetClonedVoicesRequestUnauthorizedError":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"title":"GetClonedVoicesRequestUnauthorizedError"},"GetClonedVoicesRequestInternalServerError":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"title":"GetClonedVoicesRequestInternalServerError"},"PronunciationItem":{"type":"object","properties":{"word":{"type":"string","description":"The word to be pronounced"},"pronunciation":{"type":"string","description":"The phonetic pronunciation of the word"}},"required":["word","pronunciation"],"title":"PronunciationItem"},"PronunciationDict":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the pronunciation dictionary"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PronunciationItem"},"description":"List of word-pronunciation pairs"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the dictionary was created"}},"required":["id","items","createdAt"],"title":"PronunciationDict"},"CreatePronunciationDictRequest":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PronunciationItem"},"description":"List of word-pronunciation pairs to create"}},"required":["items"],"title":"CreatePronunciationDictRequest"},"UpdatePronunciationDictRequest":{"type":"object","properties":{"id":{"type":"string","description":"ID of the pronunciation dictionary to update"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PronunciationItem"},"description":"Updated list of word-pronunciation pairs"}},"required":["id","items"],"title":"UpdatePronunciationDictRequest"},"UpdatePronunciationDictResponse":{"type":"object","properties":{"id":{"type":"string","description":"ID of the updated pronunciation dictionary"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PronunciationItem"},"description":"Updated list of word-pronunciation pairs"}},"required":["id","items"],"title":"UpdatePronunciationDictResponse"},"DeletePronunciationDictRequest":{"type":"object","properties":{"id":{"type":"string","description":"ID of the pronunciation dictionary to delete"}},"required":["id"],"title":"DeletePronunciationDictRequest"},"DeletePronunciationDictResponse":{"type":"object","properties":{"id":{"type":"string","description":"ID of the deleted pronunciation dictionary"},"deleted":{"type":"boolean","description":"Confirmation that the dictionary was deleted"}},"required":["id","deleted"],"title":"DeletePronunciationDictResponse"}},"securitySchemes":{"BearerAuth":{"type":"apiKey","in":"header","name":"Authorization"}}}} \ No newline at end of file +{"openapi":"3.1.0","info":{"title":"API Reference","version":"1.0.0"},"paths":{"/waves/v1/tts":{"post":{"operationId":"synthesize-speech","summary":"Synthesize speech","description":"Synthesize speech from text in a single request. Pass `text` + `voice_id`, get back binary audio.\n\nPick the model with the `model` body parameter: default `lightning_v3.1`, or `lightning_v3.1_pro` for the Pro pool. Other request parameters are identical across models.\n\n## When to use this\n\n- **Use this** for short utterances you can render before playback (notifications, prompts, batch jobs, audio file generation).\n- **Use `/waves/v1/tts/live`** when you want playback to start before the full audio is ready (long passages, latency-sensitive apps).\n- **Use `/waves/v1/tts/live`** (WebSocket) when text arrives incrementally (LLM token streams, live captioning).\n\n## Key features\n\n- 44 kHz natural, expressive synthesis\n- Model selectable per request via `model` body parameter\n- Cloned voice IDs (`voice_*`) work on `lightning_v3.1` — same param as catalog voices\n- 12 documented languages on `lightning_v3.1`; English + Hindi on `lightning_v3.1_pro`\n- Output formats: `pcm`, `mp3`, `wav`, `ulaw`, `alaw`\n- Sample rates: 8 kHz – 44.1 kHz\n- Speed: 0.5× – 2×\n- Per-call pronunciation dictionaries via `pronunciation_dicts`\n\n## Examples\n\n**cURL — Lightning v3.1 (default)**\n```bash\ncurl -X POST \"https://api.smallest.ai/waves/v1/tts\" \\\n -H \"Authorization: Bearer $SMALLEST_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -H \"Accept: audio/wav\" \\\n -d '{\n \"text\": \"Hello from Waves TTS.\",\n \"voice_id\": \"magnus\",\n \"sample_rate\": 24000,\n \"output_format\": \"wav\"\n }' --output speech.wav\n```\n\n**cURL — Lightning v3.1 Pro**\n```bash\ncurl -X POST \"https://api.smallest.ai/waves/v1/tts\" \\\n -H \"Authorization: Bearer $SMALLEST_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -H \"Accept: audio/wav\" \\\n -d '{\n \"text\": \"Hello from the Lightning v3.1 Pro pool.\",\n \"voice_id\": \"meher\",\n \"model\": \"lightning_v3.1_pro\",\n \"sample_rate\": 24000,\n \"output_format\": \"wav\"\n }' --output speech.wav\n```\n\n## Common gotchas\n\n- **Set `Accept: audio/wav`.** Omitting it can return an empty or unplayable response.\n- **Pair voice IDs with the right model.** Voice catalogs differ between `lightning_v3.1` and `lightning_v3.1_pro`. The API does not reject mismatched pairings, but using a Pro-only `voice_id` with `model=lightning_v3.1` (or omitting `model`) can return wrong or hallucinated audio. Pair Pro voices with `model=lightning_v3.1_pro`; standard catalog voices with `model=lightning_v3.1` (the default).\n- **Cloned voices** (`voice_*` from `add_voice`) work with `lightning_v3.1` only; voice cloning is not available on `lightning_v3.1_pro`.\n- **44.1 kHz output** is supported but most playback environments are happy with 24 kHz — drop the sample rate if bandwidth matters.\n","tags":["subpackage_textToSpeech"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","description":"Must be `audio/wav` to receive binary audio. Required for proper playback.","required":true,"schema":{"$ref":"#/components/schemas/WavesV1TtsPostParametersAccept"}}],"responses":{"200":{"description":"Synthesized speech retrieved successfully.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TtsError"}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TtsError"}}}},"500":{"description":"Server error occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TtsError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TtsRequest"}}}}}},"/waves/v1/tts/live":{"post":{"operationId":"synthesize-speech-sse","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](/waves/api-reference/api-reference/text-to-speech/live-tts-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\": \"\"}\\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: {\"done\": true}\\n\\n` frame marks end of stream.\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":["subpackage_textToSpeech"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Synthesized speech retrieved successfully.","content":{"text/event-stream":{"schema":{"type":"string"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TtsError"}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TtsError"}}}},"500":{"description":"Server error occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TtsError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TtsRequest"}}}}}},"/waves/v1/lightning-v3.1/get_speech":{"post":{"operationId":"synthesize-lightning-v-31-speech","summary":"Lightning v3.1 (Endpoint Deprecated)","description":"**Endpoint scheduled for retirement.** This URL will stop accepting requests **60 days from the Lightning v3.1 Pro launch (2026-05-15)** — i.e. on **2026-07-14**. The Lightning v3.1 model itself is current and stays. Migrate to [`POST /waves/v1/tts`](/waves/api-reference/api-reference/text-to-speech/synthesize-speech) and select Lightning v3.1 via the `model` body field (default).\n\nSynthesize speech from text in a single request. The simplest way to get audio when you have the full text up front — pass `text` + `voice_id`, get back binary audio.\n\n## When to use this\n\n- **Use this** for short utterances you can render before playback (notifications, prompts, batch jobs, audio file generation).\n- **Use the SSE streaming endpoint** when you want playback to start before the full audio is ready (long passages, latency-sensitive apps).\n- **Use the WebSocket endpoint** when text arrives incrementally (LLM token streams, live captioning).\n\n## Key features\n\n- 44 kHz natural, expressive synthesis\n- Cloned voice IDs (`voice_*`) work — same param as catalog voices\n- 12 documented languages — see the model card for the full list\n- Output formats: `pcm`, `mp3`, `wav`, `ulaw`, `alaw`\n- Sample rates: 8 kHz – 44.1 kHz\n- Speed: 0.5× – 2×\n- Per-call pronunciation dictionaries via `pronunciation_dicts`\n\n## Examples\n\n**cURL**\n```bash\ncurl -X POST \"https://api.smallest.ai/waves/v1/lightning-v3.1/get_speech\" \\\n -H \"Authorization: Bearer $SMALLEST_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -H \"Accept: audio/wav\" \\\n -d '{\n \"text\": \"Hello from Lightning v3.1.\",\n \"voice_id\": \"magnus\",\n \"sample_rate\": 24000,\n \"output_format\": \"wav\"\n }' --output speech.wav\n```\n\n**Python** (`pip install smallestai>=4.4.0`)\n```python\nfrom smallestai import SmallestAI\n\nclient = SmallestAI(token=\"YOUR_API_KEY\")\n\nwith open(\"speech.wav\", \"wb\") as f:\n for chunk in client.waves.synthesize_lightning_v3_1(\n text=\"Hello from Lightning v3.1.\",\n voice_id=\"magnus\",\n sample_rate=24000,\n output_format=\"wav\",\n # Optional: cloned voice support\n # voice_id=\"voice_FlPKRWI7DX\",\n # Optional: pin pronunciations for specific words\n # pronunciation_dicts=[\"\"],\n ):\n f.write(chunk)\n```\n\n**JavaScript / TypeScript** (using `fetch`)\n```typescript\nconst res = await fetch(\"https://api.smallest.ai/waves/v1/lightning-v3.1/get_speech\", {\n method: \"POST\",\n headers: {\n Authorization: `Bearer ${process.env.SMALLEST_API_KEY}`,\n \"Content-Type\": \"application/json\",\n Accept: \"audio/wav\",\n },\n body: JSON.stringify({\n text: \"Hello from Lightning v3.1.\",\n voice_id: \"magnus\",\n sample_rate: 24000,\n output_format: \"wav\",\n }),\n});\nconst audio = Buffer.from(await res.arrayBuffer());\nrequire(\"node:fs\").writeFileSync(\"speech.wav\", audio);\n```\n\n## Common gotchas\n\n- **Set `Accept: audio/wav`.** Omitting it can return an empty or unplayable response.\n- **Cloned voices** (`voice_*` from `add_voice`) work on this endpoint and support `pronunciation_dicts`.\n- **`pronunciation_dicts` validates IDs at request time.** Passing an unknown ID returns `Invalid input data` — create the dict first via the pronunciation-dicts endpoint and save the returned `id`.\n- **Pronunciation matching is case-sensitive.** Add both `Synopsis` and `synopsis` if your text uses both casings.\n- **44.1 kHz output** is supported but most playback environments are happy with 24 kHz — drop the sample rate if bandwidth matters.\n- **JavaScript / TypeScript**: the official `smallestai` npm package predates Lightning v3.1, so call this endpoint with `fetch` or `axios` as shown above.\n","tags":["subpackage_textToSpeech"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","description":"Must be `audio/wav` to receive binary audio. Required for proper playback.","required":true,"schema":{"$ref":"#/components/schemas/WavesV1LightningV31GetSpeechPostParametersAccept"}}],"responses":{"200":{"description":"Synthesized speech retrieved successfully.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SynthesizeLightningV31SpeechRequestBadRequestError"}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SynthesizeLightningV31SpeechRequestUnauthorizedError"}}}},"500":{"description":"Server error occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SynthesizeLightningV31SpeechRequestInternalServerError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LightningV31Request"}}}}}},"/waves/v1/lightning-v3.1/stream":{"post":{"operationId":"stream-lightning-v-31-speech","summary":"Lightning v3.1 SSE (Endpoint Deprecated)","description":"**Endpoint scheduled for retirement.** This URL will stop accepting requests **60 days from the Lightning v3.1 Pro launch (2026-05-15)** — i.e. on **2026-07-14**. The Lightning v3.1 model itself is current and stays. Migrate to [`POST /waves/v1/tts/live`](/waves/api-reference/api-reference/text-to-speech/stream-speech-sse) and select Lightning v3.1 via the `model` body field (default).\n\nSynthesize speech and stream the audio back over Server-Sent Events. The body and parameters are identical to the sync `/get_speech` endpoint — the difference is the response is a stream of base64-encoded PCM chunks instead of one binary blob.\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 `/get_speech`** when total latency doesn't matter and you'd rather get one buffer.\n- **Use the WebSocket endpoint** 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 `/get_speech`.\n2. The response is `Content-Type: text/event-stream`. Each chunk frame is `event: audio\\n` followed by `data: {\"audio\": \"\"}\\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: {\"done\": true}\\n\\n` frame marks end of stream.\n\n## Examples\n\n**cURL**\n```bash\ncurl -N -X POST \"https://api.smallest.ai/waves/v1/lightning-v3.1/stream\" \\\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**Python** (`pip install smallestai>=4.4.0`)\n```python\nimport base64\nfrom smallestai import SmallestAI\n\nclient = SmallestAI(token=\"YOUR_API_KEY\")\n\nwith open(\"stream.pcm\", \"wb\") as f:\n for chunk in client.waves.synthesize_sse_lightning_v3_1(\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 # Each chunk is `{\"audio\": \"\"}`.\n # Decode and pipe to your audio pipeline.\n if chunk.get(\"audio\"):\n f.write(base64.b64decode(chunk[\"audio\"]))\n```\n\n**JavaScript / TypeScript** (using `fetch` + a reader)\n```typescript\nconst res = await fetch(\"https://api.smallest.ai/waves/v1/lightning-v3.1/stream\", {\n method: \"POST\",\n headers: {\n Authorization: `Bearer ${process.env.SMALLEST_API_KEY}`,\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\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\nconst reader = res.body!.getReader();\nconst decoder = new TextDecoder();\nlet buf = \"\";\nlet finished = false;\nwhile (!finished) {\n const { value, done } = await reader.read();\n if (done) break;\n buf += decoder.decode(value);\n const events = buf.split(\"\\n\\n\");\n buf = events.pop() ?? \"\";\n for (const ev of events) {\n // SSE frames are \"event: audio\\ndata: {json}\" or just \"data: {json}\".\n // We only care about the data line — pull it out and parse.\n const dataLine = ev.split(\"\\n\").find((l) => l.startsWith(\"data:\"));\n if (!dataLine) continue;\n const payload = JSON.parse(dataLine.slice(5).trim());\n if (payload.done) { finished = true; break; }\n if (payload.audio) {\n const pcm = Buffer.from(payload.audio, \"base64\");\n // … hand pcm to your audio pipeline\n }\n }\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- **First-chunk latency** depends on model warm-up + network distance. Use `output_format=pcm` and a streaming-friendly client to minimize what you can control.\n- **JavaScript / TypeScript**: the official `smallestai` npm package predates Lightning v3.1, so call this endpoint with `fetch` as shown above.\n","tags":["subpackage_textToSpeech"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Synthesized speech retrieved successfully.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamLightningV31SpeechRequestBadRequestError"}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamLightningV31SpeechRequestUnauthorizedError"}}}},"500":{"description":"Server error occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamLightningV31SpeechRequestInternalServerError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LightningV31Request"}}}}}},"/waves/v1/lightning-v2/get_speech":{"post":{"operationId":"synthesize-lightningv-2-speech","summary":"Lightning v2","description":"Get speech for given text using the Waves API","tags":["subpackage_textToSpeech"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Synthesized speech retrieved successfully.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SynthesizeLightningv2SpeechRequestBadRequestError"}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SynthesizeLightningv2SpeechRequestUnauthorizedError"}}}},"500":{"description":"Server error occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SynthesizeLightningv2SpeechRequestInternalServerError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lightningv2Request"}}}}}},"/waves/v1/lightning-v2/stream":{"post":{"operationId":"stream-lightningv-2-speech","summary":"Lightning v2 SSE","description":"The Lightning v2 SSE API provides real-time text-to-speech streaming capabilities with high-quality voice synthesis. This API uses Server-Sent Events (SSE) to deliver audio chunks as they're generated, enabling low-latency audio playback without waiting for the entire audio file to process.\nFor an end-to-end example of how to use the Lightning v2 SSE API, check out [Text to Speech (SSE) Example](https://github.com/smallest-inc/waves-examples/blob/main/lightning_v2/http_streaming/http_streaming_api.py)\n\n## When to Use\n\n- **Interactive Applications**: Perfect for chatbots, virtual assistants, and other applications requiring immediate voice responses\n- **Long-Form Content**: Efficiently stream audio for articles, stories, or other long-form content without buffering delays\n- **Voice User Interfaces**: Create natural-sounding voice interfaces with minimal perceived latency\n- **Accessibility Solutions**: Provide real-time audio versions of written content for users with visual impairments\n\n## How It Works\n\n1. **Make a POST Request**: Send your text and voice settings to the API endpoint\n2. **Receive Audio Chunks**: The API processes your text and streams audio back as base64-encoded chunks with 1024 byte size\n3. **Process the Stream**: Handle the SSE events to decode and play audio chunks sequentially\n4. **End of Stream**: The API sends a completion event when all audio has been delivered\n","tags":["subpackage_textToSpeech"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Synthesized speech retrieved successfully.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamLightningv2SpeechRequestBadRequestError"}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamLightningv2SpeechRequestUnauthorizedError"}}}},"500":{"description":"Server error occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamLightningv2SpeechRequestInternalServerError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lightningv2Request"}}}}}},"/waves/v1/pulse/get_text":{"post":{"operationId":"pulse-speech-to-text","summary":"Pulse (Pre-Recorded)","description":"Transcribe an audio file to text using the Pulse model. The fastest way to get a transcript when you already have a recording — pass either the raw bytes or a URL.\n\n## When to use this\n\nUse this endpoint when you have a complete audio file (call recording, voicemail, podcast episode) and want the transcript back in one response. For live transcription as audio arrives, use the realtime WebSocket endpoint (`WSS /waves/v1/pulse/get_text`) instead.\n\n## Input methods\n\nSend the audio in one of two ways:\n\n1. **Raw bytes** — `Content-Type: application/octet-stream` with the audio in the body. All knobs (`language`, `word_timestamps`, etc.) are query parameters.\n2. **URL** — `Content-Type: application/json` with `{\"url\": \"...\"}` in the body. Useful when the audio already lives in object storage. Same query parameters apply.\n\nPulse autodetects the language across 30+ supported locales. Pass `language` explicitly when you already know it — detection is fast but skipping it is faster.\n\n## Examples\n\n**cURL** (raw bytes)\n```bash\ncurl -X POST \"https://api.smallest.ai/waves/v1/pulse/get_text?language=en&word_timestamps=true\" \\\n -H \"Authorization: Bearer $SMALLEST_API_KEY\" \\\n -H \"Content-Type: application/octet-stream\" \\\n --data-binary \"@./call.wav\"\n```\n\n**cURL** (URL)\n```bash\ncurl -X POST \"https://api.smallest.ai/waves/v1/pulse/get_text?language=en\" \\\n -H \"Authorization: Bearer $SMALLEST_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"url\": \"https://your-bucket.s3.amazonaws.com/call.wav\"}'\n```\n\n**Python** (`pip install smallestai>=4.4.0`)\n```python\nfrom smallestai import SmallestAI\n\nclient = SmallestAI(token=\"YOUR_API_KEY\")\nwith open(\"./call.wav\", \"rb\") as f:\n result = client.waves.transcribe_pulse(\n request=f.read(),\n language=\"en\",\n word_timestamps=True,\n diarize=True,\n )\nprint(result.status) # \"success\"\nprint(result.transcription) # the transcript string\n```\n\n**JavaScript / TypeScript** (using `fetch`)\n```typescript\nimport { readFileSync } from \"node:fs\";\n\nconst audio = readFileSync(\"./call.wav\");\nconst params = new URLSearchParams({ language: \"en\", word_timestamps: \"true\", diarize: \"true\" });\n\nconst res = await fetch(`https://api.smallest.ai/waves/v1/pulse/get_text?${params}`, {\n method: \"POST\",\n headers: {\n Authorization: `Bearer ${process.env.SMALLEST_API_KEY}`,\n \"Content-Type\": \"application/octet-stream\",\n },\n body: audio,\n});\nconst result = await res.json();\nconsole.log(result.transcription);\n```\n\n## Common gotchas\n\n- **Max file size is 25 MB.** Larger files return HTTP `413`. Compress to mono 16 kHz PCM if you're close to the limit; quality is unaffected.\n- **Formatting flags (`format`, `punctuate`, `capitalize`)** are accepted at the wire level and exposed in the Python SDK as of `smallestai>=4.4.0`. Today they currently return the same transcript regardless of value — pass them in your integration so it works as the behavior changes.\n- **Webhook-driven flow**: pass `webhook_url` to receive the transcript asynchronously. The endpoint returns immediately; the transcript hits your webhook when ready. Useful for long files where you don't want to hold an HTTP connection open.\n- **Speaker diarization** (`diarize=true`) adds latency. Skip it if you only need the words.\n- **JavaScript / TypeScript**: the official `smallestai` npm package predates the Pulse model, so call this endpoint with `fetch` or `axios` as shown above.\n","tags":["subpackage_speechToText"],"parameters":[{"name":"language","in":"query","description":"Language of the audio file. Set explicitly to the known language for best accuracy.\n\nAuto-detection scopes:\n- `multi-eu` (default) — European set: de, en, fr, it, nl, pt, ru, es.\n- `multi-indic` — Indic set: en, hi, mr, pa, gu, or, ka, ta, te, ml, bn.\n- `multi-asian` — East Asian set: en, ja, ko, zh, yue.\n- `multi` — full multilingual auto-detection across all supported languages.\n\nOmitting `language` routes to `multi-eu`, which can mis-detect on non-European audio. Always pass `language` explicitly when the source language is known, or pick the regional `multi-*` scope that matches your audio.\n","required":false,"schema":{"$ref":"#/components/schemas/WavesV1PulseGetTextPostParametersLanguage","default":"multi-eu"}},{"name":"encoding","in":"query","description":"Audio encoding of the bytes you upload. Mirrors the `encoding`\nparameter on the realtime WS endpoint.\n\n- `linear16`, `linear32` — raw PCM (16-bit and 32-bit)\n- `alaw`, `mulaw` — 8 kHz telephony codecs\n- `opus`, `ogg_opus` — Opus compressed audio (raw and Ogg container)\n\nWhen omitted, the server detects the format from the file's\ncontainer header (works for `.wav`, `.mp3`, `.flac`, `.ogg`,\n`.m4a`, `.webm`).\n","required":false,"schema":{"$ref":"#/components/schemas/WavesV1PulseGetTextPostParametersEncoding"}},{"name":"webhook_url","in":"query","required":false,"schema":{"type":"string","format":"uri"}},{"name":"webhook_extra","in":"query","required":false,"schema":{"type":"string"}},{"name":"word_timestamps","in":"query","description":"Whether to include word and utterance level timestamps in the response","required":false,"schema":{"type":"boolean","default":false}},{"name":"diarize","in":"query","description":"Whether to perform speaker diarization","required":false,"schema":{"type":"boolean","default":false}},{"name":"gender_detection","in":"query","description":"Whether to predict the gender of the speaker","required":false,"schema":{"$ref":"#/components/schemas/WavesV1PulseGetTextPostParametersGenderDetection","default":"false"}},{"name":"emotion_detection","in":"query","description":"Whether to predict speaker emotions","required":false,"schema":{"$ref":"#/components/schemas/WavesV1PulseGetTextPostParametersEmotionDetection","default":"false"}},{"name":"format","in":"query","description":"Master formatting switch for the transcript. When `false`, forces\n`punctuate=false`, `capitalize=false`, and also disables Inverse\nText Normalization (ITN) so it cannot silently reintroduce\npunctuation or casing.\n\nWhen `true`, the `punctuate` and `capitalize` params take effect\nindependently. Leave `format=true` and use those two to fine-tune.\n","required":false,"schema":{"$ref":"#/components/schemas/WavesV1PulseGetTextPostParametersFormat","default":"true"}},{"name":"punctuate","in":"query","description":"When `false`, strips end-of-sentence punctuation (`.`, `,`, `?`, `!`)\nfrom the transcript, `words[].word`, and\n`utterances[].transcript`. Does not affect casing — use\n`capitalize` for that. Overridden to `false` when `format=false`.\n","required":false,"schema":{"$ref":"#/components/schemas/WavesV1PulseGetTextPostParametersPunctuate","default":"true"}},{"name":"capitalize","in":"query","description":"When `false`, lowercases the entire transcript output (transcript,\n`words[].word`, and `utterances[].transcript`). Does not affect\npunctuation — use `punctuate` for that. Overridden to `false`\nwhen `format=false`.\n","required":false,"schema":{"$ref":"#/components/schemas/WavesV1PulseGetTextPostParametersCapitalize","default":"true"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Speech transcribed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Speech to Text_pulseSpeechToText_Response_200"}}}},"400":{"description":"Bad request - Invalid parameters or file format","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload too large - File size exceeds limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests - Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}}},"/waves/v1/{model}/get_voices":{"get":{"operationId":"get-waves-voices","summary":"Get Voices","description":"List voices available for Lightning v3.1. The response is the union of the standard and Pro voice catalogs — the API does not return a per-voice \"is Pro\" flag, so consult the [Lightning v3.1 Pro](/waves/model-cards/text-to-speech/lightning-v-3-1-pro) and [Lightning v3.1](/waves/model-cards/text-to-speech/lightning-v-3-1) model cards for the canonical per-pool voice lists. Use the `voice_id` from this response together with `\"model\": \"lightning_v3.1\"` (default) or `\"model\": \"lightning_v3.1_pro\"` on the unified `/waves/v1/tts` route to pick the pool.\n","tags":["subpackage_voices"],"parameters":[{"name":"model","in":"path","description":"The catalog to query. Currently only `lightning-v3.1` is supported — the response returns the union of standard Lightning v3.1 voices and Lightning v3.1 Pro voices. The API does not include a per-voice Pro flag; consult the model cards for the canonical per-pool catalogs.\n","required":true,"schema":{"$ref":"#/components/schemas/WavesV1ModelGetVoicesGetParametersModel"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Voices retrieved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Voices_getWavesVoices_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWavesVoicesRequestBadRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWavesVoicesRequestUnauthorizedError"}}}},"500":{"description":"Server error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWavesVoicesRequestInternalServerError"}}}}}}},"/waves/v1/voice-cloning":{"post":{"operationId":"create-voice-clone","summary":"Create a Voice Clone","description":"Create an instant voice clone in a single call. Defaults to `lightning-v3.1`.\n","tags":["subpackage_voiceCloning"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Voice clone created. Includes pre-generated sample clips of the new voice.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Voice Cloning_createVoiceClone_Response_200"}}}},"400":{"description":"Validation error. Common causes: no file provided, invalid MIME type,\nfile too large, clone limit exceeded, invalid language, or\n`model=lightning-v2` (deprecated).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVoiceCloneRequestBadRequestError"}}}},"401":{"description":"Unauthorized — missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVoiceCloneRequestUnauthorizedError"}}}},"500":{"description":"Server error. The `error_code` field may be populated for known failure modes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVoiceCloneRequestInternalServerError"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"displayName":{"type":"string","description":"Human-readable name for the voice clone."},"file":{"type":"string","format":"binary","description":"Audio file to clone from. Supported MIME types:\n`audio/mpeg`, `audio/mpeg-3`, `audio/wav`, `audio/wave`,\n`audio/webm`, `video/webm`, `audio/mp4`, `video/mp4`.\nMaximum size: 5 MB.\n"},"description":{"type":"string","description":"Optional longer description for the voice clone."},"accent":{"type":"string","description":"Optional accent tag (e.g. \"general\", \"indian\")."},"tags":{"type":"string","description":"Optional comma-separated list of tags. Server splits on\ncommas and trims whitespace (`\"en, tone-test\"` → `[\"en\", \"tone-test\"]`).\n"},"language":{"type":"string","description":"Primary language the clone will be used for. Optional, but\n**strongly recommended** — set it to the language of your\nreference audio. When a TTS request later uses\n`language: \"auto\"`, the server falls back to this value, so\nsetting it now avoids silent language mismatches at inference\ntime.\n\nMust be one of the languages supported by `lightning-v3.1`\n(e.g. `en`, `hi`, `multi`). The server validates and rejects\nunsupported codes with a 400.\n"},"model":{"$ref":"#/components/schemas/WavesV1VoiceCloningPostRequestBodyContentMultipartFormDataSchemaModel","default":"lightning-v3.1","description":"Voice cloning model. Defaults to `lightning-v3.1`.\n`lightning-v2` is accepted by the schema for historical\nreasons but is deprecated — the server returns 400 with\n`\"Voice cloning for lightning-v2 is deprecated. Please use lightning-v3.1\"`.\n"}},"required":["displayName","file"]}}}}},"get":{"operationId":"list-voice-clones","summary":"List Voice Clones","description":"Retrieve all voice clones in your organization.\n","tags":["subpackage_voiceCloning"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of voice clones.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Voice Cloning_listVoiceClones_Response_200"}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"description":"Any type"}}}},"500":{"description":"Server error.","content":{"application/json":{"schema":{"description":"Any type"}}}}}}},"/waves/v1/lightning-large":{"delete":{"operationId":"delete-voice-clone","summary":"Delete a Voice Clone","description":"Delete a voice clone by `voiceId`. Despite the `/lightning-large/`\npath, this endpoint deletes any voice clone on the organization,\nincluding clones created via `POST /waves/v1/voice-cloning`.\n","tags":["subpackage_voiceCloning"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Voice clone deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Voice Cloning_deleteVoiceClone_Response_200"}}}},"400":{"description":"Bad request (Invalid voice ID or validation error)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteVoiceCloneRequestBadRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteVoiceCloneRequestUnauthorizedError"}}}},"500":{"description":"Server error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteVoiceCloneRequestInternalServerError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"voiceId":{"type":"string","description":"The unique identifier of the voice clone to delete."}},"required":["voiceId"]}}}}}},"/waves/v1/lightning-large/add_voice":{"post":{"operationId":"add-voice-to-model","summary":"Add your Voice (Deprecated)","description":"**Deprecated** — use `POST /waves/v1/voice-cloning` instead. The new\nendpoint defaults to `lightning-v3.1`, supports optional metadata,\nand returns pre-generated sample clips. This endpoint only clones\nonto `lightning-large` and the resulting voices do not work on\n`lightning-v3.1` (returns an empty WAV). Kept live for backward\ncompatibility; new integrations should migrate.\n","tags":["subpackage_voiceCloning"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Voice clone created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Voice Cloning_addVoiceToModel_Response_200"}}}},"400":{"description":"Bad request or limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddVoiceToModelRequestBadRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddVoiceToModelRequestUnauthorizedError"}}}},"500":{"description":"Server error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddVoiceToModelRequestInternalServerError"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"displayName":{"type":"string","description":"Display name for the voice clone."},"file":{"type":"string","format":"binary","description":"Audio file to create voice clone from."}},"required":["displayName","file"]}}}}}},"/waves/v1/lightning-large/get_cloned_voices":{"get":{"operationId":"get-cloned-voices","summary":"Get your cloned Voices (Deprecated)","description":"**Deprecated** — use `GET /waves/v1/voice-cloning` instead. The new\nlist endpoint returns the same data plus a `modelIds` array per\nclone. Kept live for backward compatibility.\n","tags":["subpackage_voiceCloning"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Voices retrieved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Voice Cloning_getClonedVoices_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetClonedVoicesRequestBadRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetClonedVoicesRequestUnauthorizedError"}}}},"500":{"description":"Server error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetClonedVoicesRequestInternalServerError"}}}}}}},"/waves/v1/pronunciation-dicts":{"get":{"operationId":"get-pronunciation-dicts","summary":"List","description":"Retrieve all pronunciation dictionaries for the authenticated user","tags":["subpackage_pronunciationDictionaries"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of pronunciation dictionaries","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PronunciationDict"}}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"operationId":"create-pronunciation-dict","summary":"Create","description":"Create a new pronunciation dictionary for the authenticated user","tags":["subpackage_pronunciationDictionaries"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully created pronunciation dictionary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PronunciationDict"}}}},"400":{"description":"Bad request - Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePronunciationDictRequest"}}}}},"put":{"operationId":"update-pronunciation-dict","summary":"Update","description":"Update an existing pronunciation dictionary for the authenticated user","tags":["subpackage_pronunciationDictionaries"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully updated pronunciation dictionary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePronunciationDictResponse"}}}},"400":{"description":"Bad request - Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePronunciationDictRequest"}}}}},"delete":{"operationId":"delete-pronunciation-dict","summary":"Delete","description":"Delete an existing pronunciation dictionary for the authenticated user","tags":["subpackage_pronunciationDictionaries"],"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully deleted pronunciation dictionary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletePronunciationDictResponse"}}}},"400":{"description":"Bad request - Invalid request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletePronunciationDictRequest"}}}}}}},"servers":[{"url":"https://api.smallest.ai"}],"components":{"schemas":{"WavesV1TtsPostParametersAccept":{"type":"string","enum":["audio/wav"],"default":"audio/wav","title":"WavesV1TtsPostParametersAccept"},"TtsRequestModel":{"type":"string","enum":["lightning_v3.1","lightning_v3.1_pro"],"default":"lightning_v3.1","description":"TTS model to route the request to. Controls which model pool serves\nthis synthesis.\n\n- `lightning_v3.1` (default) — standard Lightning v3.1.\n- `lightning_v3.1_pro` — Lightning v3.1 Pro pool. Improved audio\n quality and naturalness, with a curated voice catalog. See the\n [Lightning v3.1 Pro model card](/waves/model-cards/text-to-speech/lightning-v-3-1-pro)\n for supported voice IDs.\n\nSame concurrency and latency profile across both. Other request\nparameters behave identically.\n","title":"TtsRequestModel"},"TtsRequestSampleRate":{"type":"string","enum":["8000","16000","24000","44100"],"description":"The sample rate for the generated audio.","title":"TtsRequestSampleRate"},"TtsRequestLanguage":{"type":"string","enum":["auto","en","hi","mr","kn","ta","bn","gu","te","ml","pa","or","es"],"default":"en","description":"Language code for synthesis. Influences pronunciation, number/date\nnormalization, and phoneme selection.\n\nEach voice has its own `tags.language` set in the voice catalog —\nquery `GET /waves/v1/lightning-v3.1/get_voices`. Pass a language\nthe voice was trained on; passing other codes is accepted by the\nAPI but produces English-pronounced output.\n\nOn `lightning_v3.1`, the full 12-language catalog applies. On\n`lightning_v3.1_pro`, Indian voices speak `en` and `hi` (with\n`auto` for code-switching); British and American voices speak\nEnglish only.\n","title":"TtsRequestLanguage"},"TtsRequestOutputFormat":{"type":"string","enum":["mp3","pcm","wav","ulaw","alaw"],"default":"pcm","description":"Format of the returned audio. `pcm` is the lowest-latency option\nbut requires a decoder to play; `mp3` and `wav` are directly\nplayable in browsers and most media players. The server default\nis `pcm` when the field is omitted — the API playground uses\n`mp3` so the generated audio is directly playable.\n","title":"TtsRequestOutputFormat"},"TtsRequest":{"type":"object","properties":{"text":{"type":"string","default":"Hello from Waves TTS.","description":"The text to convert to speech."},"voice_id":{"type":"string","default":"magnus","description":"The voice identifier to use for speech generation. See the model card for available voices per model."},"model":{"$ref":"#/components/schemas/TtsRequestModel","default":"lightning_v3.1","description":"TTS model to route the request to. Controls which model pool serves\nthis synthesis.\n\n- `lightning_v3.1` (default) — standard Lightning v3.1.\n- `lightning_v3.1_pro` — Lightning v3.1 Pro pool. Improved audio\n quality and naturalness, with a curated voice catalog. See the\n [Lightning v3.1 Pro model card](/waves/model-cards/text-to-speech/lightning-v-3-1-pro)\n for supported voice IDs.\n\nSame concurrency and latency profile across both. Other request\nparameters behave identically.\n"},"sample_rate":{"$ref":"#/components/schemas/TtsRequestSampleRate","default":44100,"description":"The sample rate for the generated audio."},"speed":{"type":"number","format":"double","default":1,"description":"The speed of the generated speech."},"language":{"$ref":"#/components/schemas/TtsRequestLanguage","default":"en","description":"Language code for synthesis. Influences pronunciation, number/date\nnormalization, and phoneme selection.\n\nEach voice has its own `tags.language` set in the voice catalog —\nquery `GET /waves/v1/lightning-v3.1/get_voices`. Pass a language\nthe voice was trained on; passing other codes is accepted by the\nAPI but produces English-pronounced output.\n\nOn `lightning_v3.1`, the full 12-language catalog applies. On\n`lightning_v3.1_pro`, Indian voices speak `en` and `hi` (with\n`auto` for code-switching); British and American voices speak\nEnglish only.\n"},"output_format":{"$ref":"#/components/schemas/TtsRequestOutputFormat","default":"pcm","description":"Format of the returned audio. `pcm` is the lowest-latency option\nbut requires a decoder to play; `mp3` and `wav` are directly\nplayable in browsers and most media players. The server default\nis `pcm` when the field is omitted — the API playground uses\n`mp3` so the generated audio is directly playable.\n"},"pronunciation_dicts":{"type":"array","items":{"type":"string"},"description":"The IDs of the pronunciation dictionaries to use for speech generation. Available on both `lightning_v3.1` and `lightning_v3.1_pro`."},"session_id":{"type":"string","description":"Optional client-provided session identifier for correlation. Only alphanumeric characters, hyphens, underscores, and dots are allowed. Max 128 characters. Echoed back in response headers as `X-External-Session-Id`."},"request_id":{"type":"string","description":"Optional client-provided request identifier for correlation. Only alphanumeric characters, hyphens, underscores, and dots are allowed. Max 128 characters. Echoed back in response headers as `X-External-Request-Id`."}},"required":["text","voice_id"],"title":"TtsRequest"},"TtsError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"TtsError"},"WavesV1LightningV31GetSpeechPostParametersAccept":{"type":"string","enum":["audio/wav"],"default":"audio/wav","title":"WavesV1LightningV31GetSpeechPostParametersAccept"},"LightningV31RequestModel":{"type":"string","enum":["lightning_v3.1","lightning_v3.1_pro"],"default":"lightning_v3.1","description":"TTS model to route the request to.\n\n- `lightning_v3.1` (default) — standard Lightning v3.1 pool.\n- `lightning_v3.1_pro` — Lightning v3.1 Pro pool with a curated\n voice catalog. See the\n [Pro model card](/waves/model-cards/text-to-speech/lightning-v-3-1-pro).\n\nNew integrations should use the unified\n`/waves/v1/tts` route instead of this endpoint, but the `model`\nfield is supported here for backwards-compatible Pro opt-in.\n","title":"LightningV31RequestModel"},"LightningV31RequestSampleRate":{"type":"string","enum":["8000","16000","24000","44100"],"description":"The sample rate for the generated audio.","title":"LightningV31RequestSampleRate"},"LightningV31RequestLanguage":{"type":"string","enum":["auto","en","hi","mr","kn","ta","bn","gu","te","ml","pa","or","es"],"default":"en","description":"Language code for synthesis. Influences pronunciation, number/date\nnormalization, and phoneme selection.\n\n- **Indian:** `en`, `hi`, `mr` (Marathi), `kn` (Kannada), `ta` (Tamil),\n `bn` (Bengali), `gu` (Gujarati), `te` (Telugu), `ml` (Malayalam),\n `pa` (Punjabi), `or` (Odia)\n- **European:** `es` (Spanish)\n- `auto` — auto-detect from input text (recommended for code-switching)\n","title":"LightningV31RequestLanguage"},"LightningV31RequestOutputFormat":{"type":"string","enum":["mp3","pcm","wav","ulaw","alaw"],"default":"pcm","description":"Format of the returned audio. `pcm` is the lowest-latency option\nbut requires a decoder to play; `mp3` and `wav` are directly\nplayable in browsers and most media players. The server default\nis `pcm` when the field is omitted — the API playground uses\n`mp3` so the generated audio is directly playable.\n","title":"LightningV31RequestOutputFormat"},"LightningV31Request":{"type":"object","properties":{"text":{"type":"string","default":"Hey i am your a text to speech model","description":"The text to convert to speech."},"voice_id":{"type":"string","default":"daniel","description":"The voice identifier to use for speech generation."},"model":{"$ref":"#/components/schemas/LightningV31RequestModel","default":"lightning_v3.1","description":"TTS model to route the request to.\n\n- `lightning_v3.1` (default) — standard Lightning v3.1 pool.\n- `lightning_v3.1_pro` — Lightning v3.1 Pro pool with a curated\n voice catalog. See the\n [Pro model card](/waves/model-cards/text-to-speech/lightning-v-3-1-pro).\n\nNew integrations should use the unified\n`/waves/v1/tts` route instead of this endpoint, but the `model`\nfield is supported here for backwards-compatible Pro opt-in.\n"},"sample_rate":{"$ref":"#/components/schemas/LightningV31RequestSampleRate","default":44100,"description":"The sample rate for the generated audio."},"speed":{"type":"number","format":"double","default":1,"description":"The speed of the generated speech."},"language":{"$ref":"#/components/schemas/LightningV31RequestLanguage","default":"en","description":"Language code for synthesis. Influences pronunciation, number/date\nnormalization, and phoneme selection.\n\n- **Indian:** `en`, `hi`, `mr` (Marathi), `kn` (Kannada), `ta` (Tamil),\n `bn` (Bengali), `gu` (Gujarati), `te` (Telugu), `ml` (Malayalam),\n `pa` (Punjabi), `or` (Odia)\n- **European:** `es` (Spanish)\n- `auto` — auto-detect from input text (recommended for code-switching)\n"},"output_format":{"$ref":"#/components/schemas/LightningV31RequestOutputFormat","default":"pcm","description":"Format of the returned audio. `pcm` is the lowest-latency option\nbut requires a decoder to play; `mp3` and `wav` are directly\nplayable in browsers and most media players. The server default\nis `pcm` when the field is omitted — the API playground uses\n`mp3` so the generated audio is directly playable.\n"},"pronunciation_dicts":{"type":"array","items":{"type":"string"},"description":"The IDs of the pronunciation dictionaries to use for speech generation."},"session_id":{"type":"string","description":"Optional client-provided session identifier for correlation. Only alphanumeric characters, hyphens, underscores, and dots are allowed. Max 128 characters. Echoed back in response headers as `X-External-Session-Id`."},"request_id":{"type":"string","description":"Optional client-provided request identifier for correlation. Only alphanumeric characters, hyphens, underscores, and dots are allowed. Max 128 characters. Echoed back in response headers as `X-External-Request-Id`."}},"required":["text","voice_id"],"title":"LightningV31Request"},"SynthesizeLightningV31SpeechRequestBadRequestError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"SynthesizeLightningV31SpeechRequestBadRequestError"},"SynthesizeLightningV31SpeechRequestUnauthorizedError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"SynthesizeLightningV31SpeechRequestUnauthorizedError"},"SynthesizeLightningV31SpeechRequestInternalServerError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"SynthesizeLightningV31SpeechRequestInternalServerError"},"StreamLightningV31SpeechRequestBadRequestError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"StreamLightningV31SpeechRequestBadRequestError"},"StreamLightningV31SpeechRequestUnauthorizedError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"StreamLightningV31SpeechRequestUnauthorizedError"},"StreamLightningV31SpeechRequestInternalServerError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"StreamLightningV31SpeechRequestInternalServerError"},"Lightningv2RequestLanguage":{"type":"string","enum":["en","hi","ta","kn","mr","bn","gu","ar","he","fr","de","pl","ru","it","nl","es","sv","ml","te"],"default":"en","description":"Determines how numbers are spelled out. If set to 'en', numbers will be read as individual digits in English. If set to 'hi', numbers will be read as individual digits in Hindi.","title":"Lightningv2RequestLanguage"},"Lightningv2RequestOutputFormat":{"type":"string","enum":["pcm","mp3","wav","ulaw","alaw"],"default":"pcm","description":"The format of the output audio.","title":"Lightningv2RequestOutputFormat"},"Lightningv2Request":{"type":"object","properties":{"text":{"type":"string","default":"Hey i am your a text to speech model","description":"The text to convert to speech."},"voice_id":{"type":"string","default":"malcom","description":"The voice identifier to use for speech generation."},"sample_rate":{"type":"integer","default":24000,"description":"The sample rate for the generated audio."},"speed":{"type":"number","format":"double","default":1,"description":"The speed of the generated speech."},"consistency":{"type":"number","format":"double","default":0.5,"description":"This parameter controls word repetition and skipping. Decrease it to prevent skipped words, and increase it to prevent repetition."},"similarity":{"type":"number","format":"double","default":0,"description":"This parameter controls the similarity between the generated speech and the reference audio. Increase it to make the speech more similar to the reference audio."},"enhancement":{"type":"number","format":"double","default":1,"description":"Enhances speech quality at the cost of increased latency."},"language":{"$ref":"#/components/schemas/Lightningv2RequestLanguage","default":"en","description":"Determines how numbers are spelled out. If set to 'en', numbers will be read as individual digits in English. If set to 'hi', numbers will be read as individual digits in Hindi."},"output_format":{"$ref":"#/components/schemas/Lightningv2RequestOutputFormat","default":"pcm","description":"The format of the output audio."},"pronunciation_dicts":{"type":"array","items":{"type":"string"},"description":"The IDs of the pronunciation dictionaries to use for speech generation."}},"required":["text","voice_id"],"title":"Lightningv2Request"},"SynthesizeLightningv2SpeechRequestBadRequestError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"SynthesizeLightningv2SpeechRequestBadRequestError"},"SynthesizeLightningv2SpeechRequestUnauthorizedError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"SynthesizeLightningv2SpeechRequestUnauthorizedError"},"SynthesizeLightningv2SpeechRequestInternalServerError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"SynthesizeLightningv2SpeechRequestInternalServerError"},"StreamLightningv2SpeechRequestBadRequestError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"StreamLightningv2SpeechRequestBadRequestError"},"StreamLightningv2SpeechRequestUnauthorizedError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"StreamLightningv2SpeechRequestUnauthorizedError"},"StreamLightningv2SpeechRequestInternalServerError":{"type":"object","properties":{"error":{"type":"string","description":"Error type."},"message":{"type":"string","description":"Error message."}},"title":"StreamLightningv2SpeechRequestInternalServerError"},"WavesV1PulseGetTextPostParametersLanguage":{"type":"string","enum":["it","es","en","pt","hi","de","fr","uk","ru","kn","ml","pl","mr","gu","cs","sk","te","or","nl","bn","lv","et","ro","pa","fi","sv","bg","ta","hu","da","lt","mt","multi","multi-eu","multi-indic","multi-asian"],"default":"multi-eu","title":"WavesV1PulseGetTextPostParametersLanguage"},"WavesV1PulseGetTextPostParametersEncoding":{"type":"string","enum":["linear16","linear32","alaw","mulaw","opus","ogg_opus"],"title":"WavesV1PulseGetTextPostParametersEncoding"},"WavesV1PulseGetTextPostParametersGenderDetection":{"type":"string","enum":["true","false"],"default":"false","title":"WavesV1PulseGetTextPostParametersGenderDetection"},"WavesV1PulseGetTextPostParametersEmotionDetection":{"type":"string","enum":["true","false"],"default":"false","title":"WavesV1PulseGetTextPostParametersEmotionDetection"},"WavesV1PulseGetTextPostParametersFormat":{"type":"string","enum":["true","false"],"default":"true","title":"WavesV1PulseGetTextPostParametersFormat"},"WavesV1PulseGetTextPostParametersPunctuate":{"type":"string","enum":["true","false"],"default":"true","title":"WavesV1PulseGetTextPostParametersPunctuate"},"WavesV1PulseGetTextPostParametersCapitalize":{"type":"string","enum":["true","false"],"default":"true","title":"WavesV1PulseGetTextPostParametersCapitalize"},"WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaWordsItems":{"type":"object","properties":{"start":{"type":"number","format":"double"},"end":{"type":"number","format":"double"},"speaker":{"type":"string","description":"Speaker if diarization is enabled"},"word":{"type":"string"}},"title":"WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaWordsItems"},"WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaUtterancesItems":{"type":"object","properties":{"text":{"type":"string"},"start":{"type":"number","format":"double"},"end":{"type":"number","format":"double"},"speaker":{"type":"string","description":"Speaker if diarization is enabled"}},"title":"WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaUtterancesItems"},"WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaGender":{"type":"string","enum":["male","female"],"description":"Predicted gender of the speaker if requested","title":"WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaGender"},"WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaEmotions":{"type":"object","properties":{"happiness":{"type":"number","format":"double"},"sadness":{"type":"number","format":"double"},"disgust":{"type":"number","format":"double"},"fear":{"type":"number","format":"double"},"anger":{"type":"number","format":"double"}},"description":"Predicted emotions of the speaker if requested","title":"WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaEmotions"},"WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaMetadata":{"type":"object","properties":{"filename":{"type":"string","description":"Name of the audio file"},"duration":{"type":"number","format":"double","description":"Duration of the audio file in minutes"},"fileSize":{"type":"number","format":"double","description":"Size of the audio file in bytes"}},"description":"Metadata about the transcription","title":"WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaMetadata"},"Speech to Text_pulseSpeechToText_Response_200":{"type":"object","properties":{"status":{"type":"string","description":"Status of the transcription request"},"transcription":{"type":"string","description":"The transcribed text from the audio file"},"audio_length":{"type":"number","format":"double","description":"Duration of the audio file in seconds"},"words":{"type":"array","items":{"$ref":"#/components/schemas/WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaWordsItems"},"description":"Word-level timestamps in seconds."},"utterances":{"type":"array","items":{"$ref":"#/components/schemas/WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaUtterancesItems"},"description":"List of utterances with start and end times"},"gender":{"$ref":"#/components/schemas/WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaGender","description":"Predicted gender of the speaker if requested"},"emotions":{"$ref":"#/components/schemas/WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaEmotions","description":"Predicted emotions of the speaker if requested"},"metadata":{"$ref":"#/components/schemas/WavesV1PulseGetTextPostResponsesContentApplicationJsonSchemaMetadata","description":"Metadata about the transcription"}},"title":"Speech to Text_pulseSpeechToText_Response_200"},"ErrorResponseStatus":{"type":"string","enum":["error"],"title":"ErrorResponseStatus"},"ErrorResponseError":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"title":"ErrorResponseError"},"ErrorResponse":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/ErrorResponseStatus"},"error":{"$ref":"#/components/schemas/ErrorResponseError"}},"title":"ErrorResponse"},"WavesV1ModelGetVoicesGetParametersModel":{"type":"string","enum":["lightning-v3.1"],"default":"lightning-v3.1","title":"WavesV1ModelGetVoicesGetParametersModel"},"WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItemsTags":{"type":"object","properties":{"language":{"type":"array","items":{"type":"string"},"description":"Languages the voice was trained on (e.g., `[\"english\"]`, `[\"english\", \"hindi\"]`)."},"accent":{"type":"string","description":"Accent of the voice (e.g., `american`, `british`, `indian`)."},"gender":{"type":"string","description":"Gender of the voice (`male` or `female`)."},"age":{"type":"string","description":"Age range of the voice (e.g., `young`, `middle-aged`, `senior`)."},"emotions":{"type":"array","items":{"type":"string"},"description":"Emotional ranges the voice supports."},"usecases":{"type":"array","items":{"type":"string"},"description":"Recommended use cases for the voice (e.g., `conversational`, `narration`)."}},"description":"Tag metadata used to identify the voice's characteristics. Filter on these fields to find voices for a target language, accent, or use case.","title":"WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItemsTags"},"WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItems":{"type":"object","properties":{"voiceId":{"type":"string","description":"Unique Voice ID."},"displayName":{"type":"string","description":"Display name for the voice."},"tags":{"$ref":"#/components/schemas/WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItemsTags","description":"Tag metadata used to identify the voice's characteristics. Filter on these fields to find voices for a target language, accent, or use case."}},"required":["voiceId","displayName"],"title":"WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItems"},"Voices_getWavesVoices_Response_200":{"type":"object","properties":{"voices":{"type":"array","items":{"$ref":"#/components/schemas/WavesV1ModelGetVoicesGetResponsesContentApplicationJsonSchemaVoicesItems"},"description":"List of available voices."}},"title":"Voices_getWavesVoices_Response_200"},"GetWavesVoicesRequestBadRequestError":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"title":"GetWavesVoicesRequestBadRequestError"},"GetWavesVoicesRequestUnauthorizedError":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"title":"GetWavesVoicesRequestUnauthorizedError"},"GetWavesVoicesRequestInternalServerError":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"title":"GetWavesVoicesRequestInternalServerError"},"WavesV1VoiceCloningPostRequestBodyContentMultipartFormDataSchemaModel":{"type":"string","enum":["lightning-v3.1"],"default":"lightning-v3.1","description":"Voice cloning model. Defaults to `lightning-v3.1`.\n`lightning-v2` is accepted by the schema for historical\nreasons but is deprecated — the server returns 400 with\n`\"Voice cloning for lightning-v2 is deprecated. Please use lightning-v3.1\"`.\n","title":"WavesV1VoiceCloningPostRequestBodyContentMultipartFormDataSchemaModel"},"WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaDataStatus":{"type":"string","enum":["pending","processing","completed","failed"],"title":"WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaDataStatus"},"WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaDataSamplesItems":{"type":"object","properties":{"text":{"type":"string","description":"Text that was synthesized."},"audioUrl":{"type":"string","description":"Signed URL to the generated sample audio."}},"title":"WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaDataSamplesItems"},"WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"voiceId":{"type":"string","description":"Unique voice ID. Pass this as `voice_id` in TTS requests."},"displayName":{"type":"string"},"model":{"type":"string","description":"Internal model document for the cloned voice."},"status":{"$ref":"#/components/schemas/WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaDataStatus"},"language":{"type":"string"},"audioFileNames":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time"},"organizationId":{"type":"string"},"samples":{"type":"array","items":{"$ref":"#/components/schemas/WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaDataSamplesItems"},"description":"Pre-generated sample audio clips in the cloned voice."}},"title":"WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaData"},"Voice Cloning_createVoiceClone_Response_200":{"type":"object","properties":{"message":{"type":"string"},"data":{"$ref":"#/components/schemas/WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaData"}},"title":"Voice Cloning_createVoiceClone_Response_200"},"CreateVoiceCloneRequestBadRequestError":{"type":"object","properties":{"error":{"type":"string","description":"Error message."}},"title":"CreateVoiceCloneRequestBadRequestError"},"CreateVoiceCloneRequestUnauthorizedError":{"type":"object","properties":{"error":{"type":"string"}},"title":"CreateVoiceCloneRequestUnauthorizedError"},"WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaErrorCode":{"type":"string","enum":["voice_clone_timeout","voice_clone_error"],"description":"Present when a known failure mode occurred.","title":"WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaErrorCode"},"CreateVoiceCloneRequestInternalServerError":{"type":"object","properties":{"error":{"type":"string"},"error_code":{"$ref":"#/components/schemas/WavesV1VoiceCloningPostResponsesContentApplicationJsonSchemaErrorCode","description":"Present when a known failure mode occurred."}},"title":"CreateVoiceCloneRequestInternalServerError"},"WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItemsStatus":{"type":"string","enum":["pending","processing","completed","failed"],"title":"WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItemsStatus"},"WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItemsCloningType":{"type":"string","enum":["instant","professional"],"title":"WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItemsCloningType"},"WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItems":{"type":"object","properties":{"_id":{"type":"string"},"voiceId":{"type":"string"},"displayName":{"type":"string"},"description":{"type":"string"},"accent":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"language":{"type":"string"},"status":{"$ref":"#/components/schemas/WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItemsStatus"},"cloningType":{"$ref":"#/components/schemas/WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItemsCloningType"},"modelIds":{"type":"array","items":{"type":"string"},"description":"Models this clone is compatible with. `lightning-v3.1`\nis the current default. Older entries may list\n`lightning-large`.\n"},"createdAt":{"type":"string","format":"date-time"}},"title":"WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItems"},"Voice Cloning_listVoiceClones_Response_200":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WavesV1VoiceCloningGetResponsesContentApplicationJsonSchemaDataItems"}}},"title":"Voice Cloning_listVoiceClones_Response_200"},"Voice Cloning_deleteVoiceClone_Response_200":{"type":"object","properties":{"success":{"type":"boolean","description":"Status if the voice clone was deleted successfully."},"voiceId":{"type":"string","description":"Voice ID of the deleted voice clone."}},"required":["voiceId"],"title":"Voice Cloning_deleteVoiceClone_Response_200"},"DeleteVoiceCloneRequestBadRequestError":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"title":"DeleteVoiceCloneRequestBadRequestError"},"DeleteVoiceCloneRequestUnauthorizedError":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"title":"DeleteVoiceCloneRequestUnauthorizedError"},"DeleteVoiceCloneRequestInternalServerError":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"title":"DeleteVoiceCloneRequestInternalServerError"},"WavesV1LightningLargeAddVoicePostResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"voiceId":{"type":"string","description":"Unique Voice ID."},"model":{"type":"string","description":"Model used to generate the voice."},"status":{"type":"string","description":"Status of the voice creation."}},"required":["voiceId","model","status"],"title":"WavesV1LightningLargeAddVoicePostResponsesContentApplicationJsonSchemaData"},"Voice Cloning_addVoiceToModel_Response_200":{"type":"object","properties":{"message":{"type":"string","description":"Message if the voice clone was created successfully."},"data":{"$ref":"#/components/schemas/WavesV1LightningLargeAddVoicePostResponsesContentApplicationJsonSchemaData"}},"title":"Voice Cloning_addVoiceToModel_Response_200"},"AddVoiceToModelRequestBadRequestError":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"title":"AddVoiceToModelRequestBadRequestError"},"AddVoiceToModelRequestUnauthorizedError":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"title":"AddVoiceToModelRequestUnauthorizedError"},"AddVoiceToModelRequestInternalServerError":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"title":"AddVoiceToModelRequestInternalServerError"},"WavesV1LightningLargeGetClonedVoicesGetResponsesContentApplicationJsonSchemaVoicesItems":{"type":"object","properties":{"displayName":{"type":"string","description":"Display name for the voice."},"accent":{"type":"string","description":"Accent of the voice."},"tags":{"type":"array","items":{"type":"string"},"description":"List of tags associated with the voice."},"voiceId":{"type":"string","description":"Unique Voice ID."},"model":{"type":"string","description":"Model used to generate the voice."},"status":{"type":"string","description":"Status of the voice generation."},"createdAt":{"type":"string","format":"date-time","description":"Date and time the voice was created."}},"required":["displayName","voiceId"],"title":"WavesV1LightningLargeGetClonedVoicesGetResponsesContentApplicationJsonSchemaVoicesItems"},"Voice Cloning_getClonedVoices_Response_200":{"type":"object","properties":{"voices":{"type":"array","items":{"$ref":"#/components/schemas/WavesV1LightningLargeGetClonedVoicesGetResponsesContentApplicationJsonSchemaVoicesItems"},"description":"List of available voices."}},"title":"Voice Cloning_getClonedVoices_Response_200"},"GetClonedVoicesRequestBadRequestError":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"title":"GetClonedVoicesRequestBadRequestError"},"GetClonedVoicesRequestUnauthorizedError":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"title":"GetClonedVoicesRequestUnauthorizedError"},"GetClonedVoicesRequestInternalServerError":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Error message"}},"title":"GetClonedVoicesRequestInternalServerError"},"PronunciationItem":{"type":"object","properties":{"word":{"type":"string","description":"The word to be pronounced"},"pronunciation":{"type":"string","description":"The phonetic pronunciation of the word"}},"required":["word","pronunciation"],"title":"PronunciationItem"},"PronunciationDict":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the pronunciation dictionary"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PronunciationItem"},"description":"List of word-pronunciation pairs"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the dictionary was created"}},"required":["id","items","createdAt"],"title":"PronunciationDict"},"CreatePronunciationDictRequest":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PronunciationItem"},"description":"List of word-pronunciation pairs to create"}},"required":["items"],"title":"CreatePronunciationDictRequest"},"UpdatePronunciationDictRequest":{"type":"object","properties":{"id":{"type":"string","description":"ID of the pronunciation dictionary to update"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PronunciationItem"},"description":"Updated list of word-pronunciation pairs"}},"required":["id","items"],"title":"UpdatePronunciationDictRequest"},"UpdatePronunciationDictResponse":{"type":"object","properties":{"id":{"type":"string","description":"ID of the updated pronunciation dictionary"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PronunciationItem"},"description":"Updated list of word-pronunciation pairs"}},"required":["id","items"],"title":"UpdatePronunciationDictResponse"},"DeletePronunciationDictRequest":{"type":"object","properties":{"id":{"type":"string","description":"ID of the pronunciation dictionary to delete"}},"required":["id"],"title":"DeletePronunciationDictRequest"},"DeletePronunciationDictResponse":{"type":"object","properties":{"id":{"type":"string","description":"ID of the deleted pronunciation dictionary"},"deleted":{"type":"boolean","description":"Confirmation that the dictionary was deleted"}},"required":["id","deleted"],"title":"DeletePronunciationDictResponse"}},"securitySchemes":{"BearerAuth":{"type":"apiKey","in":"header","name":"Authorization"}}}} \ No newline at end of file