diff --git a/src/libs/SmallestAI/Generated/SmallestAI.AuthClient.CreateAccessToken.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.AuthClient.CreateAccessToken.g.cs index 6a1501b..b2bb903 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.AuthClient.CreateAccessToken.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.AuthClient.CreateAccessToken.g.cs @@ -69,7 +69,7 @@ partial void ProcessCreateAccessTokenResponseContent( /// -H "Content-Type: application/json" \
/// -d '{"ttl_seconds": 300}'
/// ```
- /// See the [Authentication guide](/models/api-reference/token-based-authentication)
+ /// See the [Authentication guide](/api-reference/token-based-authentication)
/// for the end-to-end server and client flow. /// /// @@ -119,7 +119,7 @@ partial void ProcessCreateAccessTokenResponseContent( /// -H "Content-Type: application/json" \
/// -d '{"ttl_seconds": 300}'
/// ```
- /// See the [Authentication guide](/models/api-reference/token-based-authentication)
+ /// See the [Authentication guide](/api-reference/token-based-authentication)
/// for the end-to-end server and client flow. /// /// @@ -700,7 +700,7 @@ partial void ProcessCreateAccessTokenResponseContent( /// -H "Content-Type: application/json" \
/// -d '{"ttl_seconds": 300}'
/// ```
- /// See the [Authentication guide](/models/api-reference/token-based-authentication)
+ /// See the [Authentication guide](/api-reference/token-based-authentication)
/// for the end-to-end server and client flow. /// /// diff --git a/src/libs/SmallestAI/Generated/SmallestAI.ElectronClient.Complete.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.ElectronClient.Complete.g.cs index 71c75c4..a6eaa63 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.ElectronClient.Complete.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.ElectronClient.Complete.g.cs @@ -53,7 +53,7 @@ partial void ProcessCompleteResponseContent( /// Tool calling follows OpenAI's `tools` array convention. When you
/// provide a voice-agent-style system prompt, Electron emits a short
/// filler phrase in the assistant message `content` field alongside
- /// `tool_calls` — see the [Tool Calling guide](/models/documentation/llm-electron/tool-function-calling)
+ /// `tool_calls` — see the [Tool Calling guide](/models/llm/tool-function-calling)
/// for the voice-agent pattern.
/// ## Examples
/// **cURL**
@@ -150,7 +150,7 @@ partial void ProcessCompleteResponseContent( /// Tool calling follows OpenAI's `tools` array convention. When you
/// provide a voice-agent-style system prompt, Electron emits a short
/// filler phrase in the assistant message `content` field alongside
- /// `tool_calls` — see the [Tool Calling guide](/models/documentation/llm-electron/tool-function-calling)
+ /// `tool_calls` — see the [Tool Calling guide](/models/llm/tool-function-calling)
/// for the voice-agent pattern.
/// ## Examples
/// **cURL**
@@ -596,7 +596,7 @@ partial void ProcessCompleteResponseContent( h => h.Key, h => h.Value)); } - // Rate limit (RPM) or concurrency cap hit. See [Concurrency and Limits](/models/api-reference/concurrency-and-limits). + // Rate limit (RPM) or concurrency cap hit. See [Concurrency and Limits](/api-reference/concurrency-and-limits). if ((int)__response.StatusCode == 429) { string? __content_429 = null; @@ -815,7 +815,7 @@ partial void ProcessCompleteResponseContent( /// Tool calling follows OpenAI's `tools` array convention. When you
/// provide a voice-agent-style system prompt, Electron emits a short
/// filler phrase in the assistant message `content` field alongside
- /// `tool_calls` — see the [Tool Calling guide](/models/documentation/llm-electron/tool-function-calling)
+ /// `tool_calls` — see the [Tool Calling guide](/models/llm/tool-function-calling)
/// for the voice-agent pattern.
/// ## Examples
/// **cURL**
@@ -901,7 +901,7 @@ partial void ProcessCompleteResponseContent( /// /// /// When true, response is `text/event-stream`. See the
- /// [Streaming guide](/models/documentation/llm-electron/streaming).
+ /// [Streaming guide](/models/llm/streaming).
/// Default Value: false /// /// @@ -911,7 +911,7 @@ partial void ProcessCompleteResponseContent( /// (`{type: "function", function: {name, description, parameters}}`)
/// is the recommended form and is what the examples below use.
/// The wire schema is permissive (`array<object>`) — any tools payload
- /// the upstream accepts will work. See [Tool Calling](/models/documentation/llm-electron/tool-function-calling)
+ /// the upstream accepts will work. See [Tool Calling](/models/llm/tool-function-calling)
/// for details. /// /// diff --git a/src/libs/SmallestAI/Generated/SmallestAI.IAuthClient.CreateAccessToken.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.IAuthClient.CreateAccessToken.g.cs index 260ba90..ab1c3e8 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.IAuthClient.CreateAccessToken.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.IAuthClient.CreateAccessToken.g.cs @@ -32,7 +32,7 @@ public partial interface IAuthClient /// -H "Content-Type: application/json" \
/// -d '{"ttl_seconds": 300}'
/// ```
- /// See the [Authentication guide](/models/api-reference/token-based-authentication)
+ /// See the [Authentication guide](/api-reference/token-based-authentication)
/// for the end-to-end server and client flow. /// /// @@ -72,7 +72,7 @@ public partial interface IAuthClient /// -H "Content-Type: application/json" \
/// -d '{"ttl_seconds": 300}'
/// ```
- /// See the [Authentication guide](/models/api-reference/token-based-authentication)
+ /// See the [Authentication guide](/api-reference/token-based-authentication)
/// for the end-to-end server and client flow. /// /// @@ -112,7 +112,7 @@ public partial interface IAuthClient /// -H "Content-Type: application/json" \
/// -d '{"ttl_seconds": 300}'
/// ```
- /// See the [Authentication guide](/models/api-reference/token-based-authentication)
+ /// See the [Authentication guide](/api-reference/token-based-authentication)
/// for the end-to-end server and client flow. /// /// diff --git a/src/libs/SmallestAI/Generated/SmallestAI.IElectronClient.Complete.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.IElectronClient.Complete.g.cs index 5c6b3d4..13d77e4 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.IElectronClient.Complete.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.IElectronClient.Complete.g.cs @@ -16,7 +16,7 @@ public partial interface IElectronClient /// Tool calling follows OpenAI's `tools` array convention. When you
/// provide a voice-agent-style system prompt, Electron emits a short
/// filler phrase in the assistant message `content` field alongside
- /// `tool_calls` — see the [Tool Calling guide](/models/documentation/llm-electron/tool-function-calling)
+ /// `tool_calls` — see the [Tool Calling guide](/models/llm/tool-function-calling)
/// for the voice-agent pattern.
/// ## Examples
/// **cURL**
@@ -103,7 +103,7 @@ public partial interface IElectronClient /// Tool calling follows OpenAI's `tools` array convention. When you
/// provide a voice-agent-style system prompt, Electron emits a short
/// filler phrase in the assistant message `content` field alongside
- /// `tool_calls` — see the [Tool Calling guide](/models/documentation/llm-electron/tool-function-calling)
+ /// `tool_calls` — see the [Tool Calling guide](/models/llm/tool-function-calling)
/// for the voice-agent pattern.
/// ## Examples
/// **cURL**
@@ -190,7 +190,7 @@ public partial interface IElectronClient /// Tool calling follows OpenAI's `tools` array convention. When you
/// provide a voice-agent-style system prompt, Electron emits a short
/// filler phrase in the assistant message `content` field alongside
- /// `tool_calls` — see the [Tool Calling guide](/models/documentation/llm-electron/tool-function-calling)
+ /// `tool_calls` — see the [Tool Calling guide](/models/llm/tool-function-calling)
/// for the voice-agent pattern.
/// ## Examples
/// **cURL**
@@ -276,7 +276,7 @@ public partial interface IElectronClient /// /// /// When true, response is `text/event-stream`. See the
- /// [Streaming guide](/models/documentation/llm-electron/streaming).
+ /// [Streaming guide](/models/llm/streaming).
/// Default Value: false /// /// @@ -286,7 +286,7 @@ public partial interface IElectronClient /// (`{type: "function", function: {name, description, parameters}}`)
/// is the recommended form and is what the examples below use.
/// The wire schema is permissive (`array<object>`) — any tools payload
- /// the upstream accepts will work. See [Tool Calling](/models/documentation/llm-electron/tool-function-calling)
+ /// the upstream accepts will work. See [Tool Calling](/models/llm/tool-function-calling)
/// for details. /// /// diff --git a/src/libs/SmallestAI/Generated/SmallestAI.ISpeechToTextClient.Transcribe.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.ISpeechToTextClient.Transcribe.g.cs index 8b281e0..d26f6c5 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.ISpeechToTextClient.Transcribe.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.ISpeechToTextClient.Transcribe.g.cs @@ -8,10 +8,10 @@ public partial interface ISpeechToTextClient /// Transcribe (Pre-recorded)
/// Transcribe an audio file. The model is chosen via `?model=`:
/// - `?model=pulse-pro`: English-only, leaderboard-ranked accuracy. Raw bytes only; pass `webhook_url` to receive transcription asynchronously on long files.
- /// - `?model=pulse`: multilingual transcription (21 streaming + 26 pre-recorded languages), supports both raw bytes and audio-by-URL.
+ /// - `?model=pulse`: multilingual transcription (21 streaming + 12 pre-recorded languages), supports both raw bytes and audio-by-URL.
/// ## When to use this
- /// Use 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 (`WS /waves/v1/stt/live`) instead.
- /// Pulse Pro has no streaming worker today; calls to `WS /waves/v1/stt/live?model=pulse-pro` return `400` before the WebSocket upgrades.
+ /// Use 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 (`WS /waves/v1/stt/live?model=pulse`).
+ /// Pulse Pro is HTTP-only.
/// ## Input methods
/// - **Raw bytes**: `Content-Type: application/octet-stream` with the audio in the body. All knobs are query parameters.
/// - **URL (`?model=pulse` only)**: `Content-Type: application/json` with `{"url": "..."}` in the body.
@@ -66,9 +66,8 @@ public partial interface ISpeechToTextClient /// ```
/// ## Common gotchas
/// - **`model` is required.** Missing or invalid values return `400` with an enum-validation error.
- /// - **Pulse Pro is English only.** Pass `language=en`. Other language codes are accepted at the wire level but produce unpredictable output.
- /// - **Pulse Pro does not support audio-by-URL.** Send raw bytes or use `?model=pulse` for the URL flow.
- /// - **Max payload 250 MB.** Larger requests return `413`. Compress to mono 16 kHz PCM if you are close to the limit; quality is unaffected. + /// - **Pulse Pro is English only.** Pass `language=en`. Any other value returns `400 invalid_enum_value` (`Expected 'en', received '<x>'`).
+ /// - **Pulse Pro does not support audio-by-URL.** Send raw bytes or use `?model=pulse` for the URL flow. /// /// /// @@ -103,11 +102,11 @@ public partial interface ISpeechToTextClient /// global::System.Threading.Tasks.Task TranscribeAsync( global::SmallestAI.WavesV1SttPostParametersModel model, - global::SmallestAI.WavesV1SttPostParametersLanguage language, byte[] request, - bool? wordTimestamps = default, - bool? diarize = default, + global::SmallestAI.WavesV1SttPostParametersLanguage? language = default, + global::SmallestAI.WavesV1SttPostParametersWordTimestamps? wordTimestamps = default, + global::SmallestAI.WavesV1SttPostParametersDiarize? diarize = default, string? keywords = default, string? webhookUrl = default, global::SmallestAI.WavesV1SttPostParametersWebhookMethod? webhookMethod = default, @@ -123,10 +122,10 @@ public partial interface ISpeechToTextClient /// Transcribe (Pre-recorded)
/// Transcribe an audio file. The model is chosen via `?model=`:
/// - `?model=pulse-pro`: English-only, leaderboard-ranked accuracy. Raw bytes only; pass `webhook_url` to receive transcription asynchronously on long files.
- /// - `?model=pulse`: multilingual transcription (21 streaming + 26 pre-recorded languages), supports both raw bytes and audio-by-URL.
+ /// - `?model=pulse`: multilingual transcription (21 streaming + 12 pre-recorded languages), supports both raw bytes and audio-by-URL.
/// ## When to use this
- /// Use 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 (`WS /waves/v1/stt/live`) instead.
- /// Pulse Pro has no streaming worker today; calls to `WS /waves/v1/stt/live?model=pulse-pro` return `400` before the WebSocket upgrades.
+ /// Use 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 (`WS /waves/v1/stt/live?model=pulse`).
+ /// Pulse Pro is HTTP-only.
/// ## Input methods
/// - **Raw bytes**: `Content-Type: application/octet-stream` with the audio in the body. All knobs are query parameters.
/// - **URL (`?model=pulse` only)**: `Content-Type: application/json` with `{"url": "..."}` in the body.
@@ -181,9 +180,8 @@ public partial interface ISpeechToTextClient /// ```
/// ## Common gotchas
/// - **`model` is required.** Missing or invalid values return `400` with an enum-validation error.
- /// - **Pulse Pro is English only.** Pass `language=en`. Other language codes are accepted at the wire level but produce unpredictable output.
- /// - **Pulse Pro does not support audio-by-URL.** Send raw bytes or use `?model=pulse` for the URL flow.
- /// - **Max payload 250 MB.** Larger requests return `413`. Compress to mono 16 kHz PCM if you are close to the limit; quality is unaffected. + /// - **Pulse Pro is English only.** Pass `language=en`. Any other value returns `400 invalid_enum_value` (`Expected 'en', received '<x>'`).
+ /// - **Pulse Pro does not support audio-by-URL.** Send raw bytes or use `?model=pulse` for the URL flow. /// /// /// @@ -218,11 +216,11 @@ public partial interface ISpeechToTextClient /// global::System.Threading.Tasks.Task> TranscribeAsResponseAsync( global::SmallestAI.WavesV1SttPostParametersModel model, - global::SmallestAI.WavesV1SttPostParametersLanguage language, byte[] request, - bool? wordTimestamps = default, - bool? diarize = default, + global::SmallestAI.WavesV1SttPostParametersLanguage? language = default, + global::SmallestAI.WavesV1SttPostParametersWordTimestamps? wordTimestamps = default, + global::SmallestAI.WavesV1SttPostParametersDiarize? diarize = default, string? keywords = default, string? webhookUrl = default, global::SmallestAI.WavesV1SttPostParametersWebhookMethod? webhookMethod = default, diff --git a/src/libs/SmallestAI/Generated/SmallestAI.ISpeechToTextClient.TranscribeWithJson.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.ISpeechToTextClient.TranscribeWithJson.g.cs index 74c467c..f69051a 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.ISpeechToTextClient.TranscribeWithJson.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.ISpeechToTextClient.TranscribeWithJson.g.cs @@ -8,10 +8,10 @@ public partial interface ISpeechToTextClient /// Transcribe (Pre-recorded)
/// Transcribe an audio file. The model is chosen via `?model=`:
/// - `?model=pulse-pro`: English-only, leaderboard-ranked accuracy. Raw bytes only; pass `webhook_url` to receive transcription asynchronously on long files.
- /// - `?model=pulse`: multilingual transcription (21 streaming + 26 pre-recorded languages), supports both raw bytes and audio-by-URL.
+ /// - `?model=pulse`: multilingual transcription (21 streaming + 12 pre-recorded languages), supports both raw bytes and audio-by-URL.
/// ## When to use this
- /// Use 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 (`WS /waves/v1/stt/live`) instead.
- /// Pulse Pro has no streaming worker today; calls to `WS /waves/v1/stt/live?model=pulse-pro` return `400` before the WebSocket upgrades.
+ /// Use 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 (`WS /waves/v1/stt/live?model=pulse`).
+ /// Pulse Pro is HTTP-only.
/// ## Input methods
/// - **Raw bytes**: `Content-Type: application/octet-stream` with the audio in the body. All knobs are query parameters.
/// - **URL (`?model=pulse` only)**: `Content-Type: application/json` with `{"url": "..."}` in the body.
@@ -66,9 +66,8 @@ public partial interface ISpeechToTextClient /// ```
/// ## Common gotchas
/// - **`model` is required.** Missing or invalid values return `400` with an enum-validation error.
- /// - **Pulse Pro is English only.** Pass `language=en`. Other language codes are accepted at the wire level but produce unpredictable output.
- /// - **Pulse Pro does not support audio-by-URL.** Send raw bytes or use `?model=pulse` for the URL flow.
- /// - **Max payload 250 MB.** Larger requests return `413`. Compress to mono 16 kHz PCM if you are close to the limit; quality is unaffected. + /// - **Pulse Pro is English only.** Pass `language=en`. Any other value returns `400 invalid_enum_value` (`Expected 'en', received '<x>'`).
+ /// - **Pulse Pro does not support audio-by-URL.** Send raw bytes or use `?model=pulse` for the URL flow. /// /// /// @@ -103,11 +102,11 @@ public partial interface ISpeechToTextClient /// global::System.Threading.Tasks.Task TranscribeWithJsonAsync( global::SmallestAI.WavesV1SttPostParametersModel model, - global::SmallestAI.WavesV1SttPostParametersLanguage language, global::SmallestAI.TranscriptionUrlRequest request, - bool? wordTimestamps = default, - bool? diarize = default, + global::SmallestAI.WavesV1SttPostParametersLanguage? language = default, + global::SmallestAI.WavesV1SttPostParametersWordTimestamps? wordTimestamps = default, + global::SmallestAI.WavesV1SttPostParametersDiarize? diarize = default, string? keywords = default, string? webhookUrl = default, global::SmallestAI.WavesV1SttPostParametersWebhookMethod? webhookMethod = default, @@ -123,10 +122,10 @@ public partial interface ISpeechToTextClient /// Transcribe (Pre-recorded)
/// Transcribe an audio file. The model is chosen via `?model=`:
/// - `?model=pulse-pro`: English-only, leaderboard-ranked accuracy. Raw bytes only; pass `webhook_url` to receive transcription asynchronously on long files.
- /// - `?model=pulse`: multilingual transcription (21 streaming + 26 pre-recorded languages), supports both raw bytes and audio-by-URL.
+ /// - `?model=pulse`: multilingual transcription (21 streaming + 12 pre-recorded languages), supports both raw bytes and audio-by-URL.
/// ## When to use this
- /// Use 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 (`WS /waves/v1/stt/live`) instead.
- /// Pulse Pro has no streaming worker today; calls to `WS /waves/v1/stt/live?model=pulse-pro` return `400` before the WebSocket upgrades.
+ /// Use 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 (`WS /waves/v1/stt/live?model=pulse`).
+ /// Pulse Pro is HTTP-only.
/// ## Input methods
/// - **Raw bytes**: `Content-Type: application/octet-stream` with the audio in the body. All knobs are query parameters.
/// - **URL (`?model=pulse` only)**: `Content-Type: application/json` with `{"url": "..."}` in the body.
@@ -181,9 +180,8 @@ public partial interface ISpeechToTextClient /// ```
/// ## Common gotchas
/// - **`model` is required.** Missing or invalid values return `400` with an enum-validation error.
- /// - **Pulse Pro is English only.** Pass `language=en`. Other language codes are accepted at the wire level but produce unpredictable output.
- /// - **Pulse Pro does not support audio-by-URL.** Send raw bytes or use `?model=pulse` for the URL flow.
- /// - **Max payload 250 MB.** Larger requests return `413`. Compress to mono 16 kHz PCM if you are close to the limit; quality is unaffected. + /// - **Pulse Pro is English only.** Pass `language=en`. Any other value returns `400 invalid_enum_value` (`Expected 'en', received '<x>'`).
+ /// - **Pulse Pro does not support audio-by-URL.** Send raw bytes or use `?model=pulse` for the URL flow. /// /// /// @@ -218,11 +216,11 @@ public partial interface ISpeechToTextClient /// global::System.Threading.Tasks.Task> TranscribeWithJsonAsResponseAsync( global::SmallestAI.WavesV1SttPostParametersModel model, - global::SmallestAI.WavesV1SttPostParametersLanguage language, global::SmallestAI.TranscriptionUrlRequest request, - bool? wordTimestamps = default, - bool? diarize = default, + global::SmallestAI.WavesV1SttPostParametersLanguage? language = default, + global::SmallestAI.WavesV1SttPostParametersWordTimestamps? wordTimestamps = default, + global::SmallestAI.WavesV1SttPostParametersDiarize? diarize = default, string? keywords = default, string? webhookUrl = default, global::SmallestAI.WavesV1SttPostParametersWebhookMethod? webhookMethod = default, @@ -238,10 +236,10 @@ public partial interface ISpeechToTextClient /// Transcribe (Pre-recorded)
/// Transcribe an audio file. The model is chosen via `?model=`:
/// - `?model=pulse-pro`: English-only, leaderboard-ranked accuracy. Raw bytes only; pass `webhook_url` to receive transcription asynchronously on long files.
- /// - `?model=pulse`: multilingual transcription (21 streaming + 26 pre-recorded languages), supports both raw bytes and audio-by-URL.
+ /// - `?model=pulse`: multilingual transcription (21 streaming + 12 pre-recorded languages), supports both raw bytes and audio-by-URL.
/// ## When to use this
- /// Use 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 (`WS /waves/v1/stt/live`) instead.
- /// Pulse Pro has no streaming worker today; calls to `WS /waves/v1/stt/live?model=pulse-pro` return `400` before the WebSocket upgrades.
+ /// Use 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 (`WS /waves/v1/stt/live?model=pulse`).
+ /// Pulse Pro is HTTP-only.
/// ## Input methods
/// - **Raw bytes**: `Content-Type: application/octet-stream` with the audio in the body. All knobs are query parameters.
/// - **URL (`?model=pulse` only)**: `Content-Type: application/json` with `{"url": "..."}` in the body.
@@ -296,9 +294,8 @@ public partial interface ISpeechToTextClient /// ```
/// ## Common gotchas
/// - **`model` is required.** Missing or invalid values return `400` with an enum-validation error.
- /// - **Pulse Pro is English only.** Pass `language=en`. Other language codes are accepted at the wire level but produce unpredictable output.
- /// - **Pulse Pro does not support audio-by-URL.** Send raw bytes or use `?model=pulse` for the URL flow.
- /// - **Max payload 250 MB.** Larger requests return `413`. Compress to mono 16 kHz PCM if you are close to the limit; quality is unaffected. + /// - **Pulse Pro is English only.** Pass `language=en`. Any other value returns `400 invalid_enum_value` (`Expected 'en', received '<x>'`).
+ /// - **Pulse Pro does not support audio-by-URL.** Send raw bytes or use `?model=pulse` for the URL flow. /// /// /// @@ -335,10 +332,10 @@ public partial interface ISpeechToTextClient /// global::System.Threading.Tasks.Task TranscribeWithJsonAsync( global::SmallestAI.WavesV1SttPostParametersModel model, - global::SmallestAI.WavesV1SttPostParametersLanguage language, string url, - bool? wordTimestamps = default, - bool? diarize = default, + global::SmallestAI.WavesV1SttPostParametersLanguage? language = default, + global::SmallestAI.WavesV1SttPostParametersWordTimestamps? wordTimestamps = default, + global::SmallestAI.WavesV1SttPostParametersDiarize? diarize = default, string? keywords = default, string? webhookUrl = default, global::SmallestAI.WavesV1SttPostParametersWebhookMethod? webhookMethod = default, diff --git a/src/libs/SmallestAI/Generated/SmallestAI.ITextToSpeechClient.SynthesizeSpeech.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.ITextToSpeechClient.SynthesizeSpeech.g.cs index 2bad83c..e61d239 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.ITextToSpeechClient.SynthesizeSpeech.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.ITextToSpeechClient.SynthesizeSpeech.g.cs @@ -8,7 +8,7 @@ public partial interface ITextToSpeechClient /// 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.
- /// **Language behaviour on `lightning_v3.1_pro`:** pass `language: en` for UK + American accented English, pass `language: hi` for Indian accented English + Hindi (code-switching), or omit `language` to default to `en + hi` (mixed Indian + Western English coverage). Pro supports 31 languages total (10 Indic, 8 Asian & Middle Eastern, 13 European including Dutch and Swedish). Pass the matching ISO 639-1 code (e.g. `ta`, `de`, `ja`) with a Pro voice from that language, or use `auto` to route across all supported languages with any English or Hindi voice. See the [Lightning v3.1 Pro model card](/models/model-cards/text-to-speech/lightning-v-3-1-pro#supported-languages) for the full list. On `lightning_v3.1` the model accepts 20 language codes (10 European + 10 Indic) plus `auto`; the trained voice catalog covers 12 of those directly.
+ /// **Language behaviour on `lightning_v3.1_pro`:** pass `language: en` for UK + American accented English, pass `language: hi` for Indian accented English + Hindi (code-switching), or omit `language` to default to `en + hi` (mixed Indian + Western English coverage). Pro supports 31 languages total (10 Indic, 8 Asian & Middle Eastern, 13 European including Dutch and Swedish). Pass the matching ISO 639-1 code (e.g. `ta`, `de`, `ja`) with a Pro voice from that language, or use `auto` to route across all supported languages with any English or Hindi voice. See the [Lightning v3.1 Pro model card](/model-cards/text-to-speech/lightning-v-3-1-pro#supported-languages) for the full list. On `lightning_v3.1` the model accepts 20 language codes (10 European + 10 Indic) plus `auto`; the trained voice catalog covers 12 of those directly.
/// ## 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).
@@ -105,7 +105,7 @@ public partial interface ITextToSpeechClient /// 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.
- /// **Language behaviour on `lightning_v3.1_pro`:** pass `language: en` for UK + American accented English, pass `language: hi` for Indian accented English + Hindi (code-switching), or omit `language` to default to `en + hi` (mixed Indian + Western English coverage). Pro supports 31 languages total (10 Indic, 8 Asian & Middle Eastern, 13 European including Dutch and Swedish). Pass the matching ISO 639-1 code (e.g. `ta`, `de`, `ja`) with a Pro voice from that language, or use `auto` to route across all supported languages with any English or Hindi voice. See the [Lightning v3.1 Pro model card](/models/model-cards/text-to-speech/lightning-v-3-1-pro#supported-languages) for the full list. On `lightning_v3.1` the model accepts 20 language codes (10 European + 10 Indic) plus `auto`; the trained voice catalog covers 12 of those directly.
+ /// **Language behaviour on `lightning_v3.1_pro`:** pass `language: en` for UK + American accented English, pass `language: hi` for Indian accented English + Hindi (code-switching), or omit `language` to default to `en + hi` (mixed Indian + Western English coverage). Pro supports 31 languages total (10 Indic, 8 Asian & Middle Eastern, 13 European including Dutch and Swedish). Pass the matching ISO 639-1 code (e.g. `ta`, `de`, `ja`) with a Pro voice from that language, or use `auto` to route across all supported languages with any English or Hindi voice. See the [Lightning v3.1 Pro model card](/model-cards/text-to-speech/lightning-v-3-1-pro#supported-languages) for the full list. On `lightning_v3.1` the model accepts 20 language codes (10 European + 10 Indic) plus `auto`; the trained voice catalog covers 12 of those directly.
/// ## 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).
@@ -202,7 +202,7 @@ public partial interface ITextToSpeechClient /// 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.
- /// **Language behaviour on `lightning_v3.1_pro`:** pass `language: en` for UK + American accented English, pass `language: hi` for Indian accented English + Hindi (code-switching), or omit `language` to default to `en + hi` (mixed Indian + Western English coverage). Pro supports 31 languages total (10 Indic, 8 Asian & Middle Eastern, 13 European including Dutch and Swedish). Pass the matching ISO 639-1 code (e.g. `ta`, `de`, `ja`) with a Pro voice from that language, or use `auto` to route across all supported languages with any English or Hindi voice. See the [Lightning v3.1 Pro model card](/models/model-cards/text-to-speech/lightning-v-3-1-pro#supported-languages) for the full list. On `lightning_v3.1` the model accepts 20 language codes (10 European + 10 Indic) plus `auto`; the trained voice catalog covers 12 of those directly.
+ /// **Language behaviour on `lightning_v3.1_pro`:** pass `language: en` for UK + American accented English, pass `language: hi` for Indian accented English + Hindi (code-switching), or omit `language` to default to `en + hi` (mixed Indian + Western English coverage). Pro supports 31 languages total (10 Indic, 8 Asian & Middle Eastern, 13 European including Dutch and Swedish). Pass the matching ISO 639-1 code (e.g. `ta`, `de`, `ja`) with a Pro voice from that language, or use `auto` to route across all supported languages with any English or Hindi voice. See the [Lightning v3.1 Pro model card](/model-cards/text-to-speech/lightning-v-3-1-pro#supported-languages) for the full list. On `lightning_v3.1` the model accepts 20 language codes (10 European + 10 Indic) plus `auto`; the trained voice catalog covers 12 of those directly.
/// ## 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).
@@ -299,7 +299,7 @@ public partial interface ITextToSpeechClient /// 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.
- /// **Language behaviour on `lightning_v3.1_pro`:** pass `language: en` for UK + American accented English, pass `language: hi` for Indian accented English + Hindi (code-switching), or omit `language` to default to `en + hi` (mixed Indian + Western English coverage). Pro supports 31 languages total (10 Indic, 8 Asian & Middle Eastern, 13 European including Dutch and Swedish). Pass the matching ISO 639-1 code (e.g. `ta`, `de`, `ja`) with a Pro voice from that language, or use `auto` to route across all supported languages with any English or Hindi voice. See the [Lightning v3.1 Pro model card](/models/model-cards/text-to-speech/lightning-v-3-1-pro#supported-languages) for the full list. On `lightning_v3.1` the model accepts 20 language codes (10 European + 10 Indic) plus `auto`; the trained voice catalog covers 12 of those directly.
+ /// **Language behaviour on `lightning_v3.1_pro`:** pass `language: en` for UK + American accented English, pass `language: hi` for Indian accented English + Hindi (code-switching), or omit `language` to default to `en + hi` (mixed Indian + Western English coverage). Pro supports 31 languages total (10 Indic, 8 Asian & Middle Eastern, 13 European including Dutch and Swedish). Pass the matching ISO 639-1 code (e.g. `ta`, `de`, `ja`) with a Pro voice from that language, or use `auto` to route across all supported languages with any English or Hindi voice. See the [Lightning v3.1 Pro model card](/model-cards/text-to-speech/lightning-v-3-1-pro#supported-languages) for the full list. On `lightning_v3.1` the model accepts 20 language codes (10 European + 10 Indic) plus `auto`; the trained voice catalog covers 12 of those directly.
/// ## 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).
@@ -395,7 +395,7 @@ public partial interface ITextToSpeechClient /// - `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](/models/model-cards/text-to-speech/lightning-v-3-1-pro)
+ /// [Lightning v3.1 Pro model card](/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.
@@ -482,7 +482,7 @@ public partial interface ITextToSpeechClient /// wrong-glyph `x`/`X`) fire glued or spaced (`5x3`, `5 x 3`).
/// The ambiguous `-` `–` `−` and `/` fire only when
/// space-padded, so `5-3` stays a range and `1/2` stays a
- /// fraction. See [Math notation](/models/documentation/text-to-speech-lightning/math-notation)
+ /// fraction. See [Math notation](/models/text-to-speech/math-notation)
/// for the full lexicon, known limitations (product dimensions,
/// `24x7` idiom, vehicle-reg codes), and EU-language
/// localizations.
@@ -499,7 +499,7 @@ public partial interface ITextToSpeechClient /// `action: "flag"` synthesizes normally and records the match.
/// Matching is whole-word, not substring. If no verdict is returned
/// the request fails open and the audio is synthesized unfiltered.
- /// See [Content filter](/models/documentation/text-to-speech-lightning/content-filter). + /// See [Content filter](/models/text-to-speech/content-filter). /// /// /// Format of the returned audio. `pcm` is the lowest-latency option
@@ -513,7 +513,7 @@ public partial interface ITextToSpeechClient /// The IDs of the pronunciation dictionaries to use for speech generation. Available on both `lightning_v3.1` and `lightning_v3.1_pro`. /// /// - /// **WebSocket-only feature.** Accepted on this endpoint but ignored — no per-word timing information is returned in the sync HTTP or SSE response shape. To receive `status: "word_timestamp"` frames with per-word `{ id, word, start, end }` data, use the WebSocket endpoint `wss://api.smallest.ai/waves/v1/tts/live`. See [Word-level timestamps](/models/documentation/text-to-speech-lightning/word-timestamps).
+ /// **WebSocket-only feature.** Accepted on this endpoint but ignored — no per-word timing information is returned in the sync HTTP or SSE response shape. To receive `status: "word_timestamp"` frames with per-word `{ id, word, start, end }` data, use the WebSocket endpoint `wss://api.smallest.ai/waves/v1/tts/live`. See [Word-level timestamps](/models/text-to-speech/word-timestamps).
/// Default Value: false /// /// diff --git a/src/libs/SmallestAI/Generated/SmallestAI.ITextToSpeechClient.SynthesizeSpeechSse.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.ITextToSpeechClient.SynthesizeSpeechSse.g.cs index c463307..983f4be 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.ITextToSpeechClient.SynthesizeSpeechSse.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.ITextToSpeechClient.SynthesizeSpeechSse.g.cs @@ -9,7 +9,7 @@ public partial interface ITextToSpeechClient /// Synthesize speech and stream the audio back over Server-Sent Events. Same body as `/waves/v1/tts` — the only difference is the response is a stream of base64-encoded PCM chunks instead of one binary blob.
/// Pick the model with the `model` body parameter, same as the sync route.
/// <Note>
- /// **The same URL serves the WebSocket endpoint.** `wss://api.smallest.ai/waves/v1/tts/live` accepts a WebSocket upgrade for streaming-text scenarios (LLM token streams, live captioning). The HTTP `POST` documented on this page returns SSE; use `wss://` to use the WebSocket protocol instead. See the [WebSocket reference](/models/documentation/text-to-speech-lightning/streaming).
+ /// **The same URL serves the WebSocket endpoint.** `wss://api.smallest.ai/waves/v1/tts/live` accepts a WebSocket upgrade for streaming-text scenarios (LLM token streams, live captioning). The HTTP `POST` documented on this page returns SSE; use `wss://` to use the WebSocket protocol instead. See the [WebSocket reference](/models/text-to-speech/streaming).
/// </Note>
/// ## When to use this
/// - **Use this** when you want playback to start before synthesis is complete — long passages, latency-sensitive UI, live narration.
@@ -54,7 +54,7 @@ public partial interface ITextToSpeechClient /// Synthesize speech and stream the audio back over Server-Sent Events. Same body as `/waves/v1/tts` — the only difference is the response is a stream of base64-encoded PCM chunks instead of one binary blob.
/// Pick the model with the `model` body parameter, same as the sync route.
/// <Note>
- /// **The same URL serves the WebSocket endpoint.** `wss://api.smallest.ai/waves/v1/tts/live` accepts a WebSocket upgrade for streaming-text scenarios (LLM token streams, live captioning). The HTTP `POST` documented on this page returns SSE; use `wss://` to use the WebSocket protocol instead. See the [WebSocket reference](/models/documentation/text-to-speech-lightning/streaming).
+ /// **The same URL serves the WebSocket endpoint.** `wss://api.smallest.ai/waves/v1/tts/live` accepts a WebSocket upgrade for streaming-text scenarios (LLM token streams, live captioning). The HTTP `POST` documented on this page returns SSE; use `wss://` to use the WebSocket protocol instead. See the [WebSocket reference](/models/text-to-speech/streaming).
/// </Note>
/// ## When to use this
/// - **Use this** when you want playback to start before synthesis is complete — long passages, latency-sensitive UI, live narration.
@@ -98,7 +98,7 @@ public partial interface ITextToSpeechClient /// - `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](/models/model-cards/text-to-speech/lightning-v-3-1-pro)
+ /// [Lightning v3.1 Pro model card](/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.
@@ -185,7 +185,7 @@ public partial interface ITextToSpeechClient /// wrong-glyph `x`/`X`) fire glued or spaced (`5x3`, `5 x 3`).
/// The ambiguous `-` `–` `−` and `/` fire only when
/// space-padded, so `5-3` stays a range and `1/2` stays a
- /// fraction. See [Math notation](/models/documentation/text-to-speech-lightning/math-notation)
+ /// fraction. See [Math notation](/models/text-to-speech/math-notation)
/// for the full lexicon, known limitations (product dimensions,
/// `24x7` idiom, vehicle-reg codes), and EU-language
/// localizations.
@@ -202,7 +202,7 @@ public partial interface ITextToSpeechClient /// `action: "flag"` synthesizes normally and records the match.
/// Matching is whole-word, not substring. If no verdict is returned
/// the request fails open and the audio is synthesized unfiltered.
- /// See [Content filter](/models/documentation/text-to-speech-lightning/content-filter). + /// See [Content filter](/models/text-to-speech/content-filter). /// /// /// Format of the returned audio. `pcm` is the lowest-latency option
@@ -216,7 +216,7 @@ public partial interface ITextToSpeechClient /// The IDs of the pronunciation dictionaries to use for speech generation. Available on both `lightning_v3.1` and `lightning_v3.1_pro`. /// /// - /// **WebSocket-only feature.** Accepted on this endpoint but ignored — no per-word timing information is returned in the sync HTTP or SSE response shape. To receive `status: "word_timestamp"` frames with per-word `{ id, word, start, end }` data, use the WebSocket endpoint `wss://api.smallest.ai/waves/v1/tts/live`. See [Word-level timestamps](/models/documentation/text-to-speech-lightning/word-timestamps).
+ /// **WebSocket-only feature.** Accepted on this endpoint but ignored — no per-word timing information is returned in the sync HTTP or SSE response shape. To receive `status: "word_timestamp"` frames with per-word `{ id, word, start, end }` data, use the WebSocket endpoint `wss://api.smallest.ai/waves/v1/tts/live`. See [Word-level timestamps](/models/text-to-speech/word-timestamps).
/// Default Value: false /// /// diff --git a/src/libs/SmallestAI/Generated/SmallestAI.IVoicesClient.GetWavesVoices.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.IVoicesClient.GetWavesVoices.g.cs index dda4fce..ab75c0d 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.IVoicesClient.GetWavesVoices.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.IVoicesClient.GetWavesVoices.g.cs @@ -10,8 +10,8 @@ public partial interface IVoicesClient /// - `lightning-v3.1` — the Standard catalog. Supports voice cloning; 20 language codes.
/// - `lightning-v3.1-pro` — the Pro catalog. Curated set across American, British, and Indian accents plus 29 additional languages. Same latency and concurrency as Standard, on dedicated inference.
/// The endpoint is pool-scoped: `/waves/v1/lightning-v3.1/get_voices` returns Standard voices only; `/waves/v1/lightning-v3.1-pro/get_voices` returns Pro voices only. Call one or both depending on which pool you plan to use.
- /// Each voice carries tags (`language`, `accent`, `gender`, `age`, `emotions`, `usecases`). Filter client-side to find the voices that match a target language, accent, or use case. Pass the returned `voiceId` as `voice_id` on the unified [`POST /waves/v1/tts`](/models/api-reference/text-to-speech/synthesize-speech) route, together with `"model": "lightning_v3.1"` (Standard) or `"model": "lightning_v3.1_pro"` (Pro).
- /// For the canonical per-language voice list (with previews and recommended pairings), see the [Lightning v3.1](/models/model-cards/text-to-speech/lightning-v-3-1) and [Lightning v3.1 Pro](/models/model-cards/text-to-speech/lightning-v-3-1-pro) model cards. + /// Each voice carries tags (`language`, `accent`, `gender`, `age`, `emotions`, `usecases`). Filter client-side to find the voices that match a target language, accent, or use case. Pass the returned `voiceId` as `voice_id` on the unified [`POST /waves/v1/tts`](/api-reference/models/text-to-speech/synthesize-speech) route, together with `"model": "lightning_v3.1"` (Standard) or `"model": "lightning_v3.1_pro"` (Pro).
+ /// For the canonical per-language voice list (with previews and recommended pairings), see the [Lightning v3.1](/model-cards/text-to-speech/lightning-v-3-1) and [Lightning v3.1 Pro](/model-cards/text-to-speech/lightning-v-3-1-pro) model cards. /// /// /// Default Value: lightning-v3.1 @@ -29,8 +29,8 @@ public partial interface IVoicesClient /// - `lightning-v3.1` — the Standard catalog. Supports voice cloning; 20 language codes.
/// - `lightning-v3.1-pro` — the Pro catalog. Curated set across American, British, and Indian accents plus 29 additional languages. Same latency and concurrency as Standard, on dedicated inference.
/// The endpoint is pool-scoped: `/waves/v1/lightning-v3.1/get_voices` returns Standard voices only; `/waves/v1/lightning-v3.1-pro/get_voices` returns Pro voices only. Call one or both depending on which pool you plan to use.
- /// Each voice carries tags (`language`, `accent`, `gender`, `age`, `emotions`, `usecases`). Filter client-side to find the voices that match a target language, accent, or use case. Pass the returned `voiceId` as `voice_id` on the unified [`POST /waves/v1/tts`](/models/api-reference/text-to-speech/synthesize-speech) route, together with `"model": "lightning_v3.1"` (Standard) or `"model": "lightning_v3.1_pro"` (Pro).
- /// For the canonical per-language voice list (with previews and recommended pairings), see the [Lightning v3.1](/models/model-cards/text-to-speech/lightning-v-3-1) and [Lightning v3.1 Pro](/models/model-cards/text-to-speech/lightning-v-3-1-pro) model cards. + /// Each voice carries tags (`language`, `accent`, `gender`, `age`, `emotions`, `usecases`). Filter client-side to find the voices that match a target language, accent, or use case. Pass the returned `voiceId` as `voice_id` on the unified [`POST /waves/v1/tts`](/api-reference/models/text-to-speech/synthesize-speech) route, together with `"model": "lightning_v3.1"` (Standard) or `"model": "lightning_v3.1_pro"` (Pro).
+ /// For the canonical per-language voice list (with previews and recommended pairings), see the [Lightning v3.1](/model-cards/text-to-speech/lightning-v-3-1) and [Lightning v3.1 Pro](/model-cards/text-to-speech/lightning-v-3-1-pro) model cards. /// /// /// Default Value: lightning-v3.1 diff --git a/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.SttErrorResponseErrors.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.SttErrorResponseErrors.g.cs new file mode 100644 index 0000000..d5b7c57 --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.SttErrorResponseErrors.g.cs @@ -0,0 +1,162 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace SmallestAI.JsonConverters +{ + /// + public class SttErrorResponseErrorsJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::SmallestAI.SttErrorResponseErrors Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + + using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); + var __rawJson = __jsonDocument.RootElement.GetRawText(); + var __jsonProps = new global::System.Collections.Generic.HashSet(); + if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object) + { + foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject()) + { + __jsonProps.Add(__jsonProp.Name); + } + } + + var __score0 = 0; + { + var __ti = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options); + if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object) + { + foreach (var __prop in __ti.Properties) + { + if (__jsonProps.Contains(__prop.Name)) __score0++; + } + } + } + var __score1 = 0; + { + var __ti = typeInfoResolver.GetTypeInfo(typeof(string), options); + if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object) + { + foreach (var __prop in __ti.Properties) + { + if (__jsonProps.Contains(__prop.Name)) __score1++; + } + } + } + var __bestScore = 0; + var __bestIndex = -1; + if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } + if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } + + global::System.Collections.Generic.IList? sttErrorResponseErrors0 = default; + string? sttErrorResponseErrorsVariant2 = default; + if (__bestIndex >= 0) + { + if (__bestIndex == 0) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo> ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); + sttErrorResponseErrors0 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + else if (__bestIndex == 1) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); + sttErrorResponseErrorsVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + } + + if (sttErrorResponseErrors0 == null && sttErrorResponseErrorsVariant2 == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo> ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); + sttErrorResponseErrors0 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + if (sttErrorResponseErrors0 == null && sttErrorResponseErrorsVariant2 == null) + { + try + { + + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); + sttErrorResponseErrorsVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + var __value = new global::SmallestAI.SttErrorResponseErrors( + sttErrorResponseErrors0, + + sttErrorResponseErrorsVariant2 + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::SmallestAI.SttErrorResponseErrors value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsSttErrorResponseErrors0) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickSttErrorResponseErrors0(), typeInfo); + } + else if (value.IsSttErrorResponseErrorsVariant2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickSttErrorResponseErrorsVariant2(), typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.SttErrorResponseStatus.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.SttErrorResponseStatus.g.cs new file mode 100644 index 0000000..28b0adc --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.SttErrorResponseStatus.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace SmallestAI.JsonConverters +{ + /// + public sealed class SttErrorResponseStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::SmallestAI.SttErrorResponseStatus 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.SttErrorResponseStatusExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::SmallestAI.SttErrorResponseStatus)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::SmallestAI.SttErrorResponseStatus); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::SmallestAI.SttErrorResponseStatus value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::SmallestAI.SttErrorResponseStatusExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.SttErrorResponseStatusNullable.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.SttErrorResponseStatusNullable.g.cs new file mode 100644 index 0000000..369cbf4 --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.SttErrorResponseStatusNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace SmallestAI.JsonConverters +{ + /// + public sealed class SttErrorResponseStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::SmallestAI.SttErrorResponseStatus? 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.SttErrorResponseStatusExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::SmallestAI.SttErrorResponseStatus)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::SmallestAI.SttErrorResponseStatus?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::SmallestAI.SttErrorResponseStatus? 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.SttErrorResponseStatusExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.WavesV1SttPostParametersDiarize.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.WavesV1SttPostParametersDiarize.g.cs new file mode 100644 index 0000000..3f5c9eb --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.WavesV1SttPostParametersDiarize.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace SmallestAI.JsonConverters +{ + /// + public sealed class WavesV1SttPostParametersDiarizeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::SmallestAI.WavesV1SttPostParametersDiarize 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.WavesV1SttPostParametersDiarizeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::SmallestAI.WavesV1SttPostParametersDiarize)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::SmallestAI.WavesV1SttPostParametersDiarize); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::SmallestAI.WavesV1SttPostParametersDiarize value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::SmallestAI.WavesV1SttPostParametersDiarizeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.WavesV1SttPostParametersDiarizeNullable.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.WavesV1SttPostParametersDiarizeNullable.g.cs new file mode 100644 index 0000000..8b4dce8 --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.WavesV1SttPostParametersDiarizeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace SmallestAI.JsonConverters +{ + /// + public sealed class WavesV1SttPostParametersDiarizeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::SmallestAI.WavesV1SttPostParametersDiarize? 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.WavesV1SttPostParametersDiarizeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::SmallestAI.WavesV1SttPostParametersDiarize)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::SmallestAI.WavesV1SttPostParametersDiarize?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::SmallestAI.WavesV1SttPostParametersDiarize? 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.WavesV1SttPostParametersDiarizeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.WavesV1SttPostParametersWordTimestamps.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.WavesV1SttPostParametersWordTimestamps.g.cs new file mode 100644 index 0000000..98c649b --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.WavesV1SttPostParametersWordTimestamps.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace SmallestAI.JsonConverters +{ + /// + public sealed class WavesV1SttPostParametersWordTimestampsJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::SmallestAI.WavesV1SttPostParametersWordTimestamps 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.WavesV1SttPostParametersWordTimestampsExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::SmallestAI.WavesV1SttPostParametersWordTimestamps)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::SmallestAI.WavesV1SttPostParametersWordTimestamps); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::SmallestAI.WavesV1SttPostParametersWordTimestamps value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::SmallestAI.WavesV1SttPostParametersWordTimestampsExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.WavesV1SttPostParametersWordTimestampsNullable.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.WavesV1SttPostParametersWordTimestampsNullable.g.cs new file mode 100644 index 0000000..62abf6b --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.JsonConverters.WavesV1SttPostParametersWordTimestampsNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace SmallestAI.JsonConverters +{ + /// + public sealed class WavesV1SttPostParametersWordTimestampsNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::SmallestAI.WavesV1SttPostParametersWordTimestamps? 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.WavesV1SttPostParametersWordTimestampsExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::SmallestAI.WavesV1SttPostParametersWordTimestamps)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::SmallestAI.WavesV1SttPostParametersWordTimestamps?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::SmallestAI.WavesV1SttPostParametersWordTimestamps? 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.WavesV1SttPostParametersWordTimestampsExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/SmallestAI/Generated/SmallestAI.JsonSerializerContext.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.JsonSerializerContext.g.cs index 3aeac9b..df44ac1 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.JsonSerializerContext.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.JsonSerializerContext.g.cs @@ -91,6 +91,14 @@ namespace SmallestAI typeof(global::SmallestAI.JsonConverters.WavesV1SttPostParametersLanguageNullableJsonConverter), + typeof(global::SmallestAI.JsonConverters.WavesV1SttPostParametersWordTimestampsJsonConverter), + + typeof(global::SmallestAI.JsonConverters.WavesV1SttPostParametersWordTimestampsNullableJsonConverter), + + typeof(global::SmallestAI.JsonConverters.WavesV1SttPostParametersDiarizeJsonConverter), + + typeof(global::SmallestAI.JsonConverters.WavesV1SttPostParametersDiarizeNullableJsonConverter), + typeof(global::SmallestAI.JsonConverters.WavesV1SttPostParametersWebhookMethodJsonConverter), typeof(global::SmallestAI.JsonConverters.WavesV1SttPostParametersWebhookMethodNullableJsonConverter), @@ -115,6 +123,10 @@ namespace SmallestAI typeof(global::SmallestAI.JsonConverters.WavesV1SttPostParametersXExpireContentNullableJsonConverter), + typeof(global::SmallestAI.JsonConverters.SttErrorResponseStatusJsonConverter), + + typeof(global::SmallestAI.JsonConverters.SttErrorResponseStatusNullableJsonConverter), + typeof(global::SmallestAI.JsonConverters.ElectronToolCallTypeJsonConverter), typeof(global::SmallestAI.JsonConverters.ElectronToolCallTypeNullableJsonConverter), @@ -141,6 +153,8 @@ namespace SmallestAI typeof(global::SmallestAI.JsonConverters.SpeechToTextTranscribeResponse200JsonConverter), + typeof(global::SmallestAI.JsonConverters.SttErrorResponseErrorsJsonConverter), + typeof(global::SmallestAI.JsonConverters.ChatCompletionRequestToolChoiceJsonConverter), typeof(global::SmallestAI.JsonConverters.ChatCompletionRequestStopJsonConverter), @@ -213,6 +227,8 @@ namespace SmallestAI [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.DeletePronunciationDictResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.WavesV1SttPostParametersModel), TypeInfoPropertyName = "WavesV1SttPostParametersModel2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.WavesV1SttPostParametersLanguage), TypeInfoPropertyName = "WavesV1SttPostParametersLanguage2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.WavesV1SttPostParametersWordTimestamps), TypeInfoPropertyName = "WavesV1SttPostParametersWordTimestamps2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.WavesV1SttPostParametersDiarize), TypeInfoPropertyName = "WavesV1SttPostParametersDiarize2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.WavesV1SttPostParametersWebhookMethod), TypeInfoPropertyName = "WavesV1SttPostParametersWebhookMethod2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.WavesV1SttPostParametersRedactPii), TypeInfoPropertyName = "WavesV1SttPostParametersRedactPii2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.WavesV1SttPostParametersRedactPci), TypeInfoPropertyName = "WavesV1SttPostParametersRedactPci2")] @@ -228,9 +244,11 @@ namespace SmallestAI [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.AsyncAccepted))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.SpeechToTextTranscribeResponse200), TypeInfoPropertyName = "SpeechToTextTranscribeResponse2002")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.SttErrorResponseDetailsItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.SttErrorResponseStatus), TypeInfoPropertyName = "SttErrorResponseStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.SttErrorResponseErrorsOneOf0Items))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.SttErrorResponseErrors), TypeInfoPropertyName = "SttErrorResponseErrors2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.SttErrorResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.ElectronToolCallType), TypeInfoPropertyName = "ElectronToolCallType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.ElectronToolCallFunction))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.ElectronToolCall))] @@ -273,7 +291,7 @@ namespace SmallestAI [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] diff --git a/src/libs/SmallestAI/Generated/SmallestAI.JsonSerializerContextTypes.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.JsonSerializerContextTypes.g.cs index 075aa4a..83b07c0 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.JsonSerializerContextTypes.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.JsonSerializerContextTypes.g.cs @@ -285,207 +285,223 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::SmallestAI.WavesV1SttPostParametersWebhookMethod? Type63 { get; set; } + public global::SmallestAI.WavesV1SttPostParametersWordTimestamps? Type63 { get; set; } /// /// /// - public global::SmallestAI.WavesV1SttPostParametersRedactPii? Type64 { get; set; } + public global::SmallestAI.WavesV1SttPostParametersDiarize? Type64 { get; set; } /// /// /// - public global::SmallestAI.WavesV1SttPostParametersRedactPci? Type65 { get; set; } + public global::SmallestAI.WavesV1SttPostParametersWebhookMethod? Type65 { get; set; } /// /// /// - public global::SmallestAI.WavesV1SttPostParametersEmotionDetection? Type66 { get; set; } + public global::SmallestAI.WavesV1SttPostParametersRedactPii? Type66 { get; set; } /// /// /// - public global::SmallestAI.WavesV1SttPostParametersGenderDetection? Type67 { get; set; } + public global::SmallestAI.WavesV1SttPostParametersRedactPci? Type67 { get; set; } /// /// /// - public global::SmallestAI.WavesV1SttPostParametersXExpireContent? Type68 { get; set; } + public global::SmallestAI.WavesV1SttPostParametersEmotionDetection? Type68 { get; set; } /// /// /// - public global::SmallestAI.Word? Type69 { get; set; } + public global::SmallestAI.WavesV1SttPostParametersGenderDetection? Type69 { get; set; } /// /// /// - public global::SmallestAI.Utterance? Type70 { get; set; } + public global::SmallestAI.WavesV1SttPostParametersXExpireContent? Type70 { get; set; } /// /// /// - public global::SmallestAI.TranscriptionResponseMetadata? Type71 { get; set; } + public global::SmallestAI.Word? Type71 { get; set; } /// /// /// - public global::SmallestAI.TranscriptionResponse? Type72 { get; set; } + public global::SmallestAI.Utterance? Type72 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type73 { get; set; } + public global::SmallestAI.TranscriptionResponseMetadata? Type73 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type74 { get; set; } + public global::SmallestAI.TranscriptionResponse? Type74 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type75 { get; set; } + public global::System.Collections.Generic.IList? Type75 { get; set; } /// /// /// - public global::SmallestAI.AsyncAccepted? Type76 { get; set; } + public global::System.Collections.Generic.IList? Type76 { get; set; } /// /// /// - public global::SmallestAI.SpeechToTextTranscribeResponse200? Type77 { get; set; } + public global::System.Collections.Generic.Dictionary? Type77 { get; set; } /// /// /// - public global::SmallestAI.SttErrorResponseDetailsItems? Type78 { get; set; } + public global::SmallestAI.AsyncAccepted? Type78 { get; set; } /// /// /// - public global::SmallestAI.SttErrorResponse? Type79 { get; set; } + public global::SmallestAI.SpeechToTextTranscribeResponse200? Type79 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type80 { get; set; } + public global::SmallestAI.SttErrorResponseStatus? Type80 { get; set; } /// /// /// - public global::SmallestAI.ElectronToolCallType? Type81 { get; set; } + public global::SmallestAI.SttErrorResponseErrorsOneOf0Items? Type81 { get; set; } /// /// /// - public global::SmallestAI.ElectronToolCallFunction? Type82 { get; set; } + public global::System.Collections.Generic.IList? Type82 { get; set; } /// /// /// - public global::SmallestAI.ElectronToolCall? Type83 { get; set; } + public global::SmallestAI.SttErrorResponseErrors? Type83 { get; set; } /// /// /// - public global::SmallestAI.ElectronMessage? Type84 { get; set; } + public global::SmallestAI.SttErrorResponse? Type84 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type85 { get; set; } + public global::SmallestAI.ElectronToolCallType? Type85 { get; set; } /// /// /// - public global::SmallestAI.ChatCompletionRequestStreamOptions? Type86 { get; set; } + public global::SmallestAI.ElectronToolCallFunction? Type86 { get; set; } /// /// /// - public global::SmallestAI.ChatCompletionRequestToolChoice0? Type87 { get; set; } + public global::SmallestAI.ElectronToolCall? Type87 { get; set; } /// /// /// - public global::SmallestAI.ChatCompletionRequestToolChoiceOneOf1Type? Type88 { get; set; } + public global::SmallestAI.ElectronMessage? Type88 { get; set; } /// /// /// - public global::SmallestAI.ChatCompletionRequestToolChoiceOneOf1Function? Type89 { get; set; } + public global::System.Collections.Generic.IList? Type89 { get; set; } /// /// /// - public global::SmallestAI.ChatCompletionRequestToolChoice1? Type90 { get; set; } + public global::SmallestAI.ChatCompletionRequestStreamOptions? Type90 { get; set; } /// /// /// - public global::SmallestAI.ChatCompletionRequestToolChoice? Type91 { get; set; } + public global::SmallestAI.ChatCompletionRequestToolChoice0? Type91 { get; set; } /// /// /// - public global::SmallestAI.ChatCompletionRequestResponseFormatType? Type92 { get; set; } + public global::SmallestAI.ChatCompletionRequestToolChoiceOneOf1Type? Type92 { get; set; } /// /// /// - public global::SmallestAI.ChatCompletionRequestResponseFormat? Type93 { get; set; } + public global::SmallestAI.ChatCompletionRequestToolChoiceOneOf1Function? Type93 { get; set; } /// /// /// - public global::SmallestAI.ChatCompletionRequestStop? Type94 { get; set; } + public global::SmallestAI.ChatCompletionRequestToolChoice1? Type94 { get; set; } /// /// /// - public global::SmallestAI.ChatCompletionRequest? Type95 { get; set; } + public global::SmallestAI.ChatCompletionRequestToolChoice? Type95 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type96 { get; set; } + public global::SmallestAI.ChatCompletionRequestResponseFormatType? Type96 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type97 { get; set; } + public global::SmallestAI.ChatCompletionRequestResponseFormat? Type97 { get; set; } /// /// /// - public object? Type98 { get; set; } + public global::SmallestAI.ChatCompletionRequestStop? Type98 { get; set; } /// /// /// - public global::SmallestAI.ChatCompletionObject? Type99 { get; set; } + public global::SmallestAI.ChatCompletionRequest? Type99 { get; set; } /// /// /// - public global::SmallestAI.ChatCompletionChoicesItemsFinishReason? Type100 { get; set; } + public global::System.Collections.Generic.IList? Type100 { get; set; } /// /// /// - public global::SmallestAI.ChatCompletionChoicesItems? Type101 { get; set; } + public global::System.Collections.Generic.IList? Type101 { get; set; } /// /// /// - public global::SmallestAI.UsagePromptTokensDetails? Type102 { get; set; } + public object? Type102 { get; set; } /// /// /// - public global::SmallestAI.Usage? Type103 { get; set; } + public global::SmallestAI.ChatCompletionObject? Type103 { get; set; } /// /// /// - public global::SmallestAI.ChatCompletion? Type104 { get; set; } + public global::SmallestAI.ChatCompletionChoicesItemsFinishReason? Type104 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type105 { get; set; } + public global::SmallestAI.ChatCompletionChoicesItems? Type105 { get; set; } /// /// /// - public global::SmallestAI.ErrorErrorDetailsItems? Type106 { get; set; } + public global::SmallestAI.UsagePromptTokensDetails? Type106 { get; set; } /// /// /// - public global::SmallestAI.ErrorError? Type107 { get; set; } + public global::SmallestAI.Usage? Type107 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type108 { get; set; } + public global::SmallestAI.ChatCompletion? Type108 { get; set; } /// /// /// - public global::SmallestAI.Error? Type109 { get; set; } + public global::System.Collections.Generic.IList? Type109 { get; set; } /// /// /// - public global::SmallestAI.TranscriptionUrlRequest? Type110 { get; set; } + public global::SmallestAI.ErrorErrorDetailsItems? Type110 { get; set; } /// /// /// - public global::SmallestAI.CreateVoiceCloneRequest? Type111 { get; set; } + public global::SmallestAI.ErrorError? Type111 { get; set; } /// /// /// - public byte[]? Type112 { get; set; } + public global::System.Collections.Generic.IList? Type112 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type113 { get; set; } + public global::SmallestAI.Error? Type113 { get; set; } + /// + /// + /// + public global::SmallestAI.TranscriptionUrlRequest? Type114 { get; set; } + /// + /// + /// + public global::SmallestAI.CreateVoiceCloneRequest? Type115 { get; set; } + /// + /// + /// + public byte[]? Type116 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type117 { get; set; } /// /// @@ -526,7 +542,7 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::System.Collections.Generic.List? ListType9 { get; set; } + public global::System.Collections.Generic.List? ListType9 { get; set; } /// /// /// diff --git a/src/libs/SmallestAI/Generated/SmallestAI.Models.ChatCompletionRequest.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.Models.ChatCompletionRequest.g.cs index b5d0899..14a78ae 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.Models.ChatCompletionRequest.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.Models.ChatCompletionRequest.g.cs @@ -46,7 +46,7 @@ public sealed partial class ChatCompletionRequest /// /// When true, response is `text/event-stream`. See the
- /// [Streaming guide](/models/documentation/llm-electron/streaming).
+ /// [Streaming guide](/models/llm/streaming).
/// Default Value: false ///
[global::System.Text.Json.Serialization.JsonPropertyName("stream")] @@ -64,7 +64,7 @@ public sealed partial class ChatCompletionRequest /// (`{type: "function", function: {name, description, parameters}}`)
/// is the recommended form and is what the examples below use.
/// The wire schema is permissive (`array<object>`) — any tools payload
- /// the upstream accepts will work. See [Tool Calling](/models/documentation/llm-electron/tool-function-calling)
+ /// the upstream accepts will work. See [Tool Calling](/models/llm/tool-function-calling)
/// for details. ///
[global::System.Text.Json.Serialization.JsonPropertyName("tools")] @@ -161,7 +161,7 @@ public sealed partial class ChatCompletionRequest /// /// /// When true, response is `text/event-stream`. See the
- /// [Streaming guide](/models/documentation/llm-electron/streaming).
+ /// [Streaming guide](/models/llm/streaming).
/// Default Value: false /// /// @@ -171,7 +171,7 @@ public sealed partial class ChatCompletionRequest /// (`{type: "function", function: {name, description, parameters}}`)
/// is the recommended form and is what the examples below use.
/// The wire schema is permissive (`array<object>`) — any tools payload
- /// the upstream accepts will work. See [Tool Calling](/models/documentation/llm-electron/tool-function-calling)
+ /// the upstream accepts will work. See [Tool Calling](/models/llm/tool-function-calling)
/// for details. /// /// diff --git a/src/libs/SmallestAI/Generated/SmallestAI.Models.SttErrorResponse.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.Models.SttErrorResponse.g.cs index e3ba6e3..d98913c 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.Models.SttErrorResponse.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.Models.SttErrorResponse.g.cs @@ -4,28 +4,69 @@ namespace SmallestAI { /// - /// + /// Error body returned by `POST /waves/v1/stt/`. The shape depends on where the request fails:
+ /// - A request with no `Authorization` header returns `{ "message": "Unauthorized: No tokens provided" }`.
+ /// - Other authentication errors, and plan, credit, and rate-limit errors, return `{ "error": "<message>" }`.
+ /// - Request validation and transcription errors return `{ "status": "error", "message": "<message>" }`, with optional `errors`, `error_code`, `code`, `language`, `region`, and `request_id` fields.
+ /// Read `error` first and fall back to `message`. Branch on the HTTP status and on `error_code` / `code` when present, not on the message text. ///
public sealed partial class SttErrorResponse { /// - /// Error message. + /// Human-readable error message on authentication, plan, credit, and rate-limit errors. /// [global::System.Text.Json.Serialization.JsonPropertyName("error")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Error { get; set; } + public string? Error { get; set; } /// - /// Correlation ID for support / logs + /// Set to `error` on validation and transcription errors. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::SmallestAI.JsonConverters.SttErrorResponseStatusJsonConverter))] + public global::SmallestAI.SttErrorResponseStatus? Status { get; set; } + + /// + /// Human-readable error message on validation and transcription errors, and on a missing `Authorization` header. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + public string? Message { get; set; } + + /// + /// Machine-readable error code. Known values: `LANGUAGE_NOT_ENABLED_IN_REGION`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("error_code")] + public string? ErrorCode { get; set; } + + /// + /// Machine-readable error code on some transcription failures. Known values: `AudioDecodeError`, `NoAudio`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("code")] + public string? Code { get; set; } + + /// + /// Language code echoed on `LANGUAGE_NOT_ENABLED_IN_REGION` responses. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("language")] + public string? Language { get; set; } + + /// + /// Region that served the request on `LANGUAGE_NOT_ENABLED_IN_REGION` responses (for example `ap-south-1` or `us-west-2`). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("region")] + public string? Region { get; set; } + + /// + /// Correlation ID for support /// [global::System.Text.Json.Serialization.JsonPropertyName("request_id")] public string? RequestId { get; set; } /// - /// Additional error details (validation errors). + /// Validation detail. On query-parameter failures, an array of entries with the parameter `path` and a `message`. On request-body failures, a string. /// - [global::System.Text.Json.Serialization.JsonPropertyName("details")] - public global::System.Collections.Generic.IList? Details { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("errors")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::SmallestAI.JsonConverters.SttErrorResponseErrorsJsonConverter))] + public global::SmallestAI.SttErrorResponseErrors? Errors { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -37,25 +78,55 @@ public sealed partial class SttErrorResponse /// Initializes a new instance of the class. /// /// - /// Error message. + /// Human-readable error message on authentication, plan, credit, and rate-limit errors. + /// + /// + /// Set to `error` on validation and transcription errors. + /// + /// + /// Human-readable error message on validation and transcription errors, and on a missing `Authorization` header. + /// + /// + /// Machine-readable error code. Known values: `LANGUAGE_NOT_ENABLED_IN_REGION`. + /// + /// + /// Machine-readable error code on some transcription failures. Known values: `AudioDecodeError`, `NoAudio`. + /// + /// + /// Language code echoed on `LANGUAGE_NOT_ENABLED_IN_REGION` responses. + /// + /// + /// Region that served the request on `LANGUAGE_NOT_ENABLED_IN_REGION` responses (for example `ap-south-1` or `us-west-2`). /// /// - /// Correlation ID for support / logs + /// Correlation ID for support /// - /// - /// Additional error details (validation errors). + /// + /// Validation detail. On query-parameter failures, an array of entries with the parameter `path` and a `message`. On request-body failures, a string. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public SttErrorResponse( - string error, + string? error, + global::SmallestAI.SttErrorResponseStatus? status, + string? message, + string? errorCode, + string? code, + string? language, + string? region, string? requestId, - global::System.Collections.Generic.IList? details) + global::SmallestAI.SttErrorResponseErrors? errors) { - this.Error = error ?? throw new global::System.ArgumentNullException(nameof(error)); + this.Error = error; + this.Status = status; + this.Message = message; + this.ErrorCode = errorCode; + this.Code = code; + this.Language = language; + this.Region = region; this.RequestId = requestId; - this.Details = details; + this.Errors = errors; } /// diff --git a/src/libs/SmallestAI/Generated/SmallestAI.Models.SttErrorResponseDetailsItems.Json.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.Models.SttErrorResponseErrors.Json.g.cs similarity index 87% rename from src/libs/SmallestAI/Generated/SmallestAI.Models.SttErrorResponseDetailsItems.Json.g.cs rename to src/libs/SmallestAI/Generated/SmallestAI.Models.SttErrorResponseErrors.Json.g.cs index 7559d89..4420244 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.Models.SttErrorResponseDetailsItems.Json.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.Models.SttErrorResponseErrors.Json.g.cs @@ -2,7 +2,7 @@ namespace SmallestAI { - public sealed partial class SttErrorResponseDetailsItems + public readonly partial struct SttErrorResponseErrors { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -47,20 +47,20 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::SmallestAI.SttErrorResponseDetailsItems? FromJson( + public static global::SmallestAI.SttErrorResponseErrors? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::SmallestAI.SttErrorResponseDetailsItems), - jsonSerializerContext) as global::SmallestAI.SttErrorResponseDetailsItems; + typeof(global::SmallestAI.SttErrorResponseErrors), + jsonSerializerContext) as global::SmallestAI.SttErrorResponseErrors?; } /// /// Deserializes a JSON string using the generated default JsonSerializerContext. /// - public static global::SmallestAI.SttErrorResponseDetailsItems? FromJson( + public static global::SmallestAI.SttErrorResponseErrors? FromJson( string json) { return FromJson( @@ -75,7 +75,7 @@ public string ToJson( [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.SttErrorResponseDetailsItems? FromJson( + public static global::SmallestAI.SttErrorResponseErrors? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -86,7 +86,7 @@ public string ToJson( global::SmallestAI.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -94,20 +94,20 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + 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.SttErrorResponseDetailsItems), - jsonSerializerContext).ConfigureAwait(false)) as global::SmallestAI.SttErrorResponseDetailsItems; + typeof(global::SmallestAI.SttErrorResponseErrors), + jsonSerializerContext).ConfigureAwait(false)) as global::SmallestAI.SttErrorResponseErrors?; } /// /// Deserializes a JSON stream using the generated default JsonSerializerContext. /// - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream) { return FromJsonStreamAsync( @@ -122,7 +122,7 @@ public string ToJson( [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( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -133,7 +133,7 @@ public string ToJson( global::SmallestAI.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/SmallestAI/Generated/SmallestAI.Models.SttErrorResponseErrors.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.Models.SttErrorResponseErrors.g.cs new file mode 100644 index 0000000..23735bc --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.Models.SttErrorResponseErrors.g.cs @@ -0,0 +1,272 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace SmallestAI +{ + /// + /// Validation detail. On query-parameter failures, an array of entries with the parameter `path` and a `message`. On request-body failures, a string. + /// + public readonly partial struct SttErrorResponseErrors : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::System.Collections.Generic.IList? SttErrorResponseErrors0 { get; init; } +#else + public global::System.Collections.Generic.IList? SttErrorResponseErrors0 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SttErrorResponseErrors0))] +#endif + public bool IsSttErrorResponseErrors0 => SttErrorResponseErrors0 != null; + + /// + /// + /// + public bool TryPickSttErrorResponseErrors0( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::System.Collections.Generic.IList? value) + { + value = SttErrorResponseErrors0; + return IsSttErrorResponseErrors0; + } + + /// + /// + /// + public global::System.Collections.Generic.IList PickSttErrorResponseErrors0() => SttErrorResponseErrors0 is { } value + ? value + : throw new global::System.InvalidOperationException($"Expected union variant 'SttErrorResponseErrors0' but the value was {ToString()}."); + + /// + /// + /// +#if NET6_0_OR_GREATER + public string? SttErrorResponseErrorsVariant2 { get; init; } +#else + public string? SttErrorResponseErrorsVariant2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SttErrorResponseErrorsVariant2))] +#endif + public bool IsSttErrorResponseErrorsVariant2 => SttErrorResponseErrorsVariant2 != null; + + /// + /// + /// + public bool TryPickSttErrorResponseErrorsVariant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out string? value) + { + value = SttErrorResponseErrorsVariant2; + return IsSttErrorResponseErrorsVariant2; + } + + /// + /// + /// + public string PickSttErrorResponseErrorsVariant2() => SttErrorResponseErrorsVariant2 is { } value + ? value + : throw new global::System.InvalidOperationException($"Expected union variant 'SttErrorResponseErrorsVariant2' but the value was {ToString()}."); + /// + /// + /// + public static implicit operator SttErrorResponseErrors(string value) => new SttErrorResponseErrors((string?)value); + + /// + /// + /// + public static implicit operator string?(SttErrorResponseErrors @this) => @this.SttErrorResponseErrorsVariant2; + + /// + /// + /// + public SttErrorResponseErrors(string? value) + { + SttErrorResponseErrorsVariant2 = value; + } + + /// + /// + /// + public static SttErrorResponseErrors FromSttErrorResponseErrorsVariant2(string? value) => new SttErrorResponseErrors(value); + + /// + /// + /// + public SttErrorResponseErrors( + global::System.Collections.Generic.IList? sttErrorResponseErrors0, + string? sttErrorResponseErrorsVariant2 + ) + { + SttErrorResponseErrors0 = sttErrorResponseErrors0; + SttErrorResponseErrorsVariant2 = sttErrorResponseErrorsVariant2; + } + + /// + /// + /// + public object? Object => + SttErrorResponseErrorsVariant2 as object ?? + SttErrorResponseErrors0 as object + ; + + /// + /// + /// + public override string? ToString() => + SttErrorResponseErrors0?.ToString() ?? + SttErrorResponseErrorsVariant2?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsSttErrorResponseErrors0 && !IsSttErrorResponseErrorsVariant2 || !IsSttErrorResponseErrors0 && IsSttErrorResponseErrorsVariant2; + } + + /// + /// + /// + public TResult? Match( + global::System.Func, TResult>? sttErrorResponseErrors0 = null, + global::System.Func? sttErrorResponseErrorsVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (SttErrorResponseErrors0 is { } __value0 && sttErrorResponseErrors0 != null) + { + return sttErrorResponseErrors0(__value0); + } + else if (SttErrorResponseErrorsVariant2 is { } __value1 && sttErrorResponseErrorsVariant2 != null) + { + return sttErrorResponseErrorsVariant2(__value1); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action>? sttErrorResponseErrors0 = null, + + global::System.Action? sttErrorResponseErrorsVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (SttErrorResponseErrors0 is { } __value0) + { + sttErrorResponseErrors0?.Invoke(__value0); + } + else if (SttErrorResponseErrorsVariant2 is { } __value1) + { + sttErrorResponseErrorsVariant2?.Invoke(__value1); + } + } + + /// + /// + /// + public void Switch( + global::System.Action>? sttErrorResponseErrors0 = null, + global::System.Action? sttErrorResponseErrorsVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (SttErrorResponseErrors0 is { } __value0) + { + sttErrorResponseErrors0?.Invoke(__value0); + } + else if (SttErrorResponseErrorsVariant2 is { } __value1) + { + sttErrorResponseErrorsVariant2?.Invoke(__value1); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + SttErrorResponseErrors0, + typeof(global::System.Collections.Generic.IList), + SttErrorResponseErrorsVariant2, + typeof(string), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(SttErrorResponseErrors other) + { + return + global::System.Collections.Generic.EqualityComparer?>.Default.Equals(SttErrorResponseErrors0, other.SttErrorResponseErrors0) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(SttErrorResponseErrorsVariant2, other.SttErrorResponseErrorsVariant2) + ; + } + + /// + /// + /// + public static bool operator ==(SttErrorResponseErrors obj1, SttErrorResponseErrors obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(SttErrorResponseErrors obj1, SttErrorResponseErrors obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is SttErrorResponseErrors o && Equals(o); + } + } +} diff --git a/src/libs/SmallestAI/Generated/SmallestAI.Models.SttErrorResponseErrorsOneOf0Items.Json.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.Models.SttErrorResponseErrorsOneOf0Items.Json.g.cs new file mode 100644 index 0000000..61b3d60 --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.Models.SttErrorResponseErrorsOneOf0Items.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace SmallestAI +{ + public sealed partial class SttErrorResponseErrorsOneOf0Items + { + /// + /// 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 generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::SmallestAI.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::SmallestAI.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::SmallestAI.SttErrorResponseErrorsOneOf0Items? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::SmallestAI.SttErrorResponseErrorsOneOf0Items), + jsonSerializerContext) as global::SmallestAI.SttErrorResponseErrorsOneOf0Items; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::SmallestAI.SttErrorResponseErrorsOneOf0Items? FromJson( + string json) + { + return FromJson( + json, + global::SmallestAI.SourceGenerationContext.Default); + } + + /// + /// 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.SttErrorResponseErrorsOneOf0Items? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::SmallestAI.SourceGenerationContext.Default); + } + + 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.SttErrorResponseErrorsOneOf0Items), + jsonSerializerContext).ConfigureAwait(false)) as global::SmallestAI.SttErrorResponseErrorsOneOf0Items; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::SmallestAI.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::SmallestAI.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/SmallestAI/Generated/SmallestAI.Models.SttErrorResponseDetailsItems.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.Models.SttErrorResponseErrorsOneOf0Items.g.cs similarity index 87% rename from src/libs/SmallestAI/Generated/SmallestAI.Models.SttErrorResponseDetailsItems.g.cs rename to src/libs/SmallestAI/Generated/SmallestAI.Models.SttErrorResponseErrorsOneOf0Items.g.cs index f99891c..f681bc9 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.Models.SttErrorResponseDetailsItems.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.Models.SttErrorResponseErrorsOneOf0Items.g.cs @@ -6,7 +6,7 @@ namespace SmallestAI /// /// /// - public sealed partial class SttErrorResponseDetailsItems + public sealed partial class SttErrorResponseErrorsOneOf0Items { /// diff --git a/src/libs/SmallestAI/Generated/SmallestAI.Models.SttErrorResponseStatus.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.Models.SttErrorResponseStatus.g.cs new file mode 100644 index 0000000..62f6b0a --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.Models.SttErrorResponseStatus.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace SmallestAI +{ + /// + /// Set to `error` on validation and transcription errors. + /// + public enum SttErrorResponseStatus + { + /// + /// + /// + Error, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class SttErrorResponseStatusExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this SttErrorResponseStatus value) + { + return value switch + { + SttErrorResponseStatus.Error => "error", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static SttErrorResponseStatus? ToEnum(string value) + { + return value switch + { + "error" => SttErrorResponseStatus.Error, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/SmallestAI/Generated/SmallestAI.Models.TranscriptionResponse.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.Models.TranscriptionResponse.g.cs index e1ddff3..14ff27b 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.Models.TranscriptionResponse.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.Models.TranscriptionResponse.g.cs @@ -65,7 +65,7 @@ public sealed partial class TranscriptionResponse public string? Gender { get; set; } /// - /// Detected emotion labels mapped to confidence scores. Present when `emotion_detection=true` was set on the request. + /// Detected emotion labels mapped to confidence scores. Present when `emotion_detection=true` was set on the request. Current known keys: `anger`, `disgust`, `fear`, `sadness`, `happiness`. /// [global::System.Text.Json.Serialization.JsonPropertyName("emotions")] public global::System.Collections.Generic.Dictionary? Emotions { get; set; } @@ -103,7 +103,7 @@ public sealed partial class TranscriptionResponse /// Detected speaker gender label. Present when `gender_detection=true` was set on the request. /// /// - /// Detected emotion labels mapped to confidence scores. Present when `emotion_detection=true` was set on the request. + /// Detected emotion labels mapped to confidence scores. Present when `emotion_detection=true` was set on the request. Current known keys: `anger`, `disgust`, `fear`, `sadness`, `happiness`. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] diff --git a/src/libs/SmallestAI/Generated/SmallestAI.Models.TranscriptionResponseEmotions.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.Models.TranscriptionResponseEmotions.g.cs index a497ad4..a4c980d 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.Models.TranscriptionResponseEmotions.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.Models.TranscriptionResponseEmotions.g.cs @@ -4,7 +4,7 @@ namespace SmallestAI { /// - /// Detected emotion labels mapped to confidence scores. Present when `emotion_detection=true` was set on the request. + /// Detected emotion labels mapped to confidence scores. Present when `emotion_detection=true` was set on the request. Current known keys: `anger`, `disgust`, `fear`, `sadness`, `happiness`. /// public sealed partial class TranscriptionResponseEmotions { diff --git a/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequest.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequest.g.cs index aaef428..d9535db 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequest.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequest.g.cs @@ -32,7 +32,7 @@ public sealed partial class TtsRequest /// - `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](/models/model-cards/text-to-speech/lightning-v-3-1-pro)
+ /// [Lightning v3.1 Pro model card](/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.
@@ -138,7 +138,7 @@ public sealed partial class TtsRequest /// wrong-glyph `x`/`X`) fire glued or spaced (`5x3`, `5 x 3`).
/// The ambiguous `-` `–` `−` and `/` fire only when
/// space-padded, so `5-3` stays a range and `1/2` stays a
- /// fraction. See [Math notation](/models/documentation/text-to-speech-lightning/math-notation)
+ /// fraction. See [Math notation](/models/text-to-speech/math-notation)
/// for the full lexicon, known limitations (product dimensions,
/// `24x7` idiom, vehicle-reg codes), and EU-language
/// localizations.
@@ -158,7 +158,7 @@ public sealed partial class TtsRequest /// `action: "flag"` synthesizes normally and records the match.
/// Matching is whole-word, not substring. If no verdict is returned
/// the request fails open and the audio is synthesized unfiltered.
- /// See [Content filter](/models/documentation/text-to-speech-lightning/content-filter). + /// See [Content filter](/models/text-to-speech/content-filter). ///
[global::System.Text.Json.Serialization.JsonPropertyName("content_filter")] public global::SmallestAI.TtsRequestContentFilter? ContentFilter { get; set; } @@ -182,7 +182,7 @@ public sealed partial class TtsRequest public global::System.Collections.Generic.IList? PronunciationDicts { get; set; } /// - /// **WebSocket-only feature.** Accepted on this endpoint but ignored — no per-word timing information is returned in the sync HTTP or SSE response shape. To receive `status: "word_timestamp"` frames with per-word `{ id, word, start, end }` data, use the WebSocket endpoint `wss://api.smallest.ai/waves/v1/tts/live`. See [Word-level timestamps](/models/documentation/text-to-speech-lightning/word-timestamps).
+ /// **WebSocket-only feature.** Accepted on this endpoint but ignored — no per-word timing information is returned in the sync HTTP or SSE response shape. To receive `status: "word_timestamp"` frames with per-word `{ id, word, start, end }` data, use the WebSocket endpoint `wss://api.smallest.ai/waves/v1/tts/live`. See [Word-level timestamps](/models/text-to-speech/word-timestamps).
/// Default Value: false ///
[global::System.Text.Json.Serialization.JsonPropertyName("word_timestamps")] @@ -223,7 +223,7 @@ public sealed partial class TtsRequest /// - `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](/models/model-cards/text-to-speech/lightning-v-3-1-pro)
+ /// [Lightning v3.1 Pro model card](/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.
@@ -310,7 +310,7 @@ public sealed partial class TtsRequest /// wrong-glyph `x`/`X`) fire glued or spaced (`5x3`, `5 x 3`).
/// The ambiguous `-` `–` `−` and `/` fire only when
/// space-padded, so `5-3` stays a range and `1/2` stays a
- /// fraction. See [Math notation](/models/documentation/text-to-speech-lightning/math-notation)
+ /// fraction. See [Math notation](/models/text-to-speech/math-notation)
/// for the full lexicon, known limitations (product dimensions,
/// `24x7` idiom, vehicle-reg codes), and EU-language
/// localizations.
@@ -327,7 +327,7 @@ public sealed partial class TtsRequest /// `action: "flag"` synthesizes normally and records the match.
/// Matching is whole-word, not substring. If no verdict is returned
/// the request fails open and the audio is synthesized unfiltered.
- /// See [Content filter](/models/documentation/text-to-speech-lightning/content-filter). + /// See [Content filter](/models/text-to-speech/content-filter). /// /// /// Format of the returned audio. `pcm` is the lowest-latency option
@@ -341,7 +341,7 @@ public sealed partial class TtsRequest /// The IDs of the pronunciation dictionaries to use for speech generation. Available on both `lightning_v3.1` and `lightning_v3.1_pro`. /// /// - /// **WebSocket-only feature.** Accepted on this endpoint but ignored — no per-word timing information is returned in the sync HTTP or SSE response shape. To receive `status: "word_timestamp"` frames with per-word `{ id, word, start, end }` data, use the WebSocket endpoint `wss://api.smallest.ai/waves/v1/tts/live`. See [Word-level timestamps](/models/documentation/text-to-speech-lightning/word-timestamps).
+ /// **WebSocket-only feature.** Accepted on this endpoint but ignored — no per-word timing information is returned in the sync HTTP or SSE response shape. To receive `status: "word_timestamp"` frames with per-word `{ id, word, start, end }` data, use the WebSocket endpoint `wss://api.smallest.ai/waves/v1/tts/live`. See [Word-level timestamps](/models/text-to-speech/word-timestamps).
/// Default Value: false /// /// diff --git a/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequestContentFilter.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequestContentFilter.g.cs index 270564a..87dfa57 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequestContentFilter.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequestContentFilter.g.cs @@ -14,7 +14,7 @@ namespace SmallestAI /// `action: "flag"` synthesizes normally and records the match.
/// Matching is whole-word, not substring. If no verdict is returned
/// the request fails open and the audio is synthesized unfiltered.
- /// See [Content filter](/models/documentation/text-to-speech-lightning/content-filter). + /// See [Content filter](/models/text-to-speech/content-filter). ///
public sealed partial class TtsRequestContentFilter { diff --git a/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequestModel.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequestModel.g.cs index 6c9249c..b507607 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequestModel.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.Models.TtsRequestModel.g.cs @@ -9,7 +9,7 @@ namespace SmallestAI /// - `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](/models/model-cards/text-to-speech/lightning-v-3-1-pro)
+ /// [Lightning v3.1 Pro model card](/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.
diff --git a/src/libs/SmallestAI/Generated/SmallestAI.Models.WavesV1SttPostParametersDiarize.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.Models.WavesV1SttPostParametersDiarize.g.cs new file mode 100644 index 0000000..81ea94b --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.Models.WavesV1SttPostParametersDiarize.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace SmallestAI +{ + /// + /// Default Value: false + /// + public enum WavesV1SttPostParametersDiarize + { + /// + /// + /// + False, + /// + /// + /// + True, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class WavesV1SttPostParametersDiarizeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this WavesV1SttPostParametersDiarize value) + { + return value switch + { + WavesV1SttPostParametersDiarize.False => "false", + WavesV1SttPostParametersDiarize.True => "true", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static WavesV1SttPostParametersDiarize? ToEnum(string value) + { + return value switch + { + "false" => WavesV1SttPostParametersDiarize.False, + "true" => WavesV1SttPostParametersDiarize.True, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/SmallestAI/Generated/SmallestAI.Models.WavesV1SttPostParametersLanguage.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.Models.WavesV1SttPostParametersLanguage.g.cs index 35df8f9..e3a9c7f 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.Models.WavesV1SttPostParametersLanguage.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.Models.WavesV1SttPostParametersLanguage.g.cs @@ -8,18 +8,6 @@ namespace SmallestAI ///
public enum WavesV1SttPostParametersLanguage { - /// - /// - /// - Bg, - /// - /// - /// - Cs, - /// - /// - /// - Da, /// /// /// @@ -35,14 +23,6 @@ public enum WavesV1SttPostParametersLanguage /// /// /// - Et, - /// - /// - /// - Fi, - /// - /// - /// Fr, /// /// @@ -51,10 +31,6 @@ public enum WavesV1SttPostParametersLanguage /// /// /// - Hu, - /// - /// - /// It, /// /// @@ -67,18 +43,6 @@ public enum WavesV1SttPostParametersLanguage /// /// /// - Lt, - /// - /// - /// - Lv, - /// - /// - /// - Mt, - /// - /// - /// MultiAsian, /// /// @@ -95,34 +59,14 @@ public enum WavesV1SttPostParametersLanguage /// /// /// - Pl, - /// - /// - /// Pt, /// /// /// - Ro, - /// - /// - /// Ru, /// /// /// - Sk, - /// - /// - /// - Sv, - /// - /// - /// - Uk, - /// - /// - /// Zh, } @@ -138,34 +82,20 @@ public static string ToValueString(this WavesV1SttPostParametersLanguage value) { return value switch { - WavesV1SttPostParametersLanguage.Bg => "bg", - WavesV1SttPostParametersLanguage.Cs => "cs", - WavesV1SttPostParametersLanguage.Da => "da", WavesV1SttPostParametersLanguage.De => "de", WavesV1SttPostParametersLanguage.En => "en", WavesV1SttPostParametersLanguage.Es => "es", - WavesV1SttPostParametersLanguage.Et => "et", - WavesV1SttPostParametersLanguage.Fi => "fi", WavesV1SttPostParametersLanguage.Fr => "fr", WavesV1SttPostParametersLanguage.Hi => "hi", - WavesV1SttPostParametersLanguage.Hu => "hu", WavesV1SttPostParametersLanguage.It => "it", WavesV1SttPostParametersLanguage.Ja => "ja", WavesV1SttPostParametersLanguage.Ko => "ko", - WavesV1SttPostParametersLanguage.Lt => "lt", - WavesV1SttPostParametersLanguage.Lv => "lv", - WavesV1SttPostParametersLanguage.Mt => "mt", WavesV1SttPostParametersLanguage.MultiAsian => "multi-asian", WavesV1SttPostParametersLanguage.MultiEu => "multi-eu", WavesV1SttPostParametersLanguage.MultiIndic => "multi-indic", WavesV1SttPostParametersLanguage.Nl => "nl", - WavesV1SttPostParametersLanguage.Pl => "pl", WavesV1SttPostParametersLanguage.Pt => "pt", - WavesV1SttPostParametersLanguage.Ro => "ro", WavesV1SttPostParametersLanguage.Ru => "ru", - WavesV1SttPostParametersLanguage.Sk => "sk", - WavesV1SttPostParametersLanguage.Sv => "sv", - WavesV1SttPostParametersLanguage.Uk => "uk", WavesV1SttPostParametersLanguage.Zh => "zh", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; @@ -177,34 +107,20 @@ public static string ToValueString(this WavesV1SttPostParametersLanguage value) { return value switch { - "bg" => WavesV1SttPostParametersLanguage.Bg, - "cs" => WavesV1SttPostParametersLanguage.Cs, - "da" => WavesV1SttPostParametersLanguage.Da, "de" => WavesV1SttPostParametersLanguage.De, "en" => WavesV1SttPostParametersLanguage.En, "es" => WavesV1SttPostParametersLanguage.Es, - "et" => WavesV1SttPostParametersLanguage.Et, - "fi" => WavesV1SttPostParametersLanguage.Fi, "fr" => WavesV1SttPostParametersLanguage.Fr, "hi" => WavesV1SttPostParametersLanguage.Hi, - "hu" => WavesV1SttPostParametersLanguage.Hu, "it" => WavesV1SttPostParametersLanguage.It, "ja" => WavesV1SttPostParametersLanguage.Ja, "ko" => WavesV1SttPostParametersLanguage.Ko, - "lt" => WavesV1SttPostParametersLanguage.Lt, - "lv" => WavesV1SttPostParametersLanguage.Lv, - "mt" => WavesV1SttPostParametersLanguage.Mt, "multi-asian" => WavesV1SttPostParametersLanguage.MultiAsian, "multi-eu" => WavesV1SttPostParametersLanguage.MultiEu, "multi-indic" => WavesV1SttPostParametersLanguage.MultiIndic, "nl" => WavesV1SttPostParametersLanguage.Nl, - "pl" => WavesV1SttPostParametersLanguage.Pl, "pt" => WavesV1SttPostParametersLanguage.Pt, - "ro" => WavesV1SttPostParametersLanguage.Ro, "ru" => WavesV1SttPostParametersLanguage.Ru, - "sk" => WavesV1SttPostParametersLanguage.Sk, - "sv" => WavesV1SttPostParametersLanguage.Sv, - "uk" => WavesV1SttPostParametersLanguage.Uk, "zh" => WavesV1SttPostParametersLanguage.Zh, _ => null, }; diff --git a/src/libs/SmallestAI/Generated/SmallestAI.Models.WavesV1SttPostParametersWordTimestamps.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.Models.WavesV1SttPostParametersWordTimestamps.g.cs new file mode 100644 index 0000000..a217f92 --- /dev/null +++ b/src/libs/SmallestAI/Generated/SmallestAI.Models.WavesV1SttPostParametersWordTimestamps.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace SmallestAI +{ + /// + /// Default Value: false + /// + public enum WavesV1SttPostParametersWordTimestamps + { + /// + /// + /// + False, + /// + /// + /// + True, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class WavesV1SttPostParametersWordTimestampsExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this WavesV1SttPostParametersWordTimestamps value) + { + return value switch + { + WavesV1SttPostParametersWordTimestamps.False => "false", + WavesV1SttPostParametersWordTimestamps.True => "true", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static WavesV1SttPostParametersWordTimestamps? ToEnum(string value) + { + return value switch + { + "false" => WavesV1SttPostParametersWordTimestamps.False, + "true" => WavesV1SttPostParametersWordTimestamps.True, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/SmallestAI/Generated/SmallestAI.SpeechToText.JsonSerializerContext.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.SpeechToText.JsonSerializerContext.g.cs index 0f597d5..1d030a6 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.SpeechToText.JsonSerializerContext.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.SpeechToText.JsonSerializerContext.g.cs @@ -15,10 +15,11 @@ namespace SmallestAI [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.WavesV1SttPostParametersModel), TypeInfoPropertyName = "WavesV1SttPostParametersModel2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.WavesV1SttPostParametersLanguage), TypeInfoPropertyName = "WavesV1SttPostParametersLanguage2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.WavesV1SttPostParametersWordTimestamps), TypeInfoPropertyName = "WavesV1SttPostParametersWordTimestamps2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.WavesV1SttPostParametersDiarize), TypeInfoPropertyName = "WavesV1SttPostParametersDiarize2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.WavesV1SttPostParametersWebhookMethod), TypeInfoPropertyName = "WavesV1SttPostParametersWebhookMethod2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.WavesV1SttPostParametersRedactPii), TypeInfoPropertyName = "WavesV1SttPostParametersRedactPii2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.WavesV1SttPostParametersRedactPci), TypeInfoPropertyName = "WavesV1SttPostParametersRedactPci2")] @@ -34,16 +35,19 @@ namespace SmallestAI [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.AsyncAccepted))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.SpeechToTextTranscribeResponse200), TypeInfoPropertyName = "SpeechToTextTranscribeResponse2002")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.SttErrorResponseDetailsItems))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.SttErrorResponseStatus), TypeInfoPropertyName = "SttErrorResponseStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.SttErrorResponseErrorsOneOf0Items))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.SttErrorResponseErrors), TypeInfoPropertyName = "SttErrorResponseErrors2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.SttErrorResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.TranscriptionUrlRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(byte[]))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.WavesV1SttPostParametersModel?), TypeInfoPropertyName = "NullableWavesV1SttPostParametersModel2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.WavesV1SttPostParametersLanguage?), TypeInfoPropertyName = "NullableWavesV1SttPostParametersLanguage2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.WavesV1SttPostParametersWordTimestamps?), TypeInfoPropertyName = "NullableWavesV1SttPostParametersWordTimestamps2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.WavesV1SttPostParametersDiarize?), TypeInfoPropertyName = "NullableWavesV1SttPostParametersDiarize2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.WavesV1SttPostParametersWebhookMethod?), TypeInfoPropertyName = "NullableWavesV1SttPostParametersWebhookMethod2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.WavesV1SttPostParametersRedactPii?), TypeInfoPropertyName = "NullableWavesV1SttPostParametersRedactPii2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.WavesV1SttPostParametersRedactPci?), TypeInfoPropertyName = "NullableWavesV1SttPostParametersRedactPci2")] @@ -51,9 +55,11 @@ namespace SmallestAI [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.WavesV1SttPostParametersGenderDetection?), TypeInfoPropertyName = "NullableWavesV1SttPostParametersGenderDetection2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.WavesV1SttPostParametersXExpireContent?), TypeInfoPropertyName = "NullableWavesV1SttPostParametersXExpireContent2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.SpeechToTextTranscribeResponse200?), TypeInfoPropertyName = "NullableSpeechToTextTranscribeResponse2002")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.SttErrorResponseStatus?), TypeInfoPropertyName = "NullableSttErrorResponseStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SmallestAI.SttErrorResponseErrors?), TypeInfoPropertyName = "NullableSttErrorResponseErrors2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] internal sealed partial class SpeechToTextSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext { } @@ -102,6 +108,7 @@ private SpeechToTextSourceGenerationContext(global::System.Text.Json.JsonSeriali public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) { options.Converters.Add(new global::SmallestAI.JsonConverters.SpeechToTextTranscribeResponse200JsonConverter()); + options.Converters.Add(new global::SmallestAI.JsonConverters.SttErrorResponseErrorsJsonConverter()); options.Converters.Add(new global::SmallestAI.JsonConverters.UnixTimestampJsonConverter()); options.Converters.Add(new LazyEnumJsonConverterFactory()); } @@ -132,6 +139,14 @@ public override bool CanConvert(global::System.Type typeToConvert) || typeToConvert == typeof(global::SmallestAI.WavesV1SttPostParametersLanguage?) + || typeToConvert == typeof(global::SmallestAI.WavesV1SttPostParametersWordTimestamps) + + || typeToConvert == typeof(global::SmallestAI.WavesV1SttPostParametersWordTimestamps?) + + || typeToConvert == typeof(global::SmallestAI.WavesV1SttPostParametersDiarize) + + || typeToConvert == typeof(global::SmallestAI.WavesV1SttPostParametersDiarize?) + || typeToConvert == typeof(global::SmallestAI.WavesV1SttPostParametersWebhookMethod) || typeToConvert == typeof(global::SmallestAI.WavesV1SttPostParametersWebhookMethod?) @@ -154,7 +169,11 @@ public override bool CanConvert(global::System.Type typeToConvert) || typeToConvert == typeof(global::SmallestAI.WavesV1SttPostParametersXExpireContent) - || typeToConvert == typeof(global::SmallestAI.WavesV1SttPostParametersXExpireContent?); + || typeToConvert == typeof(global::SmallestAI.WavesV1SttPostParametersXExpireContent?) + + || typeToConvert == typeof(global::SmallestAI.SttErrorResponseStatus) + + || typeToConvert == typeof(global::SmallestAI.SttErrorResponseStatus?); } public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( @@ -181,6 +200,26 @@ public override bool CanConvert(global::System.Type typeToConvert) return new global::SmallestAI.JsonConverters.WavesV1SttPostParametersLanguageNullableJsonConverter(); } + if (typeToConvert == typeof(global::SmallestAI.WavesV1SttPostParametersWordTimestamps)) + { + return new global::SmallestAI.JsonConverters.WavesV1SttPostParametersWordTimestampsJsonConverter(); + } + + if (typeToConvert == typeof(global::SmallestAI.WavesV1SttPostParametersWordTimestamps?)) + { + return new global::SmallestAI.JsonConverters.WavesV1SttPostParametersWordTimestampsNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::SmallestAI.WavesV1SttPostParametersDiarize)) + { + return new global::SmallestAI.JsonConverters.WavesV1SttPostParametersDiarizeJsonConverter(); + } + + if (typeToConvert == typeof(global::SmallestAI.WavesV1SttPostParametersDiarize?)) + { + return new global::SmallestAI.JsonConverters.WavesV1SttPostParametersDiarizeNullableJsonConverter(); + } + if (typeToConvert == typeof(global::SmallestAI.WavesV1SttPostParametersWebhookMethod)) { return new global::SmallestAI.JsonConverters.WavesV1SttPostParametersWebhookMethodJsonConverter(); @@ -240,6 +279,16 @@ public override bool CanConvert(global::System.Type typeToConvert) { return new global::SmallestAI.JsonConverters.WavesV1SttPostParametersXExpireContentNullableJsonConverter(); } + + if (typeToConvert == typeof(global::SmallestAI.SttErrorResponseStatus)) + { + return new global::SmallestAI.JsonConverters.SttErrorResponseStatusJsonConverter(); + } + + if (typeToConvert == typeof(global::SmallestAI.SttErrorResponseStatus?)) + { + return new global::SmallestAI.JsonConverters.SttErrorResponseStatusNullableJsonConverter(); + } throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); } } diff --git a/src/libs/SmallestAI/Generated/SmallestAI.SpeechToTextClient.Transcribe.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.SpeechToTextClient.Transcribe.g.cs index cca4ea7..ca09ddc 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.SpeechToTextClient.Transcribe.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.SpeechToTextClient.Transcribe.g.cs @@ -28,9 +28,9 @@ public partial class SpeechToTextClient partial void PrepareTranscribeArguments( global::System.Net.Http.HttpClient httpClient, ref global::SmallestAI.WavesV1SttPostParametersModel model, - ref global::SmallestAI.WavesV1SttPostParametersLanguage language, - ref bool? wordTimestamps, - ref bool? diarize, + ref global::SmallestAI.WavesV1SttPostParametersLanguage? language, + ref global::SmallestAI.WavesV1SttPostParametersWordTimestamps? wordTimestamps, + ref global::SmallestAI.WavesV1SttPostParametersDiarize? diarize, ref string? keywords, ref string? webhookUrl, ref global::SmallestAI.WavesV1SttPostParametersWebhookMethod? webhookMethod, @@ -45,9 +45,9 @@ partial void PrepareTranscribeRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, global::SmallestAI.WavesV1SttPostParametersModel model, - global::SmallestAI.WavesV1SttPostParametersLanguage language, - bool? wordTimestamps, - bool? diarize, + global::SmallestAI.WavesV1SttPostParametersLanguage? language, + global::SmallestAI.WavesV1SttPostParametersWordTimestamps? wordTimestamps, + global::SmallestAI.WavesV1SttPostParametersDiarize? diarize, string? keywords, string? webhookUrl, global::SmallestAI.WavesV1SttPostParametersWebhookMethod? webhookMethod, @@ -71,10 +71,10 @@ partial void ProcessTranscribeResponseContent( /// Transcribe (Pre-recorded)
/// Transcribe an audio file. The model is chosen via `?model=`:
/// - `?model=pulse-pro`: English-only, leaderboard-ranked accuracy. Raw bytes only; pass `webhook_url` to receive transcription asynchronously on long files.
- /// - `?model=pulse`: multilingual transcription (21 streaming + 26 pre-recorded languages), supports both raw bytes and audio-by-URL.
+ /// - `?model=pulse`: multilingual transcription (21 streaming + 12 pre-recorded languages), supports both raw bytes and audio-by-URL.
/// ## When to use this
- /// Use 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 (`WS /waves/v1/stt/live`) instead.
- /// Pulse Pro has no streaming worker today; calls to `WS /waves/v1/stt/live?model=pulse-pro` return `400` before the WebSocket upgrades.
+ /// Use 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 (`WS /waves/v1/stt/live?model=pulse`).
+ /// Pulse Pro is HTTP-only.
/// ## Input methods
/// - **Raw bytes**: `Content-Type: application/octet-stream` with the audio in the body. All knobs are query parameters.
/// - **URL (`?model=pulse` only)**: `Content-Type: application/json` with `{"url": "..."}` in the body.
@@ -129,9 +129,8 @@ partial void ProcessTranscribeResponseContent( /// ```
/// ## Common gotchas
/// - **`model` is required.** Missing or invalid values return `400` with an enum-validation error.
- /// - **Pulse Pro is English only.** Pass `language=en`. Other language codes are accepted at the wire level but produce unpredictable output.
- /// - **Pulse Pro does not support audio-by-URL.** Send raw bytes or use `?model=pulse` for the URL flow.
- /// - **Max payload 250 MB.** Larger requests return `413`. Compress to mono 16 kHz PCM if you are close to the limit; quality is unaffected. + /// - **Pulse Pro is English only.** Pass `language=en`. Any other value returns `400 invalid_enum_value` (`Expected 'en', received '<x>'`).
+ /// - **Pulse Pro does not support audio-by-URL.** Send raw bytes or use `?model=pulse` for the URL flow. ///
/// /// @@ -166,11 +165,11 @@ partial void ProcessTranscribeResponseContent( /// public async global::System.Threading.Tasks.Task TranscribeAsync( global::SmallestAI.WavesV1SttPostParametersModel model, - global::SmallestAI.WavesV1SttPostParametersLanguage language, byte[] request, - bool? wordTimestamps = default, - bool? diarize = default, + global::SmallestAI.WavesV1SttPostParametersLanguage? language = default, + global::SmallestAI.WavesV1SttPostParametersWordTimestamps? wordTimestamps = default, + global::SmallestAI.WavesV1SttPostParametersDiarize? diarize = default, string? keywords = default, string? webhookUrl = default, global::SmallestAI.WavesV1SttPostParametersWebhookMethod? webhookMethod = default, @@ -185,9 +184,9 @@ partial void ProcessTranscribeResponseContent( { var __response = await TranscribeAsResponseAsync( model: model, - language: language, request: request, + language: language, wordTimestamps: wordTimestamps, diarize: diarize, keywords: keywords, @@ -209,10 +208,10 @@ partial void ProcessTranscribeResponseContent( /// Transcribe (Pre-recorded)
/// Transcribe an audio file. The model is chosen via `?model=`:
/// - `?model=pulse-pro`: English-only, leaderboard-ranked accuracy. Raw bytes only; pass `webhook_url` to receive transcription asynchronously on long files.
- /// - `?model=pulse`: multilingual transcription (21 streaming + 26 pre-recorded languages), supports both raw bytes and audio-by-URL.
+ /// - `?model=pulse`: multilingual transcription (21 streaming + 12 pre-recorded languages), supports both raw bytes and audio-by-URL.
/// ## When to use this
- /// Use 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 (`WS /waves/v1/stt/live`) instead.
- /// Pulse Pro has no streaming worker today; calls to `WS /waves/v1/stt/live?model=pulse-pro` return `400` before the WebSocket upgrades.
+ /// Use 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 (`WS /waves/v1/stt/live?model=pulse`).
+ /// Pulse Pro is HTTP-only.
/// ## Input methods
/// - **Raw bytes**: `Content-Type: application/octet-stream` with the audio in the body. All knobs are query parameters.
/// - **URL (`?model=pulse` only)**: `Content-Type: application/json` with `{"url": "..."}` in the body.
@@ -267,9 +266,8 @@ partial void ProcessTranscribeResponseContent( /// ```
/// ## Common gotchas
/// - **`model` is required.** Missing or invalid values return `400` with an enum-validation error.
- /// - **Pulse Pro is English only.** Pass `language=en`. Other language codes are accepted at the wire level but produce unpredictable output.
- /// - **Pulse Pro does not support audio-by-URL.** Send raw bytes or use `?model=pulse` for the URL flow.
- /// - **Max payload 250 MB.** Larger requests return `413`. Compress to mono 16 kHz PCM if you are close to the limit; quality is unaffected. + /// - **Pulse Pro is English only.** Pass `language=en`. Any other value returns `400 invalid_enum_value` (`Expected 'en', received '<x>'`).
+ /// - **Pulse Pro does not support audio-by-URL.** Send raw bytes or use `?model=pulse` for the URL flow. ///
/// /// @@ -304,11 +302,11 @@ partial void ProcessTranscribeResponseContent( /// public async global::System.Threading.Tasks.Task> TranscribeAsResponseAsync( global::SmallestAI.WavesV1SttPostParametersModel model, - global::SmallestAI.WavesV1SttPostParametersLanguage language, byte[] request, - bool? wordTimestamps = default, - bool? diarize = default, + global::SmallestAI.WavesV1SttPostParametersLanguage? language = default, + global::SmallestAI.WavesV1SttPostParametersWordTimestamps? wordTimestamps = default, + global::SmallestAI.WavesV1SttPostParametersDiarize? diarize = default, string? keywords = default, string? webhookUrl = default, global::SmallestAI.WavesV1SttPostParametersWebhookMethod? webhookMethod = default, @@ -370,9 +368,9 @@ partial void ProcessTranscribeResponseContent( baseUri: HttpClient.BaseAddress); __pathBuilder .AddRequiredParameter("model", model.ToValueString()) - .AddRequiredParameter("language", language.ToValueString()) - .AddOptionalParameter("word_timestamps", wordTimestamps?.ToString().ToLowerInvariant()) - .AddOptionalParameter("diarize", diarize?.ToString().ToLowerInvariant()) + .AddOptionalParameter("language", language?.ToValueString()) + .AddOptionalParameter("word_timestamps", wordTimestamps?.ToValueString()) + .AddOptionalParameter("diarize", diarize?.ToValueString()) .AddOptionalParameter("keywords", keywords) .AddOptionalParameter("webhook_url", webhookUrl) .AddOptionalParameter("webhook_method", webhookMethod?.ToValueString()) @@ -624,7 +622,7 @@ partial void ProcessTranscribeResponseContent( retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } - // Missing or invalid `model` query parameter, invalid params, or unsupported feature combination (e.g. `?model=pulse-pro` on the WS endpoint, audio-by-URL with `?model=pulse-pro`). + // Invalid query parameters, empty audio, a language the model does not support, or a language not enabled in this region. if ((int)__response.StatusCode == 400) { string? __content_400 = null; @@ -661,7 +659,7 @@ partial void ProcessTranscribeResponseContent( h => h.Key, h => h.Value)); } - // API key missing or invalid. + // API key missing, invalid, or revoked. if ((int)__response.StatusCode == 401) { string? __content_401 = null; @@ -735,81 +733,81 @@ partial void ProcessTranscribeResponseContent( h => h.Key, h => h.Value)); } - // Payload exceeds 250 MB. - if ((int)__response.StatusCode == 413) + // RPM cap exceeded (Standard plan default 25/min per model). Retry with exponential backoff. + if ((int)__response.StatusCode == 429) { - string? __content_413 = null; - global::System.Exception? __exception_413 = null; - global::SmallestAI.SttErrorResponse? __value_413 = null; + string? __content_429 = null; + global::System.Exception? __exception_429 = null; + global::SmallestAI.SttErrorResponse? __value_429 = null; try { if (__effectiveReadResponseAsString) { - __content_413 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_413 = global::SmallestAI.SttErrorResponse.FromJson(__content_413, JsonSerializerContext); + __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_429 = global::SmallestAI.SttErrorResponse.FromJson(__content_429, JsonSerializerContext); } else { - __content_413 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_413 = global::SmallestAI.SttErrorResponse.FromJson(__content_413, JsonSerializerContext); + __value_429 = global::SmallestAI.SttErrorResponse.FromJson(__content_429, JsonSerializerContext); } } catch (global::System.Exception __ex) { - __exception_413 = __ex; + __exception_429 = __ex; } throw global::SmallestAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_413 ?? __response.ReasonPhrase ?? string.Empty, - innerException: __exception_413, - responseBody: __content_413, - responseObject: __value_413, + message: __content_429 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_429, + responseBody: __content_429, + responseObject: __value_429, responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, h => h.Value)); } - // RPM cap exceeded (Standard plan default 25/min per model). - if ((int)__response.StatusCode == 429) + // Unexpected server-side failure. Retry with exponential backoff. + if ((int)__response.StatusCode == 500) { - string? __content_429 = null; - global::System.Exception? __exception_429 = null; - global::SmallestAI.SttErrorResponse? __value_429 = null; + string? __content_500 = null; + global::System.Exception? __exception_500 = null; + global::SmallestAI.SttErrorResponse? __value_500 = null; try { if (__effectiveReadResponseAsString) { - __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_429 = global::SmallestAI.SttErrorResponse.FromJson(__content_429, JsonSerializerContext); + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_500 = global::SmallestAI.SttErrorResponse.FromJson(__content_500, JsonSerializerContext); } else { - __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_429 = global::SmallestAI.SttErrorResponse.FromJson(__content_429, JsonSerializerContext); + __value_500 = global::SmallestAI.SttErrorResponse.FromJson(__content_500, JsonSerializerContext); } } catch (global::System.Exception __ex) { - __exception_429 = __ex; + __exception_500 = __ex; } throw global::SmallestAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_429 ?? __response.ReasonPhrase ?? string.Empty, - innerException: __exception_429, - responseBody: __content_429, - responseObject: __value_429, + message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_500, + responseBody: __content_500, + responseObject: __value_500, responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, h => h.Value)); } - // Worker temporarily unavailable. + // Transcription service temporarily unavailable. Retry after a short backoff. if ((int)__response.StatusCode == 503) { string? __content_503 = null; diff --git a/src/libs/SmallestAI/Generated/SmallestAI.SpeechToTextClient.TranscribeWithJson.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.SpeechToTextClient.TranscribeWithJson.g.cs index 47a510a..40f0566 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.SpeechToTextClient.TranscribeWithJson.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.SpeechToTextClient.TranscribeWithJson.g.cs @@ -28,9 +28,9 @@ public partial class SpeechToTextClient partial void PrepareTranscribeWithJsonArguments( global::System.Net.Http.HttpClient httpClient, ref global::SmallestAI.WavesV1SttPostParametersModel model, - ref global::SmallestAI.WavesV1SttPostParametersLanguage language, - ref bool? wordTimestamps, - ref bool? diarize, + ref global::SmallestAI.WavesV1SttPostParametersLanguage? language, + ref global::SmallestAI.WavesV1SttPostParametersWordTimestamps? wordTimestamps, + ref global::SmallestAI.WavesV1SttPostParametersDiarize? diarize, ref string? keywords, ref string? webhookUrl, ref global::SmallestAI.WavesV1SttPostParametersWebhookMethod? webhookMethod, @@ -45,9 +45,9 @@ partial void PrepareTranscribeWithJsonRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, global::SmallestAI.WavesV1SttPostParametersModel model, - global::SmallestAI.WavesV1SttPostParametersLanguage language, - bool? wordTimestamps, - bool? diarize, + global::SmallestAI.WavesV1SttPostParametersLanguage? language, + global::SmallestAI.WavesV1SttPostParametersWordTimestamps? wordTimestamps, + global::SmallestAI.WavesV1SttPostParametersDiarize? diarize, string? keywords, string? webhookUrl, global::SmallestAI.WavesV1SttPostParametersWebhookMethod? webhookMethod, @@ -71,10 +71,10 @@ partial void ProcessTranscribeWithJsonResponseContent( /// Transcribe (Pre-recorded)
/// Transcribe an audio file. The model is chosen via `?model=`:
/// - `?model=pulse-pro`: English-only, leaderboard-ranked accuracy. Raw bytes only; pass `webhook_url` to receive transcription asynchronously on long files.
- /// - `?model=pulse`: multilingual transcription (21 streaming + 26 pre-recorded languages), supports both raw bytes and audio-by-URL.
+ /// - `?model=pulse`: multilingual transcription (21 streaming + 12 pre-recorded languages), supports both raw bytes and audio-by-URL.
/// ## When to use this
- /// Use 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 (`WS /waves/v1/stt/live`) instead.
- /// Pulse Pro has no streaming worker today; calls to `WS /waves/v1/stt/live?model=pulse-pro` return `400` before the WebSocket upgrades.
+ /// Use 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 (`WS /waves/v1/stt/live?model=pulse`).
+ /// Pulse Pro is HTTP-only.
/// ## Input methods
/// - **Raw bytes**: `Content-Type: application/octet-stream` with the audio in the body. All knobs are query parameters.
/// - **URL (`?model=pulse` only)**: `Content-Type: application/json` with `{"url": "..."}` in the body.
@@ -129,9 +129,8 @@ partial void ProcessTranscribeWithJsonResponseContent( /// ```
/// ## Common gotchas
/// - **`model` is required.** Missing or invalid values return `400` with an enum-validation error.
- /// - **Pulse Pro is English only.** Pass `language=en`. Other language codes are accepted at the wire level but produce unpredictable output.
- /// - **Pulse Pro does not support audio-by-URL.** Send raw bytes or use `?model=pulse` for the URL flow.
- /// - **Max payload 250 MB.** Larger requests return `413`. Compress to mono 16 kHz PCM if you are close to the limit; quality is unaffected. + /// - **Pulse Pro is English only.** Pass `language=en`. Any other value returns `400 invalid_enum_value` (`Expected 'en', received '<x>'`).
+ /// - **Pulse Pro does not support audio-by-URL.** Send raw bytes or use `?model=pulse` for the URL flow. ///
/// /// @@ -166,11 +165,11 @@ partial void ProcessTranscribeWithJsonResponseContent( /// public async global::System.Threading.Tasks.Task TranscribeWithJsonAsync( global::SmallestAI.WavesV1SttPostParametersModel model, - global::SmallestAI.WavesV1SttPostParametersLanguage language, global::SmallestAI.TranscriptionUrlRequest request, - bool? wordTimestamps = default, - bool? diarize = default, + global::SmallestAI.WavesV1SttPostParametersLanguage? language = default, + global::SmallestAI.WavesV1SttPostParametersWordTimestamps? wordTimestamps = default, + global::SmallestAI.WavesV1SttPostParametersDiarize? diarize = default, string? keywords = default, string? webhookUrl = default, global::SmallestAI.WavesV1SttPostParametersWebhookMethod? webhookMethod = default, @@ -185,9 +184,9 @@ partial void ProcessTranscribeWithJsonResponseContent( { var __response = await TranscribeWithJsonAsResponseAsync( model: model, - language: language, request: request, + language: language, wordTimestamps: wordTimestamps, diarize: diarize, keywords: keywords, @@ -209,10 +208,10 @@ partial void ProcessTranscribeWithJsonResponseContent( /// Transcribe (Pre-recorded)
/// Transcribe an audio file. The model is chosen via `?model=`:
/// - `?model=pulse-pro`: English-only, leaderboard-ranked accuracy. Raw bytes only; pass `webhook_url` to receive transcription asynchronously on long files.
- /// - `?model=pulse`: multilingual transcription (21 streaming + 26 pre-recorded languages), supports both raw bytes and audio-by-URL.
+ /// - `?model=pulse`: multilingual transcription (21 streaming + 12 pre-recorded languages), supports both raw bytes and audio-by-URL.
/// ## When to use this
- /// Use 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 (`WS /waves/v1/stt/live`) instead.
- /// Pulse Pro has no streaming worker today; calls to `WS /waves/v1/stt/live?model=pulse-pro` return `400` before the WebSocket upgrades.
+ /// Use 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 (`WS /waves/v1/stt/live?model=pulse`).
+ /// Pulse Pro is HTTP-only.
/// ## Input methods
/// - **Raw bytes**: `Content-Type: application/octet-stream` with the audio in the body. All knobs are query parameters.
/// - **URL (`?model=pulse` only)**: `Content-Type: application/json` with `{"url": "..."}` in the body.
@@ -267,9 +266,8 @@ partial void ProcessTranscribeWithJsonResponseContent( /// ```
/// ## Common gotchas
/// - **`model` is required.** Missing or invalid values return `400` with an enum-validation error.
- /// - **Pulse Pro is English only.** Pass `language=en`. Other language codes are accepted at the wire level but produce unpredictable output.
- /// - **Pulse Pro does not support audio-by-URL.** Send raw bytes or use `?model=pulse` for the URL flow.
- /// - **Max payload 250 MB.** Larger requests return `413`. Compress to mono 16 kHz PCM if you are close to the limit; quality is unaffected. + /// - **Pulse Pro is English only.** Pass `language=en`. Any other value returns `400 invalid_enum_value` (`Expected 'en', received '<x>'`).
+ /// - **Pulse Pro does not support audio-by-URL.** Send raw bytes or use `?model=pulse` for the URL flow. /// /// /// @@ -304,11 +302,11 @@ partial void ProcessTranscribeWithJsonResponseContent( /// public async global::System.Threading.Tasks.Task> TranscribeWithJsonAsResponseAsync( global::SmallestAI.WavesV1SttPostParametersModel model, - global::SmallestAI.WavesV1SttPostParametersLanguage language, global::SmallestAI.TranscriptionUrlRequest request, - bool? wordTimestamps = default, - bool? diarize = default, + global::SmallestAI.WavesV1SttPostParametersLanguage? language = default, + global::SmallestAI.WavesV1SttPostParametersWordTimestamps? wordTimestamps = default, + global::SmallestAI.WavesV1SttPostParametersDiarize? diarize = default, string? keywords = default, string? webhookUrl = default, global::SmallestAI.WavesV1SttPostParametersWebhookMethod? webhookMethod = default, @@ -370,9 +368,9 @@ partial void ProcessTranscribeWithJsonResponseContent( baseUri: HttpClient.BaseAddress); __pathBuilder .AddRequiredParameter("model", model.ToValueString()) - .AddRequiredParameter("language", language.ToValueString()) - .AddOptionalParameter("word_timestamps", wordTimestamps?.ToString().ToLowerInvariant()) - .AddOptionalParameter("diarize", diarize?.ToString().ToLowerInvariant()) + .AddOptionalParameter("language", language?.ToValueString()) + .AddOptionalParameter("word_timestamps", wordTimestamps?.ToValueString()) + .AddOptionalParameter("diarize", diarize?.ToValueString()) .AddOptionalParameter("keywords", keywords) .AddOptionalParameter("webhook_url", webhookUrl) .AddOptionalParameter("webhook_method", webhookMethod?.ToValueString()) @@ -626,7 +624,7 @@ partial void ProcessTranscribeWithJsonResponseContent( retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } - // Missing or invalid `model` query parameter, invalid params, or unsupported feature combination (e.g. `?model=pulse-pro` on the WS endpoint, audio-by-URL with `?model=pulse-pro`). + // Invalid query parameters, empty audio, a language the model does not support, or a language not enabled in this region. if ((int)__response.StatusCode == 400) { string? __content_400 = null; @@ -663,7 +661,7 @@ partial void ProcessTranscribeWithJsonResponseContent( h => h.Key, h => h.Value)); } - // API key missing or invalid. + // API key missing, invalid, or revoked. if ((int)__response.StatusCode == 401) { string? __content_401 = null; @@ -737,81 +735,81 @@ partial void ProcessTranscribeWithJsonResponseContent( h => h.Key, h => h.Value)); } - // Payload exceeds 250 MB. - if ((int)__response.StatusCode == 413) + // RPM cap exceeded (Standard plan default 25/min per model). Retry with exponential backoff. + if ((int)__response.StatusCode == 429) { - string? __content_413 = null; - global::System.Exception? __exception_413 = null; - global::SmallestAI.SttErrorResponse? __value_413 = null; + string? __content_429 = null; + global::System.Exception? __exception_429 = null; + global::SmallestAI.SttErrorResponse? __value_429 = null; try { if (__effectiveReadResponseAsString) { - __content_413 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_413 = global::SmallestAI.SttErrorResponse.FromJson(__content_413, JsonSerializerContext); + __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_429 = global::SmallestAI.SttErrorResponse.FromJson(__content_429, JsonSerializerContext); } else { - __content_413 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_413 = global::SmallestAI.SttErrorResponse.FromJson(__content_413, JsonSerializerContext); + __value_429 = global::SmallestAI.SttErrorResponse.FromJson(__content_429, JsonSerializerContext); } } catch (global::System.Exception __ex) { - __exception_413 = __ex; + __exception_429 = __ex; } throw global::SmallestAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_413 ?? __response.ReasonPhrase ?? string.Empty, - innerException: __exception_413, - responseBody: __content_413, - responseObject: __value_413, + message: __content_429 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_429, + responseBody: __content_429, + responseObject: __value_429, responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, h => h.Value)); } - // RPM cap exceeded (Standard plan default 25/min per model). - if ((int)__response.StatusCode == 429) + // Unexpected server-side failure. Retry with exponential backoff. + if ((int)__response.StatusCode == 500) { - string? __content_429 = null; - global::System.Exception? __exception_429 = null; - global::SmallestAI.SttErrorResponse? __value_429 = null; + string? __content_500 = null; + global::System.Exception? __exception_500 = null; + global::SmallestAI.SttErrorResponse? __value_500 = null; try { if (__effectiveReadResponseAsString) { - __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_429 = global::SmallestAI.SttErrorResponse.FromJson(__content_429, JsonSerializerContext); + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_500 = global::SmallestAI.SttErrorResponse.FromJson(__content_500, JsonSerializerContext); } else { - __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); - __value_429 = global::SmallestAI.SttErrorResponse.FromJson(__content_429, JsonSerializerContext); + __value_500 = global::SmallestAI.SttErrorResponse.FromJson(__content_500, JsonSerializerContext); } } catch (global::System.Exception __ex) { - __exception_429 = __ex; + __exception_500 = __ex; } throw global::SmallestAI.ApiException.Create( statusCode: __response.StatusCode, - message: __content_429 ?? __response.ReasonPhrase ?? string.Empty, - innerException: __exception_429, - responseBody: __content_429, - responseObject: __value_429, + message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_500, + responseBody: __content_500, + responseObject: __value_500, responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, h => h.Value)); } - // Worker temporarily unavailable. + // Transcription service temporarily unavailable. Retry after a short backoff. if ((int)__response.StatusCode == 503) { string? __content_503 = null; @@ -948,10 +946,10 @@ partial void ProcessTranscribeWithJsonResponseContent( /// Transcribe (Pre-recorded)
/// Transcribe an audio file. The model is chosen via `?model=`:
/// - `?model=pulse-pro`: English-only, leaderboard-ranked accuracy. Raw bytes only; pass `webhook_url` to receive transcription asynchronously on long files.
- /// - `?model=pulse`: multilingual transcription (21 streaming + 26 pre-recorded languages), supports both raw bytes and audio-by-URL.
+ /// - `?model=pulse`: multilingual transcription (21 streaming + 12 pre-recorded languages), supports both raw bytes and audio-by-URL.
/// ## When to use this
- /// Use 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 (`WS /waves/v1/stt/live`) instead.
- /// Pulse Pro has no streaming worker today; calls to `WS /waves/v1/stt/live?model=pulse-pro` return `400` before the WebSocket upgrades.
+ /// Use 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 (`WS /waves/v1/stt/live?model=pulse`).
+ /// Pulse Pro is HTTP-only.
/// ## Input methods
/// - **Raw bytes**: `Content-Type: application/octet-stream` with the audio in the body. All knobs are query parameters.
/// - **URL (`?model=pulse` only)**: `Content-Type: application/json` with `{"url": "..."}` in the body.
@@ -1006,9 +1004,8 @@ partial void ProcessTranscribeWithJsonResponseContent( /// ```
/// ## Common gotchas
/// - **`model` is required.** Missing or invalid values return `400` with an enum-validation error.
- /// - **Pulse Pro is English only.** Pass `language=en`. Other language codes are accepted at the wire level but produce unpredictable output.
- /// - **Pulse Pro does not support audio-by-URL.** Send raw bytes or use `?model=pulse` for the URL flow.
- /// - **Max payload 250 MB.** Larger requests return `413`. Compress to mono 16 kHz PCM if you are close to the limit; quality is unaffected. + /// - **Pulse Pro is English only.** Pass `language=en`. Any other value returns `400 invalid_enum_value` (`Expected 'en', received '<x>'`).
+ /// - **Pulse Pro does not support audio-by-URL.** Send raw bytes or use `?model=pulse` for the URL flow. /// /// /// @@ -1045,10 +1042,10 @@ partial void ProcessTranscribeWithJsonResponseContent( /// public async global::System.Threading.Tasks.Task TranscribeWithJsonAsync( global::SmallestAI.WavesV1SttPostParametersModel model, - global::SmallestAI.WavesV1SttPostParametersLanguage language, string url, - bool? wordTimestamps = default, - bool? diarize = default, + global::SmallestAI.WavesV1SttPostParametersLanguage? language = default, + global::SmallestAI.WavesV1SttPostParametersWordTimestamps? wordTimestamps = default, + global::SmallestAI.WavesV1SttPostParametersDiarize? diarize = default, string? keywords = default, string? webhookUrl = default, global::SmallestAI.WavesV1SttPostParametersWebhookMethod? webhookMethod = default, diff --git a/src/libs/SmallestAI/Generated/SmallestAI.TextToSpeechClient.SynthesizeSpeech.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.TextToSpeechClient.SynthesizeSpeech.g.cs index 142a982..1d4bbec 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.TextToSpeechClient.SynthesizeSpeech.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.TextToSpeechClient.SynthesizeSpeech.g.cs @@ -49,7 +49,7 @@ partial void ProcessSynthesizeSpeechResponseContent( /// 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.
- /// **Language behaviour on `lightning_v3.1_pro`:** pass `language: en` for UK + American accented English, pass `language: hi` for Indian accented English + Hindi (code-switching), or omit `language` to default to `en + hi` (mixed Indian + Western English coverage). Pro supports 31 languages total (10 Indic, 8 Asian & Middle Eastern, 13 European including Dutch and Swedish). Pass the matching ISO 639-1 code (e.g. `ta`, `de`, `ja`) with a Pro voice from that language, or use `auto` to route across all supported languages with any English or Hindi voice. See the [Lightning v3.1 Pro model card](/models/model-cards/text-to-speech/lightning-v-3-1-pro#supported-languages) for the full list. On `lightning_v3.1` the model accepts 20 language codes (10 European + 10 Indic) plus `auto`; the trained voice catalog covers 12 of those directly.
+ /// **Language behaviour on `lightning_v3.1_pro`:** pass `language: en` for UK + American accented English, pass `language: hi` for Indian accented English + Hindi (code-switching), or omit `language` to default to `en + hi` (mixed Indian + Western English coverage). Pro supports 31 languages total (10 Indic, 8 Asian & Middle Eastern, 13 European including Dutch and Swedish). Pass the matching ISO 639-1 code (e.g. `ta`, `de`, `ja`) with a Pro voice from that language, or use `auto` to route across all supported languages with any English or Hindi voice. See the [Lightning v3.1 Pro model card](/model-cards/text-to-speech/lightning-v-3-1-pro#supported-languages) for the full list. On `lightning_v3.1` the model accepts 20 language codes (10 European + 10 Indic) plus `auto`; the trained voice catalog covers 12 of those directly.
/// ## 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).
@@ -158,7 +158,7 @@ partial void ProcessSynthesizeSpeechResponseContent( /// 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.
- /// **Language behaviour on `lightning_v3.1_pro`:** pass `language: en` for UK + American accented English, pass `language: hi` for Indian accented English + Hindi (code-switching), or omit `language` to default to `en + hi` (mixed Indian + Western English coverage). Pro supports 31 languages total (10 Indic, 8 Asian & Middle Eastern, 13 European including Dutch and Swedish). Pass the matching ISO 639-1 code (e.g. `ta`, `de`, `ja`) with a Pro voice from that language, or use `auto` to route across all supported languages with any English or Hindi voice. See the [Lightning v3.1 Pro model card](/models/model-cards/text-to-speech/lightning-v-3-1-pro#supported-languages) for the full list. On `lightning_v3.1` the model accepts 20 language codes (10 European + 10 Indic) plus `auto`; the trained voice catalog covers 12 of those directly.
+ /// **Language behaviour on `lightning_v3.1_pro`:** pass `language: en` for UK + American accented English, pass `language: hi` for Indian accented English + Hindi (code-switching), or omit `language` to default to `en + hi` (mixed Indian + Western English coverage). Pro supports 31 languages total (10 Indic, 8 Asian & Middle Eastern, 13 European including Dutch and Swedish). Pass the matching ISO 639-1 code (e.g. `ta`, `de`, `ja`) with a Pro voice from that language, or use `auto` to route across all supported languages with any English or Hindi voice. See the [Lightning v3.1 Pro model card](/model-cards/text-to-speech/lightning-v-3-1-pro#supported-languages) for the full list. On `lightning_v3.1` the model accepts 20 language codes (10 European + 10 Indic) plus `auto`; the trained voice catalog covers 12 of those directly.
/// ## 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).
@@ -688,7 +688,7 @@ partial void ProcessSynthesizeSpeechResponseContent( /// 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.
- /// **Language behaviour on `lightning_v3.1_pro`:** pass `language: en` for UK + American accented English, pass `language: hi` for Indian accented English + Hindi (code-switching), or omit `language` to default to `en + hi` (mixed Indian + Western English coverage). Pro supports 31 languages total (10 Indic, 8 Asian & Middle Eastern, 13 European including Dutch and Swedish). Pass the matching ISO 639-1 code (e.g. `ta`, `de`, `ja`) with a Pro voice from that language, or use `auto` to route across all supported languages with any English or Hindi voice. See the [Lightning v3.1 Pro model card](/models/model-cards/text-to-speech/lightning-v-3-1-pro#supported-languages) for the full list. On `lightning_v3.1` the model accepts 20 language codes (10 European + 10 Indic) plus `auto`; the trained voice catalog covers 12 of those directly.
+ /// **Language behaviour on `lightning_v3.1_pro`:** pass `language: en` for UK + American accented English, pass `language: hi` for Indian accented English + Hindi (code-switching), or omit `language` to default to `en + hi` (mixed Indian + Western English coverage). Pro supports 31 languages total (10 Indic, 8 Asian & Middle Eastern, 13 European including Dutch and Swedish). Pass the matching ISO 639-1 code (e.g. `ta`, `de`, `ja`) with a Pro voice from that language, or use `auto` to route across all supported languages with any English or Hindi voice. See the [Lightning v3.1 Pro model card](/model-cards/text-to-speech/lightning-v-3-1-pro#supported-languages) for the full list. On `lightning_v3.1` the model accepts 20 language codes (10 European + 10 Indic) plus `auto`; the trained voice catalog covers 12 of those directly.
/// ## 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).
@@ -1255,7 +1255,7 @@ partial void ProcessSynthesizeSpeechResponseContent( /// 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.
- /// **Language behaviour on `lightning_v3.1_pro`:** pass `language: en` for UK + American accented English, pass `language: hi` for Indian accented English + Hindi (code-switching), or omit `language` to default to `en + hi` (mixed Indian + Western English coverage). Pro supports 31 languages total (10 Indic, 8 Asian & Middle Eastern, 13 European including Dutch and Swedish). Pass the matching ISO 639-1 code (e.g. `ta`, `de`, `ja`) with a Pro voice from that language, or use `auto` to route across all supported languages with any English or Hindi voice. See the [Lightning v3.1 Pro model card](/models/model-cards/text-to-speech/lightning-v-3-1-pro#supported-languages) for the full list. On `lightning_v3.1` the model accepts 20 language codes (10 European + 10 Indic) plus `auto`; the trained voice catalog covers 12 of those directly.
+ /// **Language behaviour on `lightning_v3.1_pro`:** pass `language: en` for UK + American accented English, pass `language: hi` for Indian accented English + Hindi (code-switching), or omit `language` to default to `en + hi` (mixed Indian + Western English coverage). Pro supports 31 languages total (10 Indic, 8 Asian & Middle Eastern, 13 European including Dutch and Swedish). Pass the matching ISO 639-1 code (e.g. `ta`, `de`, `ja`) with a Pro voice from that language, or use `auto` to route across all supported languages with any English or Hindi voice. See the [Lightning v3.1 Pro model card](/model-cards/text-to-speech/lightning-v-3-1-pro#supported-languages) for the full list. On `lightning_v3.1` the model accepts 20 language codes (10 European + 10 Indic) plus `auto`; the trained voice catalog covers 12 of those directly.
/// ## 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).
@@ -1351,7 +1351,7 @@ partial void ProcessSynthesizeSpeechResponseContent( /// - `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](/models/model-cards/text-to-speech/lightning-v-3-1-pro)
+ /// [Lightning v3.1 Pro model card](/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.
@@ -1438,7 +1438,7 @@ partial void ProcessSynthesizeSpeechResponseContent( /// wrong-glyph `x`/`X`) fire glued or spaced (`5x3`, `5 x 3`).
/// The ambiguous `-` `–` `−` and `/` fire only when
/// space-padded, so `5-3` stays a range and `1/2` stays a
- /// fraction. See [Math notation](/models/documentation/text-to-speech-lightning/math-notation)
+ /// fraction. See [Math notation](/models/text-to-speech/math-notation)
/// for the full lexicon, known limitations (product dimensions,
/// `24x7` idiom, vehicle-reg codes), and EU-language
/// localizations.
@@ -1455,7 +1455,7 @@ partial void ProcessSynthesizeSpeechResponseContent( /// `action: "flag"` synthesizes normally and records the match.
/// Matching is whole-word, not substring. If no verdict is returned
/// the request fails open and the audio is synthesized unfiltered.
- /// See [Content filter](/models/documentation/text-to-speech-lightning/content-filter). + /// See [Content filter](/models/text-to-speech/content-filter). /// /// /// Format of the returned audio. `pcm` is the lowest-latency option
@@ -1469,7 +1469,7 @@ partial void ProcessSynthesizeSpeechResponseContent( /// The IDs of the pronunciation dictionaries to use for speech generation. Available on both `lightning_v3.1` and `lightning_v3.1_pro`. /// /// - /// **WebSocket-only feature.** Accepted on this endpoint but ignored — no per-word timing information is returned in the sync HTTP or SSE response shape. To receive `status: "word_timestamp"` frames with per-word `{ id, word, start, end }` data, use the WebSocket endpoint `wss://api.smallest.ai/waves/v1/tts/live`. See [Word-level timestamps](/models/documentation/text-to-speech-lightning/word-timestamps).
+ /// **WebSocket-only feature.** Accepted on this endpoint but ignored — no per-word timing information is returned in the sync HTTP or SSE response shape. To receive `status: "word_timestamp"` frames with per-word `{ id, word, start, end }` data, use the WebSocket endpoint `wss://api.smallest.ai/waves/v1/tts/live`. See [Word-level timestamps](/models/text-to-speech/word-timestamps).
/// Default Value: false /// /// diff --git a/src/libs/SmallestAI/Generated/SmallestAI.TextToSpeechClient.SynthesizeSpeechSse.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.TextToSpeechClient.SynthesizeSpeechSse.g.cs index 19a8d10..e17d0cc 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.TextToSpeechClient.SynthesizeSpeechSse.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.TextToSpeechClient.SynthesizeSpeechSse.g.cs @@ -43,7 +43,7 @@ partial void ProcessSynthesizeSpeechSseResponse( /// Synthesize speech and stream the audio back over Server-Sent Events. Same body as `/waves/v1/tts` — the only difference is the response is a stream of base64-encoded PCM chunks instead of one binary blob.
/// Pick the model with the `model` body parameter, same as the sync route.
/// <Note>
- /// **The same URL serves the WebSocket endpoint.** `wss://api.smallest.ai/waves/v1/tts/live` accepts a WebSocket upgrade for streaming-text scenarios (LLM token streams, live captioning). The HTTP `POST` documented on this page returns SSE; use `wss://` to use the WebSocket protocol instead. See the [WebSocket reference](/models/documentation/text-to-speech-lightning/streaming).
+ /// **The same URL serves the WebSocket endpoint.** `wss://api.smallest.ai/waves/v1/tts/live` accepts a WebSocket upgrade for streaming-text scenarios (LLM token streams, live captioning). The HTTP `POST` documented on this page returns SSE; use `wss://` to use the WebSocket protocol instead. See the [WebSocket reference](/models/text-to-speech/streaming).
/// </Note>
/// ## When to use this
/// - **Use this** when you want playback to start before synthesis is complete — long passages, latency-sensitive UI, live narration.
@@ -423,7 +423,7 @@ partial void ProcessSynthesizeSpeechSseResponse( /// Synthesize speech and stream the audio back over Server-Sent Events. Same body as `/waves/v1/tts` — the only difference is the response is a stream of base64-encoded PCM chunks instead of one binary blob.
/// Pick the model with the `model` body parameter, same as the sync route.
/// <Note>
- /// **The same URL serves the WebSocket endpoint.** `wss://api.smallest.ai/waves/v1/tts/live` accepts a WebSocket upgrade for streaming-text scenarios (LLM token streams, live captioning). The HTTP `POST` documented on this page returns SSE; use `wss://` to use the WebSocket protocol instead. See the [WebSocket reference](/models/documentation/text-to-speech-lightning/streaming).
+ /// **The same URL serves the WebSocket endpoint.** `wss://api.smallest.ai/waves/v1/tts/live` accepts a WebSocket upgrade for streaming-text scenarios (LLM token streams, live captioning). The HTTP `POST` documented on this page returns SSE; use `wss://` to use the WebSocket protocol instead. See the [WebSocket reference](/models/text-to-speech/streaming).
/// </Note>
/// ## When to use this
/// - **Use this** when you want playback to start before synthesis is complete — long passages, latency-sensitive UI, live narration.
@@ -467,7 +467,7 @@ partial void ProcessSynthesizeSpeechSseResponse( /// - `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](/models/model-cards/text-to-speech/lightning-v-3-1-pro)
+ /// [Lightning v3.1 Pro model card](/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.
@@ -554,7 +554,7 @@ partial void ProcessSynthesizeSpeechSseResponse( /// wrong-glyph `x`/`X`) fire glued or spaced (`5x3`, `5 x 3`).
/// The ambiguous `-` `–` `−` and `/` fire only when
/// space-padded, so `5-3` stays a range and `1/2` stays a
- /// fraction. See [Math notation](/models/documentation/text-to-speech-lightning/math-notation)
+ /// fraction. See [Math notation](/models/text-to-speech/math-notation)
/// for the full lexicon, known limitations (product dimensions,
/// `24x7` idiom, vehicle-reg codes), and EU-language
/// localizations.
@@ -571,7 +571,7 @@ partial void ProcessSynthesizeSpeechSseResponse( /// `action: "flag"` synthesizes normally and records the match.
/// Matching is whole-word, not substring. If no verdict is returned
/// the request fails open and the audio is synthesized unfiltered.
- /// See [Content filter](/models/documentation/text-to-speech-lightning/content-filter). + /// See [Content filter](/models/text-to-speech/content-filter). /// /// /// Format of the returned audio. `pcm` is the lowest-latency option
@@ -585,7 +585,7 @@ partial void ProcessSynthesizeSpeechSseResponse( /// The IDs of the pronunciation dictionaries to use for speech generation. Available on both `lightning_v3.1` and `lightning_v3.1_pro`. /// /// - /// **WebSocket-only feature.** Accepted on this endpoint but ignored — no per-word timing information is returned in the sync HTTP or SSE response shape. To receive `status: "word_timestamp"` frames with per-word `{ id, word, start, end }` data, use the WebSocket endpoint `wss://api.smallest.ai/waves/v1/tts/live`. See [Word-level timestamps](/models/documentation/text-to-speech-lightning/word-timestamps).
+ /// **WebSocket-only feature.** Accepted on this endpoint but ignored — no per-word timing information is returned in the sync HTTP or SSE response shape. To receive `status: "word_timestamp"` frames with per-word `{ id, word, start, end }` data, use the WebSocket endpoint `wss://api.smallest.ai/waves/v1/tts/live`. See [Word-level timestamps](/models/text-to-speech/word-timestamps).
/// Default Value: false /// /// diff --git a/src/libs/SmallestAI/Generated/SmallestAI.VoicesClient.GetWavesVoices.g.cs b/src/libs/SmallestAI/Generated/SmallestAI.VoicesClient.GetWavesVoices.g.cs index c68c596..c7b5ce1 100644 --- a/src/libs/SmallestAI/Generated/SmallestAI.VoicesClient.GetWavesVoices.g.cs +++ b/src/libs/SmallestAI/Generated/SmallestAI.VoicesClient.GetWavesVoices.g.cs @@ -47,8 +47,8 @@ partial void ProcessGetWavesVoicesResponseContent( /// - `lightning-v3.1` — the Standard catalog. Supports voice cloning; 20 language codes.
/// - `lightning-v3.1-pro` — the Pro catalog. Curated set across American, British, and Indian accents plus 29 additional languages. Same latency and concurrency as Standard, on dedicated inference.
/// The endpoint is pool-scoped: `/waves/v1/lightning-v3.1/get_voices` returns Standard voices only; `/waves/v1/lightning-v3.1-pro/get_voices` returns Pro voices only. Call one or both depending on which pool you plan to use.
- /// Each voice carries tags (`language`, `accent`, `gender`, `age`, `emotions`, `usecases`). Filter client-side to find the voices that match a target language, accent, or use case. Pass the returned `voiceId` as `voice_id` on the unified [`POST /waves/v1/tts`](/models/api-reference/text-to-speech/synthesize-speech) route, together with `"model": "lightning_v3.1"` (Standard) or `"model": "lightning_v3.1_pro"` (Pro).
- /// For the canonical per-language voice list (with previews and recommended pairings), see the [Lightning v3.1](/models/model-cards/text-to-speech/lightning-v-3-1) and [Lightning v3.1 Pro](/models/model-cards/text-to-speech/lightning-v-3-1-pro) model cards. + /// Each voice carries tags (`language`, `accent`, `gender`, `age`, `emotions`, `usecases`). Filter client-side to find the voices that match a target language, accent, or use case. Pass the returned `voiceId` as `voice_id` on the unified [`POST /waves/v1/tts`](/api-reference/models/text-to-speech/synthesize-speech) route, together with `"model": "lightning_v3.1"` (Standard) or `"model": "lightning_v3.1_pro"` (Pro).
+ /// For the canonical per-language voice list (with previews and recommended pairings), see the [Lightning v3.1](/model-cards/text-to-speech/lightning-v-3-1) and [Lightning v3.1 Pro](/model-cards/text-to-speech/lightning-v-3-1-pro) model cards. /// /// /// Default Value: lightning-v3.1 @@ -75,8 +75,8 @@ partial void ProcessGetWavesVoicesResponseContent( /// - `lightning-v3.1` — the Standard catalog. Supports voice cloning; 20 language codes.
/// - `lightning-v3.1-pro` — the Pro catalog. Curated set across American, British, and Indian accents plus 29 additional languages. Same latency and concurrency as Standard, on dedicated inference.
/// The endpoint is pool-scoped: `/waves/v1/lightning-v3.1/get_voices` returns Standard voices only; `/waves/v1/lightning-v3.1-pro/get_voices` returns Pro voices only. Call one or both depending on which pool you plan to use.
- /// Each voice carries tags (`language`, `accent`, `gender`, `age`, `emotions`, `usecases`). Filter client-side to find the voices that match a target language, accent, or use case. Pass the returned `voiceId` as `voice_id` on the unified [`POST /waves/v1/tts`](/models/api-reference/text-to-speech/synthesize-speech) route, together with `"model": "lightning_v3.1"` (Standard) or `"model": "lightning_v3.1_pro"` (Pro).
- /// For the canonical per-language voice list (with previews and recommended pairings), see the [Lightning v3.1](/models/model-cards/text-to-speech/lightning-v-3-1) and [Lightning v3.1 Pro](/models/model-cards/text-to-speech/lightning-v-3-1-pro) model cards. + /// Each voice carries tags (`language`, `accent`, `gender`, `age`, `emotions`, `usecases`). Filter client-side to find the voices that match a target language, accent, or use case. Pass the returned `voiceId` as `voice_id` on the unified [`POST /waves/v1/tts`](/api-reference/models/text-to-speech/synthesize-speech) route, together with `"model": "lightning_v3.1"` (Standard) or `"model": "lightning_v3.1_pro"` (Pro).
+ /// For the canonical per-language voice list (with previews and recommended pairings), see the [Lightning v3.1](/model-cards/text-to-speech/lightning-v-3-1) and [Lightning v3.1 Pro](/model-cards/text-to-speech/lightning-v-3-1-pro) model cards. /// /// /// Default Value: lightning-v3.1 diff --git a/src/libs/SmallestAI/openapi.yaml b/src/libs/SmallestAI/openapi.yaml index be781a0..d9e5ef6 100644 --- a/src/libs/SmallestAI/openapi.yaml +++ b/src/libs/SmallestAI/openapi.yaml @@ -1,7 +1,7 @@ { "openapi": "3.1.0", "info": { - "title": "API Reference", + "title": "Models API", "version": "1.0.0" }, "paths": { @@ -9,7 +9,7 @@ "post": { "operationId": "auth_create_access_token", "summary": "Create access token", - "description": "Mint a short-lived access token from your API key. Call this from your server,\nthen hand the returned `access_token` to a browser or mobile client. The client\nsends it as `Authorization: Bearer ` on TTS, STT and speech-to-speech\nrequests. On\nWebSocket connections it can also go in the `api_key` query parameter. HTTP\nrequests must use the header.\n\nA token works any number of times until it expires. It is accepted only on\nTTS, STT and speech-to-speech inference routes: `POST /waves/v1/stt/`, `WSS /waves/v1/stt/live`,\n`POST /waves/v1/tts`, `POST /waves/v1/tts/live`, `WSS /waves/v1/tts/live`, the\ndedicated Lightning v3.1 routes (`POST /waves/v1/lightning-v3.1/get_speech`,\n`POST /waves/v1/lightning-v3.1/stream`, `WSS /waves/v1/lightning-v3.1/get_speech/stream`),\n`WSS /waves/v1/s2s`, and the voice-listing routes (public catalog, no cloned\nvoices). Treat any route not listed as unavailable to tokens. This endpoint,\n`POST /waves/v1/pulse/get_text`, voice cloning, pronunciation dictionaries,\nanalytics and chat completions return `403` to a token.\n\nRequests made with a token are billed to the API key that minted it. Deleting\nthat key invalidates its tokens. A token is valid only in the region that\nminted it. If your server and your users can be in different regions, mint and\ncall through the same region-pinned hostname: `api.india.smallest.ai` (Mumbai) or\n`api.us.smallest.ai` (Oregon).\n\n```bash\ncurl -X POST \"https://api.smallest.ai/waves/v1/auth/token\" \\\n -H \"Authorization: Bearer $SMALLEST_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"ttl_seconds\": 300}'\n```\n\nSee the [Authentication guide](/models/api-reference/token-based-authentication)\nfor the end-to-end server and client flow.\n", + "description": "Mint a short-lived access token from your API key. Call this from your server,\nthen hand the returned `access_token` to a browser or mobile client. The client\nsends it as `Authorization: Bearer ` on TTS, STT and speech-to-speech\nrequests. On\nWebSocket connections it can also go in the `api_key` query parameter. HTTP\nrequests must use the header.\n\nA token works any number of times until it expires. It is accepted only on\nTTS, STT and speech-to-speech inference routes: `POST /waves/v1/stt/`, `WSS /waves/v1/stt/live`,\n`POST /waves/v1/tts`, `POST /waves/v1/tts/live`, `WSS /waves/v1/tts/live`, the\ndedicated Lightning v3.1 routes (`POST /waves/v1/lightning-v3.1/get_speech`,\n`POST /waves/v1/lightning-v3.1/stream`, `WSS /waves/v1/lightning-v3.1/get_speech/stream`),\n`WSS /waves/v1/s2s`, and the voice-listing routes (public catalog, no cloned\nvoices). Treat any route not listed as unavailable to tokens. This endpoint,\n`POST /waves/v1/pulse/get_text`, voice cloning, pronunciation dictionaries,\nanalytics and chat completions return `403` to a token.\n\nRequests made with a token are billed to the API key that minted it. Deleting\nthat key invalidates its tokens. A token is valid only in the region that\nminted it. If your server and your users can be in different regions, mint and\ncall through the same region-pinned hostname: `api.india.smallest.ai` (Mumbai) or\n`api.us.smallest.ai` (Oregon).\n\n```bash\ncurl -X POST \"https://api.smallest.ai/waves/v1/auth/token\" \\\n -H \"Authorization: Bearer $SMALLEST_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"ttl_seconds\": 300}'\n```\n\nSee the [Authentication guide](/api-reference/token-based-authentication)\nfor the end-to-end server and client flow.\n", "tags": [ "auth" ], @@ -95,7 +95,7 @@ "post": { "operationId": "textToSpeech_synthesizeSpeech", "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**Language behaviour on `lightning_v3.1_pro`:** pass `language: en` for UK + American accented English, pass `language: hi` for Indian accented English + Hindi (code-switching), or omit `language` to default to `en + hi` (mixed Indian + Western English coverage). Pro supports 31 languages total (10 Indic, 8 Asian & Middle Eastern, 13 European including Dutch and Swedish). Pass the matching ISO 639-1 code (e.g. `ta`, `de`, `ja`) with a Pro voice from that language, or use `auto` to route across all supported languages with any English or Hindi voice. See the [Lightning v3.1 Pro model card](/models/model-cards/text-to-speech/lightning-v-3-1-pro#supported-languages) for the full list. On `lightning_v3.1` the model accepts 20 language codes (10 European + 10 Indic) plus `auto`; the trained voice catalog covers 12 of those directly.\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- 20 accepted language codes on `lightning_v3.1` (12 with trained voices, 8 additional routed via English/Hindi voices). On `lightning_v3.1_pro`: 31 languages with dedicated voices (10 Indic, 8 Asian & Middle Eastern, 13 European); `language: en` → UK + American accented English; `language: hi` → Indian accented English + Hindi; omit `language` → defaults to `en + hi`. Both models accept `language: auto` for cross-language routing.\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 (omit `language` → defaults to `en + hi`)**\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**cURL — Lightning v3.1 Pro with explicit `language: en` (UK + American accented English)**\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\": \"Good morning, this is a Pro voice speaking.\",\n \"voice_id\": \"meher\",\n \"model\": \"lightning_v3.1_pro\",\n \"language\": \"en\",\n \"sample_rate\": 24000,\n \"output_format\": \"wav\"\n }' --output speech.wav\n```\n\n**cURL — Lightning v3.1 Pro with explicit `language: hi` (Indian accented English + Hindi)**\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\": \"Namaste, this is an Indian-accented Pro voice.\",\n \"voice_id\": \"meher\",\n \"model\": \"lightning_v3.1_pro\",\n \"language\": \"hi\",\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_*`) work with the pool they were cloned onto. The voice-cloning API accepts `model: lightning-v3.1` (default) or `lightning-v3.1-pro`; pair the resulting `voice_id` with the matching TTS `model` (`lightning_v3.1` or `lightning_v3.1_pro`). Check the clone's `modelIds` if unsure.\n- **44.1 kHz output** is supported but most playback environments are happy with 24 kHz — drop the sample rate if bandwidth matters.\n", + "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**Language behaviour on `lightning_v3.1_pro`:** pass `language: en` for UK + American accented English, pass `language: hi` for Indian accented English + Hindi (code-switching), or omit `language` to default to `en + hi` (mixed Indian + Western English coverage). Pro supports 31 languages total (10 Indic, 8 Asian & Middle Eastern, 13 European including Dutch and Swedish). Pass the matching ISO 639-1 code (e.g. `ta`, `de`, `ja`) with a Pro voice from that language, or use `auto` to route across all supported languages with any English or Hindi voice. See the [Lightning v3.1 Pro model card](/model-cards/text-to-speech/lightning-v-3-1-pro#supported-languages) for the full list. On `lightning_v3.1` the model accepts 20 language codes (10 European + 10 Indic) plus `auto`; the trained voice catalog covers 12 of those directly.\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- 20 accepted language codes on `lightning_v3.1` (12 with trained voices, 8 additional routed via English/Hindi voices). On `lightning_v3.1_pro`: 31 languages with dedicated voices (10 Indic, 8 Asian & Middle Eastern, 13 European); `language: en` → UK + American accented English; `language: hi` → Indian accented English + Hindi; omit `language` → defaults to `en + hi`. Both models accept `language: auto` for cross-language routing.\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 (omit `language` → defaults to `en + hi`)**\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**cURL — Lightning v3.1 Pro with explicit `language: en` (UK + American accented English)**\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\": \"Good morning, this is a Pro voice speaking.\",\n \"voice_id\": \"meher\",\n \"model\": \"lightning_v3.1_pro\",\n \"language\": \"en\",\n \"sample_rate\": 24000,\n \"output_format\": \"wav\"\n }' --output speech.wav\n```\n\n**cURL — Lightning v3.1 Pro with explicit `language: hi` (Indian accented English + Hindi)**\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\": \"Namaste, this is an Indian-accented Pro voice.\",\n \"voice_id\": \"meher\",\n \"model\": \"lightning_v3.1_pro\",\n \"language\": \"hi\",\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_*`) work with the pool they were cloned onto. The voice-cloning API accepts `model: lightning-v3.1` (default) or `lightning-v3.1-pro`; pair the resulting `voice_id` with the matching TTS `model` (`lightning_v3.1` or `lightning_v3.1_pro`). Check the clone's `modelIds` if unsure.\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": [ "textToSpeech" ], @@ -182,7 +182,7 @@ "post": { "operationId": "textToSpeech_synthesizeSpeechSse", "summary": "Stream speech (SSE)", - "description": "Synthesize speech and stream the audio back over Server-Sent Events. Same body as `/waves/v1/tts` — the only difference is the response is a stream of base64-encoded PCM chunks instead of one binary blob.\n\nPick the model with the `model` body parameter, same as the sync route.\n\n\n **The same URL serves the WebSocket endpoint.** `wss://api.smallest.ai/waves/v1/tts/live` accepts a WebSocket upgrade for streaming-text scenarios (LLM token streams, live captioning). The HTTP `POST` documented on this page returns SSE; use `wss://` to use the WebSocket protocol instead. See the [WebSocket reference](/models/documentation/text-to-speech-lightning/streaming).\n\n\n## When to use this\n\n- **Use this** when you want playback to start before synthesis is complete — long passages, latency-sensitive UI, live narration.\n- **Use sync `/waves/v1/tts`** when total latency doesn't matter and you'd rather get one buffer.\n- **Use `/waves/v1/tts/live`** (WebSocket) when the *text* arrives incrementally (LLM token stream). SSE assumes you have the full text up front.\n\n## How it works\n\n1. POST your text + voice settings — same payload as `/waves/v1/tts`, plus optional `model`.\n2. The response is `Content-Type: text/event-stream`. Each chunk frame is `event: audio\\n` followed by `data: {\"audio\": \"\", \"done\": false, \"status\": \"206\"}\\n\\n`.\n3. Decode each chunk's `audio` field with base64 and feed the PCM bytes to your audio pipeline (browser `MediaSource`, ffmpeg pipe, raw PCM player, etc.).\n4. A final `data: {\"status\": \"200\", \"done\": true}\\n\\n` frame marks end of stream. Detect the terminator with `done == true`; every chunk frame also carries `done: false`, so `\"done\" in msg` matches every frame.\n\n## Examples\n\n**cURL**\n```bash\ncurl -N -X POST \"https://api.smallest.ai/waves/v1/tts/live\" \\\n -H \"Authorization: Bearer $SMALLEST_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"text\": \"Streaming this paragraph chunk by chunk so playback can start sooner.\",\n \"voice_id\": \"magnus\",\n \"sample_rate\": 24000,\n \"output_format\": \"pcm\"\n }'\n```\n\n## Common gotchas\n\n- **Use a streaming-friendly client.** `curl -N`, Python `iter_lines`, or a `fetch` `ReadableStream` reader. Buffering clients will hide the latency win.\n- **Audio is base64 inside the event payload**, not the raw event bytes. Decode the `data.audio` field per event.\n- **`output_format=pcm`** gives the lowest overhead for streaming playback. `wav`/`mp3` work but add per-chunk framing bytes.\n", + "description": "Synthesize speech and stream the audio back over Server-Sent Events. Same body as `/waves/v1/tts` — the only difference is the response is a stream of base64-encoded PCM chunks instead of one binary blob.\n\nPick the model with the `model` body parameter, same as the sync route.\n\n\n **The same URL serves the WebSocket endpoint.** `wss://api.smallest.ai/waves/v1/tts/live` accepts a WebSocket upgrade for streaming-text scenarios (LLM token streams, live captioning). The HTTP `POST` documented on this page returns SSE; use `wss://` to use the WebSocket protocol instead. See the [WebSocket reference](/models/text-to-speech/streaming).\n\n\n## When to use this\n\n- **Use this** when you want playback to start before synthesis is complete — long passages, latency-sensitive UI, live narration.\n- **Use sync `/waves/v1/tts`** when total latency doesn't matter and you'd rather get one buffer.\n- **Use `/waves/v1/tts/live`** (WebSocket) when the *text* arrives incrementally (LLM token stream). SSE assumes you have the full text up front.\n\n## How it works\n\n1. POST your text + voice settings — same payload as `/waves/v1/tts`, plus optional `model`.\n2. The response is `Content-Type: text/event-stream`. Each chunk frame is `event: audio\\n` followed by `data: {\"audio\": \"\", \"done\": false, \"status\": \"206\"}\\n\\n`.\n3. Decode each chunk's `audio` field with base64 and feed the PCM bytes to your audio pipeline (browser `MediaSource`, ffmpeg pipe, raw PCM player, etc.).\n4. A final `data: {\"status\": \"200\", \"done\": true}\\n\\n` frame marks end of stream. Detect the terminator with `done == true`; every chunk frame also carries `done: false`, so `\"done\" in msg` matches every frame.\n\n## Examples\n\n**cURL**\n```bash\ncurl -N -X POST \"https://api.smallest.ai/waves/v1/tts/live\" \\\n -H \"Authorization: Bearer $SMALLEST_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"text\": \"Streaming this paragraph chunk by chunk so playback can start sooner.\",\n \"voice_id\": \"magnus\",\n \"sample_rate\": 24000,\n \"output_format\": \"pcm\"\n }'\n```\n\n## Common gotchas\n\n- **Use a streaming-friendly client.** `curl -N`, Python `iter_lines`, or a `fetch` `ReadableStream` reader. Buffering clients will hide the latency win.\n- **Audio is base64 inside the event payload**, not the raw event bytes. Decode the `data.audio` field per event.\n- **`output_format=pcm`** gives the lowest overhead for streaming playback. `wav`/`mp3` work but add per-chunk framing bytes.\n", "tags": [ "textToSpeech" ], @@ -259,7 +259,7 @@ "get": { "operationId": "voices_getWavesVoices", "summary": "Get voices for a pool", - "description": "Return the voice catalog for the chosen Lightning v3.1 pool. Two pools:\n\n- `lightning-v3.1` — the Standard catalog. Supports voice cloning; 20 language codes.\n- `lightning-v3.1-pro` — the Pro catalog. Curated set across American, British, and Indian accents plus 29 additional languages. Same latency and concurrency as Standard, on dedicated inference.\n\nThe endpoint is pool-scoped: `/waves/v1/lightning-v3.1/get_voices` returns Standard voices only; `/waves/v1/lightning-v3.1-pro/get_voices` returns Pro voices only. Call one or both depending on which pool you plan to use.\n\nEach voice carries tags (`language`, `accent`, `gender`, `age`, `emotions`, `usecases`). Filter client-side to find the voices that match a target language, accent, or use case. Pass the returned `voiceId` as `voice_id` on the unified [`POST /waves/v1/tts`](/models/api-reference/text-to-speech/synthesize-speech) route, together with `\"model\": \"lightning_v3.1\"` (Standard) or `\"model\": \"lightning_v3.1_pro\"` (Pro).\n\nFor the canonical per-language voice list (with previews and recommended pairings), see the [Lightning v3.1](/models/model-cards/text-to-speech/lightning-v-3-1) and [Lightning v3.1 Pro](/models/model-cards/text-to-speech/lightning-v-3-1-pro) model cards.\n", + "description": "Return the voice catalog for the chosen Lightning v3.1 pool. Two pools:\n\n- `lightning-v3.1` — the Standard catalog. Supports voice cloning; 20 language codes.\n- `lightning-v3.1-pro` — the Pro catalog. Curated set across American, British, and Indian accents plus 29 additional languages. Same latency and concurrency as Standard, on dedicated inference.\n\nThe endpoint is pool-scoped: `/waves/v1/lightning-v3.1/get_voices` returns Standard voices only; `/waves/v1/lightning-v3.1-pro/get_voices` returns Pro voices only. Call one or both depending on which pool you plan to use.\n\nEach voice carries tags (`language`, `accent`, `gender`, `age`, `emotions`, `usecases`). Filter client-side to find the voices that match a target language, accent, or use case. Pass the returned `voiceId` as `voice_id` on the unified [`POST /waves/v1/tts`](/api-reference/models/text-to-speech/synthesize-speech) route, together with `\"model\": \"lightning_v3.1\"` (Standard) or `\"model\": \"lightning_v3.1_pro\"` (Pro).\n\nFor the canonical per-language voice list (with previews and recommended pairings), see the [Lightning v3.1](/model-cards/text-to-speech/lightning-v-3-1) and [Lightning v3.1 Pro](/model-cards/text-to-speech/lightning-v-3-1-pro) model cards.\n", "tags": [ "voices" ], @@ -713,7 +713,7 @@ "post": { "operationId": "speechToText_transcribe", "summary": "Transcribe (Pre-recorded)", - "description": "Transcribe an audio file. The model is chosen via `?model=`:\n\n- `?model=pulse-pro`: English-only, leaderboard-ranked accuracy. Raw bytes only; pass `webhook_url` to receive transcription asynchronously on long files.\n- `?model=pulse`: multilingual transcription (21 streaming + 26 pre-recorded languages), supports both raw bytes and audio-by-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 (`WS /waves/v1/stt/live`) instead.\n\nPulse Pro has no streaming worker today; calls to `WS /waves/v1/stt/live?model=pulse-pro` return `400` before the WebSocket upgrades.\n\n## Input methods\n\n- **Raw bytes**: `Content-Type: application/octet-stream` with the audio in the body. All knobs are query parameters.\n- **URL (`?model=pulse` only)**: `Content-Type: application/json` with `{\"url\": \"...\"}` in the body.\n\n## Examples\n\n**cURL**: Pulse Pro, sync\n```bash\ncurl -X POST \"https://api.smallest.ai/waves/v1/stt/?model=pulse-pro&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**: Pulse Pro, async via webhook\n```bash\ncurl -X POST \"https://api.smallest.ai/waves/v1/stt/?model=pulse-pro&language=en&webhook_url=https://your.app/cb\" \\\n -H \"Authorization: Bearer $SMALLEST_API_KEY\" \\\n -H \"Content-Type: application/octet-stream\" \\\n --data-binary \"@./call.wav\"\n```\nReturns `200 { \"status\": \"processing\", \"request_id\": \"...\" }` immediately. The webhook receives the full transcription when ready.\n\n**cURL**: Pulse, audio-by-URL\n```bash\ncurl -X POST \"https://api.smallest.ai/waves/v1/stt/?model=pulse&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**\n```python\nimport requests\n\nwith open(\"./call.wav\", \"rb\") as f:\n audio = f.read()\n\nr = requests.post(\n \"https://api.smallest.ai/waves/v1/stt/\",\n params={\"model\": \"pulse-pro\", \"language\": \"en\", \"word_timestamps\": \"true\"},\n headers={\"Authorization\": f\"Bearer {API_KEY}\", \"Content-Type\": \"application/octet-stream\"},\n data=audio,\n)\nr.raise_for_status()\nprint(r.json()[\"transcription\"])\n```\n\n**JavaScript / TypeScript**\n```typescript\nimport { readFileSync } from \"node:fs\";\n\nconst audio = readFileSync(\"./call.wav\");\nconst params = new URLSearchParams({ model: \"pulse-pro\", language: \"en\", word_timestamps: \"true\" });\n\nconst res = await fetch(`https://api.smallest.ai/waves/v1/stt/?${params}`, {\n method: \"POST\",\n headers: { Authorization: `Bearer ${process.env.SMALLEST_API_KEY}`, \"Content-Type\": \"application/octet-stream\" },\n body: audio,\n});\nconsole.log((await res.json()).transcription);\n```\n\n## Common gotchas\n\n- **`model` is required.** Missing or invalid values return `400` with an enum-validation error.\n- **Pulse Pro is English only.** Pass `language=en`. Other language codes are accepted at the wire level but produce unpredictable output.\n- **Pulse Pro does not support audio-by-URL.** Send raw bytes or use `?model=pulse` for the URL flow.\n- **Max payload 250 MB.** Larger requests return `413`. Compress to mono 16 kHz PCM if you are close to the limit; quality is unaffected.\n", + "description": "Transcribe an audio file. The model is chosen via `?model=`:\n\n- `?model=pulse-pro`: English-only, leaderboard-ranked accuracy. Raw bytes only; pass `webhook_url` to receive transcription asynchronously on long files.\n- `?model=pulse`: multilingual transcription (21 streaming + 12 pre-recorded languages), supports both raw bytes and audio-by-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 (`WS /waves/v1/stt/live?model=pulse`).\n\nPulse Pro is HTTP-only.\n\n## Input methods\n\n- **Raw bytes**: `Content-Type: application/octet-stream` with the audio in the body. All knobs are query parameters.\n- **URL (`?model=pulse` only)**: `Content-Type: application/json` with `{\"url\": \"...\"}` in the body.\n\n## Examples\n\n**cURL**: Pulse Pro, sync\n```bash\ncurl -X POST \"https://api.smallest.ai/waves/v1/stt/?model=pulse-pro&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**: Pulse Pro, async via webhook\n```bash\ncurl -X POST \"https://api.smallest.ai/waves/v1/stt/?model=pulse-pro&language=en&webhook_url=https://your.app/cb\" \\\n -H \"Authorization: Bearer $SMALLEST_API_KEY\" \\\n -H \"Content-Type: application/octet-stream\" \\\n --data-binary \"@./call.wav\"\n```\nReturns `200 { \"status\": \"processing\", \"request_id\": \"...\" }` immediately. The webhook receives the full transcription when ready.\n\n**cURL**: Pulse, audio-by-URL\n```bash\ncurl -X POST \"https://api.smallest.ai/waves/v1/stt/?model=pulse&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**\n```python\nimport requests\n\nwith open(\"./call.wav\", \"rb\") as f:\n audio = f.read()\n\nr = requests.post(\n \"https://api.smallest.ai/waves/v1/stt/\",\n params={\"model\": \"pulse-pro\", \"language\": \"en\", \"word_timestamps\": \"true\"},\n headers={\"Authorization\": f\"Bearer {API_KEY}\", \"Content-Type\": \"application/octet-stream\"},\n data=audio,\n)\nr.raise_for_status()\nprint(r.json()[\"transcription\"])\n```\n\n**JavaScript / TypeScript**\n```typescript\nimport { readFileSync } from \"node:fs\";\n\nconst audio = readFileSync(\"./call.wav\");\nconst params = new URLSearchParams({ model: \"pulse-pro\", language: \"en\", word_timestamps: \"true\" });\n\nconst res = await fetch(`https://api.smallest.ai/waves/v1/stt/?${params}`, {\n method: \"POST\",\n headers: { Authorization: `Bearer ${process.env.SMALLEST_API_KEY}`, \"Content-Type\": \"application/octet-stream\" },\n body: audio,\n});\nconsole.log((await res.json()).transcription);\n```\n\n## Common gotchas\n\n- **`model` is required.** Missing or invalid values return `400` with an enum-validation error.\n- **Pulse Pro is English only.** Pass `language=en`. Any other value returns `400 invalid_enum_value` (`Expected 'en', received ''`).\n- **Pulse Pro does not support audio-by-URL.** Send raw bytes or use `?model=pulse` for the URL flow.\n", "tags": [ "speechToText" ], @@ -721,7 +721,7 @@ { "name": "model", "in": "query", - "description": "Selects which ASR model handles the request. Required; missing or invalid values return `400`.\n\n- `pulse-pro`: English only, leaderboard-ranked accuracy, raw bytes only; supports async via `webhook_url`.\n- `pulse`: multilingual (39 languages), raw bytes OR URL.\n", + "description": "Selects which ASR model handles the request. Required; missing or invalid values return `400`.\n\n- `pulse-pro`: English only, leaderboard-ranked accuracy, raw bytes only; supports async via `webhook_url`.\n- `pulse`: multilingual (21 streaming + 12 pre-recorded languages), raw bytes OR URL.\n", "required": true, "schema": { "$ref": "#/components/schemas/WavesV1SttPostParametersModel" @@ -730,8 +730,8 @@ { "name": "language", "in": "query", - "description": "Language of the audio file. This endpoint is **Pre-Recorded (HTTP)** — for streaming, switch to `WSS /waves/v1/stt/live` (different supported language set).\n\n**26 single-language codes:** `en`, `hi`, `de`, `es`, `ru`, `it`, `fr`, `nl`, `pt`, `uk`, `pl`, `cs`, `sk`, `lv`, `et`, `ro`, `fi`, `sv`, `bg`, `hu`, `da`, `lt`, `mt`, `zh`, `ja`, `ko`.\n\n**Regional auto-detect aggregators** for unknown audio:\n- `multi-eu` — auto-detects across all 21 European codes plus `en`.\n- `multi-asian` — auto-detects across `zh`, `ko`, `ja`, `en`.\n- `multi-indic`: auto-detects across `en`, `hi`, `gu`, `mr`, `bn`, `or`. India region only.\n\n- **Pulse Pro**: pass `en`.\n- **Pulse**: pass any of the single-language codes above, or use the `multi-eu` / `multi-asian` / `multi-indic` aggregator for unknown audio. See the [Pulse model card](/models/model-cards/speech-to-text/pulse) for the full table with language names.\n", - "required": true, + "description": "Language of the audio file. This endpoint is **Pre-Recorded (HTTP)**. For streaming, use `WSS /waves/v1/stt/live` (different supported-language set).\n\nAlways pass `language`. To auto-detect, pass one of the regional aggregators in the enum. On Pulse Pro, only `en` is accepted; any other value returns HTTP 400.\n\n**Single-language codes:** `en`, `hi`, `de`, `es`, `ru`, `it`, `fr`, `nl`, `pt`, `zh`, `ja`, `ko`.\n\n**Regional auto-detect aggregators** for unknown audio:\n- `multi-eu` auto-detects across the European codes plus `en`.\n- `multi-asian` auto-detects across `zh`, `ko`, `ja`, `en`.\n- `multi-indic` auto-detects across `en`, `hi`, `gu`, `mr`, `bn`, `or`. India region only.\n\n**Region gating.** Indic single-language codes and `multi-indic` are enabled in the India region only. East Asian codes and `multi-asian` are enabled in the US region only. Set `language` explicitly when you know the audio language; omission may return `LANGUAGE_NOT_ENABLED_IN_REGION` if the auto-detect aggregator is not enabled for your region.\n\n- **Pulse Pro**: pass `en`. Any other value returns HTTP 400 at validation.\n- **Pulse**: pass any code above. See the [Pulse model card](/model-cards/speech-to-text/pulse) for the full table with language names.\n", + "required": false, "schema": { "$ref": "#/components/schemas/WavesV1SttPostParametersLanguage" } @@ -739,27 +739,27 @@ { "name": "word_timestamps", "in": "query", - "description": "Include the per-word `words[]` array in the response — each entry carries the recognized `word`, its `start`/`end` timestamps, and a per-word `confidence` score (0.0–1.0). With `diarize=true`, entries also include `speaker`. On Pulse Pro this costs roughly one-third of throughput.", + "description": "Include the per-word `words[]` array in the response. Each entry carries the recognized `word`, its `start`/`end` timestamps, and a per-word `confidence` score (0.0 to 1.0). With `diarize=true`, entries also include `speaker`.\n\nMust be the lowercase string `\"true\"` or `\"false\"`. Any other value (including integer or capitalized variants) returns HTTP 400.\n", "required": false, "schema": { - "type": "boolean", - "default": false + "$ref": "#/components/schemas/WavesV1SttPostParametersWordTimestamps", + "default": "false" } }, { "name": "diarize", "in": "query", - "description": "Multi-speaker identification; adds per-word and per-utterance speaker labels.", + "description": "Multi-speaker identification. Adds per-word and per-utterance speaker labels.\n\nMust be the lowercase string `\"true\"` or `\"false\"`. Any other value (including integer or capitalized variants) returns HTTP 400.\n", "required": false, "schema": { - "type": "boolean", - "default": false + "$ref": "#/components/schemas/WavesV1SttPostParametersDiarize", + "default": "false" } }, { "name": "keywords", "in": "query", - "description": "Pulse only. Boost recognition of specific words or phrases for\nthis request. The same parameter works on the realtime WebSocket\nendpoint.\n\n**Entry format:** `KEYWORD` or `KEYWORD:INTENSIFIER`, where\n`INTENSIFIER` is a number that defaults to `1`. Example:\n`Blackwell:2,Jensen Huang:2`. Matching is case-sensitive.\nDuplicates: last-wins (`NVIDIA:1,NVIDIA:5` is equivalent to\n`NVIDIA:5`). Max 100 keywords per request; sending more returns\n`400` with `keywords too large (max 100)` in `errors[]`.\n\n**Encodings.** Comma-string (recommended), repeated key\n(`keywords=a&keywords=b`), and bracketed array (`keywords[]=a`)\nare all accepted. A JSON-array literal (`[\"a\",\"b\"]`) does not\nboost. Pass the raw string.\n\n**Intensifier.** Default `1`, recommended `1` to `3`. Above\n`10` is not recommended: higher values increase the chance\nof hallucinating the keyword when it was not spoken. Reuse\nthe same keyword list across requests when the vocabulary\nis stable.\n\nSee [Keyword Boosting](/models/documentation/speech-to-text-pulse/features/keyword-boosting)\nfor the full contract and worked examples.\n", + "description": "Pulse only. Boost recognition of specific words or phrases for this request. The same parameter works on the realtime WebSocket endpoint.\n\n**Entry format:** `KEYWORD` or `KEYWORD:INTENSIFIER`, where `INTENSIFIER` is a number that defaults to `1`. Example: `Blackwell:2,Jensen Huang:2`. Matching is case-sensitive. Duplicates: last-wins (`NVIDIA:1,NVIDIA:5` is equivalent to `NVIDIA:5`). Max 100 keywords per request; sending more returns `400` with `keywords too large (max 100)` in `errors[]`.\n\n**Encodings.** Comma-string (recommended), repeated key (`keywords=a&keywords=b`), and bracketed array (`keywords[]=a`) are all accepted. A JSON-array literal (`[\"a\",\"b\"]`) does not boost. Pass the raw string.\n\n**Intensifier.** Default `1`, recommended `1` to `3`. Above `10` is not recommended: higher values increase the chance of hallucinating the keyword when it was not spoken. Reuse the same keyword list across requests when the vocabulary is stable.\n\nSee [Keyword Boosting](/models/speech-to-text/features/keyword-boosting) for the full contract and worked examples.\n", "required": false, "schema": { "type": "string" @@ -797,7 +797,7 @@ { "name": "redact_pii", "in": "query", - "description": "Redact personally identifiable information from the transcript.\nNames → `[FIRSTNAME_*]` / `[LASTNAME_*]`, phone numbers →\n`[PHONENUMBER_*]`, addresses → `[ADDRESS_*]`, etc. The redaction\ntokens use sequential indices so multiple occurrences of the same\nentity get distinct labels (`[FIRSTNAME_1]`, `[FIRSTNAME_2]`).\n\n**Language support:** currently effective only on `en` and `hi`.\nSetting `redact_pii=true` on other language codes is accepted\nbut does not redact.\n", + "description": "Redact personally identifiable information from the transcript. Tokens use the shape `[ENTITYTYPE_N]` where N is a per-entity sequential index (e.g. `[FIRSTNAME_1]`). Entity types include `FIRSTNAME`, `LASTNAME`, `PHONENUMBER`, `ADDRESS`, `EMAIL`.\n\n**Language support:** effective on `en` and `hi`. Accepted on other codes but redaction is not reliable.\n", "required": false, "schema": { "$ref": "#/components/schemas/WavesV1SttPostParametersRedactPii", @@ -807,7 +807,7 @@ { "name": "redact_pci", "in": "query", - "description": "Redact payment card information (credit-card numbers, CVV, account\nnumbers, etc.). Replaces matches with `[ACCOUNTNUMBER_*]` tokens.\nUse alongside `redact_pii=true` for full PCI-compliant transcript\nhandling.\n\n**Language support:** currently effective only on `en` and `hi`.\nSetting `redact_pci=true` on other language codes is accepted\nbut does not redact.\n", + "description": "Redact payment card information. Tokens use the shape `[ENTITYTYPE_N]`. Known entity types include `ACCOUNTNAME` (cardholder name), `CREDITCARDNUMBER` (card PAN), `CREDITCARDCVV`, `ZIPCODE`, `ACCOUNTNUMBER`. Use alongside `redact_pii=true` for combined PII + PCI redaction.\n\n**Language support:** currently effective only on `en` and `hi`. Setting `redact_pci=true` on other language codes is accepted but does not redact.\n", "required": false, "schema": { "$ref": "#/components/schemas/WavesV1SttPostParametersRedactPci", @@ -856,7 +856,7 @@ } }, "400": { - "description": "Missing or invalid `model` query parameter, invalid params, or unsupported feature combination (e.g. `?model=pulse-pro` on the WS endpoint, audio-by-URL with `?model=pulse-pro`).", + "description": "Invalid query parameters, empty audio, a language the model does not support, or a language not enabled in this region.", "content": { "application/json": { "schema": { @@ -866,7 +866,7 @@ } }, "401": { - "description": "API key missing or invalid.", + "description": "API key missing, invalid, or revoked.", "content": { "application/json": { "schema": { @@ -885,8 +885,8 @@ } } }, - "413": { - "description": "Payload exceeds 250 MB.", + "429": { + "description": "RPM cap exceeded (Standard plan default 25/min per model). Retry with exponential backoff.", "content": { "application/json": { "schema": { @@ -895,8 +895,8 @@ } } }, - "429": { - "description": "RPM cap exceeded (Standard plan default 25/min per model).", + "500": { + "description": "Unexpected server-side failure. Retry with exponential backoff.", "content": { "application/json": { "schema": { @@ -906,7 +906,7 @@ } }, "503": { - "description": "Worker temporarily unavailable.", + "description": "Transcription service temporarily unavailable. Retry after a short backoff.", "content": { "application/json": { "schema": { @@ -942,7 +942,7 @@ "post": { "operationId": "electron_complete", "summary": "Chat Completions (Electron)", - "description": "Generate a chat completion with Electron. OpenAI-compatible\nrequest/response shape — point any OpenAI SDK at\n`https://api.smallest.ai/waves/v1` and it just works.\n\nSet `stream: true` to receive tokens via Server-Sent Events. With\n`stream_options: { include_usage: true }`, the final SSE chunk\ncarries the `usage` block so token accounting is exact even on\nclient disconnects.\n\nTool calling follows OpenAI's `tools` array convention. When you\nprovide a voice-agent-style system prompt, Electron emits a short\nfiller phrase in the assistant message `content` field alongside\n`tool_calls` — see the [Tool Calling guide](/models/documentation/llm-electron/tool-function-calling)\nfor the voice-agent pattern.\n\n## Examples\n\n**cURL**\n```bash\ncurl -X POST \"https://api.smallest.ai/waves/v1/chat/completions\" \\\n -H \"Authorization: Bearer $SMALLEST_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"model\": \"electron\",\n \"messages\": [\n {\"role\": \"user\", \"content\": \"Write one sentence about why the sky is blue.\"}\n ]\n }'\n```\n\n**Python** (`pip install openai`)\n```python\nimport os\nfrom openai import OpenAI\n\nclient = OpenAI(\n base_url=\"https://api.smallest.ai/waves/v1\",\n api_key=os.environ[\"SMALLEST_API_KEY\"],\n)\n\nresponse = client.chat.completions.create(\n model=\"electron\",\n messages=[\n {\"role\": \"user\", \"content\": \"Write one sentence about why the sky is blue.\"}\n ],\n)\n\nprint(response.choices[0].message.content)\n```\n\n**JavaScript / TypeScript** (`npm install openai`)\n```typescript\nimport OpenAI from \"openai\";\n\nconst client = new OpenAI({\n baseURL: \"https://api.smallest.ai/waves/v1\",\n apiKey: process.env.SMALLEST_API_KEY,\n});\n\nconst response = await client.chat.completions.create({\n model: \"electron\",\n messages: [\n { role: \"user\", content: \"Write one sentence about why the sky is blue.\" },\n ],\n});\n\nconsole.log(response.choices[0].message.content);\n```\n\n**Streaming with usage** (Python)\n```python\nstream = client.chat.completions.create(\n model=\"electron\",\n messages=[{\"role\": \"user\", \"content\": \"Tell me a one-sentence fun fact.\"}],\n stream=True,\n stream_options={\"include_usage\": True},\n)\nfor chunk in stream:\n if chunk.choices and chunk.choices[0].delta.content:\n print(chunk.choices[0].delta.content, end=\"\", flush=True)\n if chunk.usage:\n print(f\"\\n\\nTokens: {chunk.usage.total_tokens}\")\n```\n\n## Common gotchas\n\n- **Base URL is `/waves/v1`**, not `/v1`. The OpenAI SDK appends `/chat/completions` for you.\n- **`stream_options.include_usage: true`** is required for exact token accounting on streaming calls — the final SSE chunk carries the `usage` block.\n- **`n > 1` and `prompt_logprobs` are rejected.** Use multiple requests if you need parallel completions.\n- **Auth header is `Authorization: Bearer $SMALLEST_API_KEY`** — get the key from the [Smallest AI Console](https://app.smallest.ai/dashboard/api-keys).\n", + "description": "Generate a chat completion with Electron. OpenAI-compatible\nrequest/response shape — point any OpenAI SDK at\n`https://api.smallest.ai/waves/v1` and it just works.\n\nSet `stream: true` to receive tokens via Server-Sent Events. With\n`stream_options: { include_usage: true }`, the final SSE chunk\ncarries the `usage` block so token accounting is exact even on\nclient disconnects.\n\nTool calling follows OpenAI's `tools` array convention. When you\nprovide a voice-agent-style system prompt, Electron emits a short\nfiller phrase in the assistant message `content` field alongside\n`tool_calls` — see the [Tool Calling guide](/models/llm/tool-function-calling)\nfor the voice-agent pattern.\n\n## Examples\n\n**cURL**\n```bash\ncurl -X POST \"https://api.smallest.ai/waves/v1/chat/completions\" \\\n -H \"Authorization: Bearer $SMALLEST_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"model\": \"electron\",\n \"messages\": [\n {\"role\": \"user\", \"content\": \"Write one sentence about why the sky is blue.\"}\n ]\n }'\n```\n\n**Python** (`pip install openai`)\n```python\nimport os\nfrom openai import OpenAI\n\nclient = OpenAI(\n base_url=\"https://api.smallest.ai/waves/v1\",\n api_key=os.environ[\"SMALLEST_API_KEY\"],\n)\n\nresponse = client.chat.completions.create(\n model=\"electron\",\n messages=[\n {\"role\": \"user\", \"content\": \"Write one sentence about why the sky is blue.\"}\n ],\n)\n\nprint(response.choices[0].message.content)\n```\n\n**JavaScript / TypeScript** (`npm install openai`)\n```typescript\nimport OpenAI from \"openai\";\n\nconst client = new OpenAI({\n baseURL: \"https://api.smallest.ai/waves/v1\",\n apiKey: process.env.SMALLEST_API_KEY,\n});\n\nconst response = await client.chat.completions.create({\n model: \"electron\",\n messages: [\n { role: \"user\", content: \"Write one sentence about why the sky is blue.\" },\n ],\n});\n\nconsole.log(response.choices[0].message.content);\n```\n\n**Streaming with usage** (Python)\n```python\nstream = client.chat.completions.create(\n model=\"electron\",\n messages=[{\"role\": \"user\", \"content\": \"Tell me a one-sentence fun fact.\"}],\n stream=True,\n stream_options={\"include_usage\": True},\n)\nfor chunk in stream:\n if chunk.choices and chunk.choices[0].delta.content:\n print(chunk.choices[0].delta.content, end=\"\", flush=True)\n if chunk.usage:\n print(f\"\\n\\nTokens: {chunk.usage.total_tokens}\")\n```\n\n## Common gotchas\n\n- **Base URL is `/waves/v1`**, not `/v1`. The OpenAI SDK appends `/chat/completions` for you.\n- **`stream_options.include_usage: true`** is required for exact token accounting on streaming calls — the final SSE chunk carries the `usage` block.\n- **`n > 1` and `prompt_logprobs` are rejected.** Use multiple requests if you need parallel completions.\n- **Auth header is `Authorization: Bearer $SMALLEST_API_KEY`** — get the key from the [Smallest AI Console](https://app.smallest.ai/dashboard/api-keys).\n", "tags": [ "electron" ], @@ -988,7 +988,7 @@ } }, "429": { - "description": "Rate limit (RPM) or concurrency cap hit. See\n[Concurrency and Limits](/models/api-reference/concurrency-and-limits).\n", + "description": "Rate limit (RPM) or concurrency cap hit. See\n[Concurrency and Limits](/api-reference/concurrency-and-limits).\n", "content": { "application/json": { "schema": { @@ -1191,7 +1191,7 @@ "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](/models/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", + "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](/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": { @@ -1307,7 +1307,7 @@ "description": "What happens on a match. `reject` fails the request with HTTP 400; `flag` synthesizes normally and records the match." } }, - "description": "Opt-in profanity filter for the submitted text. Off by default;\npassing this object is the only way to turn it on. The filter\nnever rewrites your text — it either lets the request through or\nrejects it before synthesis.\n\n`action: \"reject\"` returns HTTP 400 with `error_code:\n\"CONTENT_FILTER_BLOCKED\"`, the `language` checked and a\n`match_count`; the matched terms are never returned or logged.\n`action: \"flag\"` synthesizes normally and records the match.\n\nMatching is whole-word, not substring. If no verdict is returned\nthe request fails open and the audio is synthesized unfiltered.\n\nSee [Content filter](/models/documentation/text-to-speech-lightning/content-filter).\n", + "description": "Opt-in profanity filter for the submitted text. Off by default;\npassing this object is the only way to turn it on. The filter\nnever rewrites your text — it either lets the request through or\nrejects it before synthesis.\n\n`action: \"reject\"` returns HTTP 400 with `error_code:\n\"CONTENT_FILTER_BLOCKED\"`, the `language` checked and a\n`match_count`; the matched terms are never returned or logged.\n`action: \"flag\"` synthesizes normally and records the match.\n\nMatching is whole-word, not substring. If no verdict is returned\nthe request fails open and the audio is synthesized unfiltered.\n\nSee [Content filter](/models/text-to-speech/content-filter).\n", "title": "TtsRequestContentFilter" }, "TtsRequestOutputFormat": { @@ -1341,7 +1341,7 @@ "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](/models/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" + "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](/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", @@ -1367,11 +1367,11 @@ "math_notation": { "type": "boolean", "default": false, - "description": "Opt-in flag that reads digit-flanked math operators (`5 x 3`,\n`2 ^ 10`, `6 ÷ 2`) as words instead of leaving them for the\ndefault number reader. Off by default because in real traffic\ndigit-flanked `NxN` is more often a product dimension, the\n`24x7` idiom, or a vehicle-registration code than an actual\nmultiplication.\n\nWhen `true`, the normalizer replaces the operator with the\nspoken word matched to `number_pronunciation_language`:\n\n| Glyphs | en (default / fallback) | hi | mr |\n|---|---|---|---|\n| `×` `x` `X` `*` | times | गुणा | गुणिले |\n| `÷` and spaced `/` | divided by | बटा | भागिले |\n| `+` | plus | प्लस | अधिक |\n| spaced `-` `–` `−` | minus | माइनस | वजा |\n| `=` | equals | बराबर | बरोबर |\n| `^` `**` | to the power of | की घात | ची घात |\n\nLocalized only for `hi` and `mr`; every other language falls\nback to the English words. The operator word follows\n`number_pronunciation_language`, not the synthesis\n`language`, so `language=en, number_pronunciation_language=hi`\nreads `6 x 7` as \"छः गुणा सात\".\n\nMatching rules: unambiguous glyphs (`× ÷ * ^ ** = +` and the\nwrong-glyph `x`/`X`) fire glued or spaced (`5x3`, `5 x 3`).\nThe ambiguous `-` `–` `−` and `/` fire only when\nspace-padded, so `5-3` stays a range and `1/2` stays a\nfraction. See [Math notation](/models/documentation/text-to-speech-lightning/math-notation)\nfor the full lexicon, known limitations (product dimensions,\n`24x7` idiom, vehicle-reg codes), and EU-language\nlocalizations.\n" + "description": "Opt-in flag that reads digit-flanked math operators (`5 x 3`,\n`2 ^ 10`, `6 ÷ 2`) as words instead of leaving them for the\ndefault number reader. Off by default because in real traffic\ndigit-flanked `NxN` is more often a product dimension, the\n`24x7` idiom, or a vehicle-registration code than an actual\nmultiplication.\n\nWhen `true`, the normalizer replaces the operator with the\nspoken word matched to `number_pronunciation_language`:\n\n| Glyphs | en (default / fallback) | hi | mr |\n|---|---|---|---|\n| `×` `x` `X` `*` | times | गुणा | गुणिले |\n| `÷` and spaced `/` | divided by | बटा | भागिले |\n| `+` | plus | प्लस | अधिक |\n| spaced `-` `–` `−` | minus | माइनस | वजा |\n| `=` | equals | बराबर | बरोबर |\n| `^` `**` | to the power of | की घात | ची घात |\n\nLocalized only for `hi` and `mr`; every other language falls\nback to the English words. The operator word follows\n`number_pronunciation_language`, not the synthesis\n`language`, so `language=en, number_pronunciation_language=hi`\nreads `6 x 7` as \"छः गुणा सात\".\n\nMatching rules: unambiguous glyphs (`× ÷ * ^ ** = +` and the\nwrong-glyph `x`/`X`) fire glued or spaced (`5x3`, `5 x 3`).\nThe ambiguous `-` `–` `−` and `/` fire only when\nspace-padded, so `5-3` stays a range and `1/2` stays a\nfraction. See [Math notation](/models/text-to-speech/math-notation)\nfor the full lexicon, known limitations (product dimensions,\n`24x7` idiom, vehicle-reg codes), and EU-language\nlocalizations.\n" }, "content_filter": { "$ref": "#/components/schemas/TtsRequestContentFilter", - "description": "Opt-in profanity filter for the submitted text. Off by default;\npassing this object is the only way to turn it on. The filter\nnever rewrites your text — it either lets the request through or\nrejects it before synthesis.\n\n`action: \"reject\"` returns HTTP 400 with `error_code:\n\"CONTENT_FILTER_BLOCKED\"`, the `language` checked and a\n`match_count`; the matched terms are never returned or logged.\n`action: \"flag\"` synthesizes normally and records the match.\n\nMatching is whole-word, not substring. If no verdict is returned\nthe request fails open and the audio is synthesized unfiltered.\n\nSee [Content filter](/models/documentation/text-to-speech-lightning/content-filter).\n" + "description": "Opt-in profanity filter for the submitted text. Off by default;\npassing this object is the only way to turn it on. The filter\nnever rewrites your text — it either lets the request through or\nrejects it before synthesis.\n\n`action: \"reject\"` returns HTTP 400 with `error_code:\n\"CONTENT_FILTER_BLOCKED\"`, the `language` checked and a\n`match_count`; the matched terms are never returned or logged.\n`action: \"flag\"` synthesizes normally and records the match.\n\nMatching is whole-word, not substring. If no verdict is returned\nthe request fails open and the audio is synthesized unfiltered.\n\nSee [Content filter](/models/text-to-speech/content-filter).\n" }, "output_format": { "$ref": "#/components/schemas/TtsRequestOutputFormat", @@ -1388,7 +1388,7 @@ "word_timestamps": { "type": "boolean", "default": false, - "description": "**WebSocket-only feature.** Accepted on this endpoint but ignored — no per-word timing information is returned in the sync HTTP or SSE response shape. To receive `status: \"word_timestamp\"` frames with per-word `{ id, word, start, end }` data, use the WebSocket endpoint `wss://api.smallest.ai/waves/v1/tts/live`. See [Word-level timestamps](/models/documentation/text-to-speech-lightning/word-timestamps).\n" + "description": "**WebSocket-only feature.** Accepted on this endpoint but ignored — no per-word timing information is returned in the sync HTTP or SSE response shape. To receive `status: \"word_timestamp\"` frames with per-word `{ id, word, start, end }` data, use the WebSocket endpoint `wss://api.smallest.ai/waves/v1/tts/live`. See [Word-level timestamps](/models/text-to-speech/word-timestamps).\n" }, "session_id": { "type": "string", @@ -1975,20 +1975,6 @@ "fr", "nl", "pt", - "uk", - "pl", - "cs", - "sk", - "lv", - "et", - "ro", - "fi", - "sv", - "bg", - "hu", - "da", - "lt", - "mt", "zh", "ja", "ko", @@ -1998,6 +1984,24 @@ ], "title": "WavesV1SttPostParametersLanguage" }, + "WavesV1SttPostParametersWordTimestamps": { + "type": "string", + "enum": [ + "true", + "false" + ], + "default": "false", + "title": "WavesV1SttPostParametersWordTimestamps" + }, + "WavesV1SttPostParametersDiarize": { + "type": "string", + "enum": [ + "true", + "false" + ], + "default": "false", + "title": "WavesV1SttPostParametersDiarize" + }, "WavesV1SttPostParametersWebhookMethod": { "type": "string", "enum": [ @@ -2184,7 +2188,7 @@ "type": "number", "format": "double" }, - "description": "Detected emotion labels mapped to confidence scores. Present when `emotion_detection=true` was set on the request." + "description": "Detected emotion labels mapped to confidence scores. Present when `emotion_detection=true` was set on the request. Current known keys: `anger`, `disgust`, `fear`, `sadness`, `happiness`." } }, "required": [ @@ -2221,33 +2225,79 @@ ], "title": "Speech to Text_transcribe_Response_200" }, - "SttErrorResponseDetailsItems": { + "SttErrorResponseStatus": { + "type": "string", + "enum": [ + "error" + ], + "description": "Set to `error` on validation and transcription errors.", + "title": "SttErrorResponseStatus" + }, + "SttErrorResponseErrorsOneOf0Items": { "type": "object", "properties": {}, - "title": "SttErrorResponseDetailsItems" + "title": "SttErrorResponseErrorsOneOf0Items" + }, + "SttErrorResponseErrors0": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SttErrorResponseErrorsOneOf0Items" + }, + "title": "SttErrorResponseErrors0" + }, + "SttErrorResponseErrors": { + "oneOf": [ + { + "$ref": "#/components/schemas/SttErrorResponseErrors0" + }, + { + "type": "string" + } + ], + "description": "Validation detail. On query-parameter failures, an array of entries with the parameter `path` and a `message`. On request-body failures, a string.", + "title": "SttErrorResponseErrors" }, "SttErrorResponse": { "type": "object", "properties": { "error": { "type": "string", - "description": "Error message." + "description": "Human-readable error message on authentication, plan, credit, and rate-limit errors." + }, + "status": { + "$ref": "#/components/schemas/SttErrorResponseStatus", + "description": "Set to `error` on validation and transcription errors." + }, + "message": { + "type": "string", + "description": "Human-readable error message on validation and transcription errors, and on a missing `Authorization` header." + }, + "error_code": { + "type": "string", + "description": "Machine-readable error code. Known values: `LANGUAGE_NOT_ENABLED_IN_REGION`." + }, + "code": { + "type": "string", + "description": "Machine-readable error code on some transcription failures. Known values: `AudioDecodeError`, `NoAudio`." + }, + "language": { + "type": "string", + "description": "Language code echoed on `LANGUAGE_NOT_ENABLED_IN_REGION` responses." + }, + "region": { + "type": "string", + "description": "Region that served the request on `LANGUAGE_NOT_ENABLED_IN_REGION` responses (for example `ap-south-1` or `us-west-2`)." }, "request_id": { "type": "string", - "description": "Correlation ID for support / logs" + "description": "Correlation ID for support" }, - "details": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SttErrorResponseDetailsItems" - }, - "description": "Additional error details (validation errors)." + "errors": { + "$ref": "#/components/schemas/SttErrorResponseErrors", + "description": "Validation detail. On query-parameter failures, an array of entries with the parameter `path` and a `message`. On request-body failures, a string." } }, - "required": [ - "error" - ], + "description": "Error body returned by `POST /waves/v1/stt/`. The shape depends on where the request fails:\n\n- A request with no `Authorization` header returns `{ \"message\": \"Unauthorized: No tokens provided\" }`.\n- Other authentication errors, and plan, credit, and rate-limit errors, return `{ \"error\": \"\" }`.\n- Request validation and transcription errors return `{ \"status\": \"error\", \"message\": \"\" }`, with optional `errors`, `error_code`, `code`, `language`, `region`, and `request_id` fields.\n\nRead `error` first and fall back to `message`. Branch on the HTTP status and on `error_code` / `code` when present, not on the message text.\n", "title": "SttErrorResponse" }, "ElectronToolCallType": { @@ -2459,7 +2509,7 @@ "stream": { "type": "boolean", "default": false, - "description": "When true, response is `text/event-stream`. See the\n[Streaming guide](/models/documentation/llm-electron/streaming).\n" + "description": "When true, response is `text/event-stream`. See the\n[Streaming guide](/models/llm/streaming).\n" }, "stream_options": { "$ref": "#/components/schemas/ChatCompletionRequestStreamOptions" @@ -2472,7 +2522,7 @@ "description": "Any type" } }, - "description": "Tool / function calling definitions. Forwarded verbatim to the\nOpenAI-compatible upstream, so the standard OpenAI shape\n(`{type: \"function\", function: {name, description, parameters}}`)\nis the recommended form and is what the examples below use.\nThe wire schema is permissive (`array`) — any tools payload\nthe upstream accepts will work. See [Tool Calling](/models/documentation/llm-electron/tool-function-calling)\nfor details.\n" + "description": "Tool / function calling definitions. Forwarded verbatim to the\nOpenAI-compatible upstream, so the standard OpenAI shape\n(`{type: \"function\", function: {name, description, parameters}}`)\nis the recommended form and is what the examples below use.\nThe wire schema is permissive (`array`) — any tools payload\nthe upstream accepts will work. See [Tool Calling](/models/llm/tool-function-calling)\nfor details.\n" }, "tool_choice": { "$ref": "#/components/schemas/ChatCompletionRequestToolChoice"