From 6648bead435652465b7bd2537c1d54d73636bb22 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 8 May 2026 03:38:52 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...rld.InworldClient.Constructors.Bearer.g.cs | 1 + ....Models.SpeechToTextStreamServerEvent.g.cs | 81 +++++++++++++- ....Models.TextToSpeechStreamServerEvent.g.cs | 104 ++++++++++++++++-- 3 files changed, 172 insertions(+), 14 deletions(-) diff --git a/src/libs/Inworld/Generated/Inworld.InworldClient.Constructors.Bearer.g.cs b/src/libs/Inworld/Generated/Inworld.InworldClient.Constructors.Bearer.g.cs index ec5b63e..5b8eaa5 100644 --- a/src/libs/Inworld/Generated/Inworld.InworldClient.Constructors.Bearer.g.cs +++ b/src/libs/Inworld/Generated/Inworld.InworldClient.Constructors.Bearer.g.cs @@ -26,5 +26,6 @@ partial void Authorizing( ref string apiKey); partial void Authorized( global::System.Net.Http.HttpClient client); + } } \ No newline at end of file diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.Models.SpeechToTextStreamServerEvent.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.Models.SpeechToTextStreamServerEvent.g.cs index 6ca63d7..b0ee700 100644 --- a/src/libs/Inworld/Generated/Inworld.Realtime.Models.SpeechToTextStreamServerEvent.g.cs +++ b/src/libs/Inworld/Generated/Inworld.Realtime.Models.SpeechToTextStreamServerEvent.g.cs @@ -26,6 +26,19 @@ namespace Inworld.Realtime #endif public bool IsSttTranscription => SttTranscription != null; + /// + /// + /// + public bool TryPickSttTranscription( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Inworld.Realtime.SttTranscription? value) + { + value = SttTranscription; + return IsSttTranscription; + } + /// /// /// @@ -43,6 +56,19 @@ namespace Inworld.Realtime #endif public bool IsSttUsage => SttUsage != null; + /// + /// + /// + public bool TryPickSttUsage( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Inworld.Realtime.SttUsage? value) + { + value = SttUsage; + return IsSttUsage; + } + /// /// /// @@ -59,6 +85,19 @@ namespace Inworld.Realtime [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SttStarted))] #endif public bool IsSttStarted => SttStarted != null; + + /// + /// + /// + public bool TryPickSttStarted( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Inworld.Realtime.SttSpeechStarted? value) + { + value = SttStarted; + return IsSttStarted; + } /// /// /// @@ -157,9 +196,9 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? sttTranscription = null, - global::System.Func? sttUsage = null, - global::System.Func? sttStarted = null, + global::System.Func? sttTranscription = null, + global::System.Func? sttUsage = null, + global::System.Func? sttStarted = null, bool validate = true) { if (validate) @@ -187,9 +226,39 @@ public bool Validate() /// /// public void Match( - global::System.Action? sttTranscription = null, - global::System.Action? sttUsage = null, - global::System.Action? sttStarted = null, + global::System.Action? sttTranscription = null, + + global::System.Action? sttUsage = null, + + global::System.Action? sttStarted = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsSttTranscription) + { + sttTranscription?.Invoke(SttTranscription!); + } + else if (IsSttUsage) + { + sttUsage?.Invoke(SttUsage!); + } + else if (IsSttStarted) + { + sttStarted?.Invoke(SttStarted!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? sttTranscription = null, + global::System.Action? sttUsage = null, + global::System.Action? sttStarted = null, bool validate = true) { if (validate) diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.Models.TextToSpeechStreamServerEvent.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.Models.TextToSpeechStreamServerEvent.g.cs index a73eb8b..8259bde 100644 --- a/src/libs/Inworld/Generated/Inworld.Realtime.Models.TextToSpeechStreamServerEvent.g.cs +++ b/src/libs/Inworld/Generated/Inworld.Realtime.Models.TextToSpeechStreamServerEvent.g.cs @@ -26,6 +26,19 @@ namespace Inworld.Realtime #endif public bool IsTtsContextCreated => TtsContextCreated != null; + /// + /// + /// + public bool TryPickTtsContextCreated( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Inworld.Realtime.TtsContextCreated? value) + { + value = TtsContextCreated; + return IsTtsContextCreated; + } + /// /// /// @@ -43,6 +56,19 @@ namespace Inworld.Realtime #endif public bool IsTtsAudioChunk => TtsAudioChunk != null; + /// + /// + /// + public bool TryPickTtsAudioChunk( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Inworld.Realtime.TtsAudioChunk? value) + { + value = TtsAudioChunk; + return IsTtsAudioChunk; + } + /// /// /// @@ -60,6 +86,19 @@ namespace Inworld.Realtime #endif public bool IsTtsFlushCompleted => TtsFlushCompleted != null; + /// + /// + /// + public bool TryPickTtsFlushCompleted( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Inworld.Realtime.TtsFlushCompleted? value) + { + value = TtsFlushCompleted; + return IsTtsFlushCompleted; + } + /// /// /// @@ -76,6 +115,19 @@ namespace Inworld.Realtime [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(TtsContextClosed))] #endif public bool IsTtsContextClosed => TtsContextClosed != null; + + /// + /// + /// + public bool TryPickTtsContextClosed( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Inworld.Realtime.TtsContextClosed? value) + { + value = TtsContextClosed; + return IsTtsContextClosed; + } /// /// /// @@ -196,10 +248,10 @@ public bool Validate() /// /// public TResult? Match( - global::System.Func? ttsContextCreated = null, - global::System.Func? ttsAudioChunk = null, - global::System.Func? ttsFlushCompleted = null, - global::System.Func? ttsContextClosed = null, + global::System.Func? ttsContextCreated = null, + global::System.Func? ttsAudioChunk = null, + global::System.Func? ttsFlushCompleted = null, + global::System.Func? ttsContextClosed = null, bool validate = true) { if (validate) @@ -231,10 +283,46 @@ public bool Validate() /// /// public void Match( - global::System.Action? ttsContextCreated = null, - global::System.Action? ttsAudioChunk = null, - global::System.Action? ttsFlushCompleted = null, - global::System.Action? ttsContextClosed = null, + global::System.Action? ttsContextCreated = null, + + global::System.Action? ttsAudioChunk = null, + + global::System.Action? ttsFlushCompleted = null, + + global::System.Action? ttsContextClosed = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsTtsContextCreated) + { + ttsContextCreated?.Invoke(TtsContextCreated!); + } + else if (IsTtsAudioChunk) + { + ttsAudioChunk?.Invoke(TtsAudioChunk!); + } + else if (IsTtsFlushCompleted) + { + ttsFlushCompleted?.Invoke(TtsFlushCompleted!); + } + else if (IsTtsContextClosed) + { + ttsContextClosed?.Invoke(TtsContextClosed!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? ttsContextCreated = null, + global::System.Action? ttsAudioChunk = null, + global::System.Action? ttsFlushCompleted = null, + global::System.Action? ttsContextClosed = null, bool validate = true) { if (validate)