From 40899036064e33f1657492c03ed3044a1c5dbfe9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 25 Aug 2026 18:47:25 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...worldSpeechToTextStreamRealtimeClient.g.cs | 4 +- ...worldTextToSpeechStreamRealtimeClient.g.cs | 5 +- ...nverters.StreamApplyTextNormalization.g.cs | 53 ++++++++ ....StreamApplyTextNormalizationNullable.g.cs | 60 +++++++++ ...me.JsonConverters.StreamAudioEncoding.g.cs | 53 ++++++++ ...onverters.StreamAudioEncodingNullable.g.cs | 60 +++++++++ ...ime.JsonConverters.StreamDeliveryMode.g.cs | 53 ++++++++ ...Converters.StreamDeliveryModeNullable.g.cs | 60 +++++++++ ...ters.StreamTimestampTransportStrategy.g.cs | 53 ++++++++ ...eamTimestampTransportStrategyNullable.g.cs | 60 +++++++++ ...me.JsonConverters.StreamTimestampType.g.cs | 53 ++++++++ ...onverters.StreamTimestampTypeNullable.g.cs | 60 +++++++++ ...JsonConverters.SttStreamAudioEncoding.g.cs | 53 ++++++++ ...erters.SttStreamAudioEncodingNullable.g.cs | 60 +++++++++ ...nworld.Realtime.JsonSerializerContext.g.cs | 32 ++++- ...d.Realtime.JsonSerializerContextTypes.g.cs | 126 +++++++++++------- ...e.Models.StreamApplyTextNormalization.g.cs | 57 ++++++++ ...rld.Realtime.Models.StreamAudioConfig.g.cs | 5 +- ...d.Realtime.Models.StreamAudioEncoding.g.cs | 81 +++++++++++ ...ld.Realtime.Models.StreamDeliveryMode.g.cs | 57 ++++++++ ...dels.StreamTimestampTransportStrategy.g.cs | 57 ++++++++ ...d.Realtime.Models.StreamTimestampType.g.cs | 57 ++++++++ ...Inworld.Realtime.Models.SttAudioChunk.g.cs | 7 +- ...rld.Realtime.Models.SttAudioChunkData.g.cs | 7 +- ...nworld.Realtime.Models.SttCloseStream.g.cs | 7 +- .../Inworld.Realtime.Models.SttConfigure.g.cs | 7 +- .../Inworld.Realtime.Models.SttEndTurn.g.cs | 7 +- ...orld.Realtime.Models.SttSpeechStarted.g.cs | 7 +- ...ealtime.Models.SttStreamAudioEncoding.g.cs | 75 +++++++++++ ...time.Models.SttTranscribeConfigParams.g.cs | 20 ++- ...orld.Realtime.Models.SttTranscription.g.cs | 7 +- .../Inworld.Realtime.Models.SttUsage.g.cs | 7 +- ...Realtime.Models.SttVoiceProfileConfig.g.cs | 5 +- ...Inworld.Realtime.Models.TtsAudioChunk.g.cs | 13 +- ...world.Realtime.Models.TtsCloseContext.g.cs | 7 +- ...orld.Realtime.Models.TtsContextClosed.g.cs | 13 +- ...rld.Realtime.Models.TtsContextCreated.g.cs | 13 +- ...orld.Realtime.Models.TtsCreateContext.g.cs | 7 +- ...ealtime.Models.TtsCreateContextParams.g.cs | 34 +++-- ...rld.Realtime.Models.TtsFlushCompleted.g.cs | 13 +- ...world.Realtime.Models.TtsFlushContext.g.cs | 7 +- ...rld.Realtime.Models.TtsResultEnvelope.g.cs | 3 +- .../Inworld.Realtime.Models.TtsSendText.g.cs | 7 +- ...rld.Realtime.Models.TtsSendTextParams.g.cs | 7 +- 44 files changed, 1300 insertions(+), 139 deletions(-) create mode 100644 src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamApplyTextNormalization.g.cs create mode 100644 src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamApplyTextNormalizationNullable.g.cs create mode 100644 src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamAudioEncoding.g.cs create mode 100644 src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamAudioEncodingNullable.g.cs create mode 100644 src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamDeliveryMode.g.cs create mode 100644 src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamDeliveryModeNullable.g.cs create mode 100644 src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamTimestampTransportStrategy.g.cs create mode 100644 src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamTimestampTransportStrategyNullable.g.cs create mode 100644 src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamTimestampType.g.cs create mode 100644 src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamTimestampTypeNullable.g.cs create mode 100644 src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.SttStreamAudioEncoding.g.cs create mode 100644 src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.SttStreamAudioEncodingNullable.g.cs create mode 100644 src/libs/Inworld/Generated/Inworld.Realtime.Models.StreamApplyTextNormalization.g.cs create mode 100644 src/libs/Inworld/Generated/Inworld.Realtime.Models.StreamAudioEncoding.g.cs create mode 100644 src/libs/Inworld/Generated/Inworld.Realtime.Models.StreamDeliveryMode.g.cs create mode 100644 src/libs/Inworld/Generated/Inworld.Realtime.Models.StreamTimestampTransportStrategy.g.cs create mode 100644 src/libs/Inworld/Generated/Inworld.Realtime.Models.StreamTimestampType.g.cs create mode 100644 src/libs/Inworld/Generated/Inworld.Realtime.Models.SttStreamAudioEncoding.g.cs diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.InworldSpeechToTextStreamRealtimeClient.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.InworldSpeechToTextStreamRealtimeClient.g.cs index aa45487..05983b6 100644 --- a/src/libs/Inworld/Generated/Inworld.Realtime.InworldSpeechToTextStreamRealtimeClient.g.cs +++ b/src/libs/Inworld/Generated/Inworld.Realtime.InworldSpeechToTextStreamRealtimeClient.g.cs @@ -4,7 +4,9 @@ namespace Inworld.Realtime { /// - /// | + /// Bidirectional streaming STT. The client sends a `transcribe_config`
+ /// message, then a series of `audio_chunk` messages. The server emits
+ /// interim and final transcription results plus optional VAD events. ///
public sealed partial class InworldSpeechToTextStreamRealtimeClient : global::System.IDisposable, global::System.IAsyncDisposable { diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.InworldTextToSpeechStreamRealtimeClient.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.InworldTextToSpeechStreamRealtimeClient.g.cs index 22887f8..f1581de 100644 --- a/src/libs/Inworld/Generated/Inworld.Realtime.InworldTextToSpeechStreamRealtimeClient.g.cs +++ b/src/libs/Inworld/Generated/Inworld.Realtime.InworldTextToSpeechStreamRealtimeClient.g.cs @@ -4,7 +4,10 @@ namespace Inworld.Realtime { /// - /// | + /// Bidirectional streaming TTS. The client opens a context (or multiple)
+ /// with a chosen voice/model, sends text fragments, and receives audio
+ /// chunks as they are generated. Up to 20 concurrent connections, 5
+ /// contexts per connection, 10-minute inactivity timeout. ///
public sealed partial class InworldTextToSpeechStreamRealtimeClient : global::System.IDisposable, global::System.IAsyncDisposable { diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamApplyTextNormalization.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamApplyTextNormalization.g.cs new file mode 100644 index 0000000..a3f5d6f --- /dev/null +++ b/src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamApplyTextNormalization.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Inworld.Realtime.JsonConverters +{ + /// + public sealed class StreamApplyTextNormalizationJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Inworld.Realtime.StreamApplyTextNormalization 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::Inworld.Realtime.StreamApplyTextNormalizationExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Inworld.Realtime.StreamApplyTextNormalization)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Inworld.Realtime.StreamApplyTextNormalization); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Inworld.Realtime.StreamApplyTextNormalization value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Inworld.Realtime.StreamApplyTextNormalizationExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamApplyTextNormalizationNullable.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamApplyTextNormalizationNullable.g.cs new file mode 100644 index 0000000..77bdbf3 --- /dev/null +++ b/src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamApplyTextNormalizationNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Inworld.Realtime.JsonConverters +{ + /// + public sealed class StreamApplyTextNormalizationNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Inworld.Realtime.StreamApplyTextNormalization? 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::Inworld.Realtime.StreamApplyTextNormalizationExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Inworld.Realtime.StreamApplyTextNormalization)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Inworld.Realtime.StreamApplyTextNormalization?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Inworld.Realtime.StreamApplyTextNormalization? 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::Inworld.Realtime.StreamApplyTextNormalizationExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamAudioEncoding.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamAudioEncoding.g.cs new file mode 100644 index 0000000..6ecf4b2 --- /dev/null +++ b/src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamAudioEncoding.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Inworld.Realtime.JsonConverters +{ + /// + public sealed class StreamAudioEncodingJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Inworld.Realtime.StreamAudioEncoding 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::Inworld.Realtime.StreamAudioEncodingExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Inworld.Realtime.StreamAudioEncoding)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Inworld.Realtime.StreamAudioEncoding); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Inworld.Realtime.StreamAudioEncoding value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Inworld.Realtime.StreamAudioEncodingExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamAudioEncodingNullable.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamAudioEncodingNullable.g.cs new file mode 100644 index 0000000..f0eb4b7 --- /dev/null +++ b/src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamAudioEncodingNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Inworld.Realtime.JsonConverters +{ + /// + public sealed class StreamAudioEncodingNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Inworld.Realtime.StreamAudioEncoding? 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::Inworld.Realtime.StreamAudioEncodingExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Inworld.Realtime.StreamAudioEncoding)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Inworld.Realtime.StreamAudioEncoding?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Inworld.Realtime.StreamAudioEncoding? 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::Inworld.Realtime.StreamAudioEncodingExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamDeliveryMode.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamDeliveryMode.g.cs new file mode 100644 index 0000000..babd42c --- /dev/null +++ b/src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamDeliveryMode.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Inworld.Realtime.JsonConverters +{ + /// + public sealed class StreamDeliveryModeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Inworld.Realtime.StreamDeliveryMode 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::Inworld.Realtime.StreamDeliveryModeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Inworld.Realtime.StreamDeliveryMode)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Inworld.Realtime.StreamDeliveryMode); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Inworld.Realtime.StreamDeliveryMode value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Inworld.Realtime.StreamDeliveryModeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamDeliveryModeNullable.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamDeliveryModeNullable.g.cs new file mode 100644 index 0000000..dd3ec46 --- /dev/null +++ b/src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamDeliveryModeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Inworld.Realtime.JsonConverters +{ + /// + public sealed class StreamDeliveryModeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Inworld.Realtime.StreamDeliveryMode? 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::Inworld.Realtime.StreamDeliveryModeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Inworld.Realtime.StreamDeliveryMode)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Inworld.Realtime.StreamDeliveryMode?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Inworld.Realtime.StreamDeliveryMode? 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::Inworld.Realtime.StreamDeliveryModeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamTimestampTransportStrategy.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamTimestampTransportStrategy.g.cs new file mode 100644 index 0000000..4d9d928 --- /dev/null +++ b/src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamTimestampTransportStrategy.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Inworld.Realtime.JsonConverters +{ + /// + public sealed class StreamTimestampTransportStrategyJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Inworld.Realtime.StreamTimestampTransportStrategy 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::Inworld.Realtime.StreamTimestampTransportStrategyExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Inworld.Realtime.StreamTimestampTransportStrategy)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Inworld.Realtime.StreamTimestampTransportStrategy); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Inworld.Realtime.StreamTimestampTransportStrategy value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Inworld.Realtime.StreamTimestampTransportStrategyExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamTimestampTransportStrategyNullable.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamTimestampTransportStrategyNullable.g.cs new file mode 100644 index 0000000..cb8b37d --- /dev/null +++ b/src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamTimestampTransportStrategyNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Inworld.Realtime.JsonConverters +{ + /// + public sealed class StreamTimestampTransportStrategyNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Inworld.Realtime.StreamTimestampTransportStrategy? 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::Inworld.Realtime.StreamTimestampTransportStrategyExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Inworld.Realtime.StreamTimestampTransportStrategy)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Inworld.Realtime.StreamTimestampTransportStrategy?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Inworld.Realtime.StreamTimestampTransportStrategy? 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::Inworld.Realtime.StreamTimestampTransportStrategyExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamTimestampType.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamTimestampType.g.cs new file mode 100644 index 0000000..d5c8fc0 --- /dev/null +++ b/src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamTimestampType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Inworld.Realtime.JsonConverters +{ + /// + public sealed class StreamTimestampTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Inworld.Realtime.StreamTimestampType 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::Inworld.Realtime.StreamTimestampTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Inworld.Realtime.StreamTimestampType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Inworld.Realtime.StreamTimestampType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Inworld.Realtime.StreamTimestampType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Inworld.Realtime.StreamTimestampTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamTimestampTypeNullable.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamTimestampTypeNullable.g.cs new file mode 100644 index 0000000..b564f8e --- /dev/null +++ b/src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.StreamTimestampTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Inworld.Realtime.JsonConverters +{ + /// + public sealed class StreamTimestampTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Inworld.Realtime.StreamTimestampType? 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::Inworld.Realtime.StreamTimestampTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Inworld.Realtime.StreamTimestampType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Inworld.Realtime.StreamTimestampType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Inworld.Realtime.StreamTimestampType? 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::Inworld.Realtime.StreamTimestampTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.SttStreamAudioEncoding.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.SttStreamAudioEncoding.g.cs new file mode 100644 index 0000000..7f01ba6 --- /dev/null +++ b/src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.SttStreamAudioEncoding.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Inworld.Realtime.JsonConverters +{ + /// + public sealed class SttStreamAudioEncodingJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Inworld.Realtime.SttStreamAudioEncoding 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::Inworld.Realtime.SttStreamAudioEncodingExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Inworld.Realtime.SttStreamAudioEncoding)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Inworld.Realtime.SttStreamAudioEncoding); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Inworld.Realtime.SttStreamAudioEncoding value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Inworld.Realtime.SttStreamAudioEncodingExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.SttStreamAudioEncodingNullable.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.SttStreamAudioEncodingNullable.g.cs new file mode 100644 index 0000000..1feed6a --- /dev/null +++ b/src/libs/Inworld/Generated/Inworld.Realtime.JsonConverters.SttStreamAudioEncodingNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Inworld.Realtime.JsonConverters +{ + /// + public sealed class SttStreamAudioEncodingNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Inworld.Realtime.SttStreamAudioEncoding? 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::Inworld.Realtime.SttStreamAudioEncodingExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Inworld.Realtime.SttStreamAudioEncoding)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Inworld.Realtime.SttStreamAudioEncoding?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Inworld.Realtime.SttStreamAudioEncoding? 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::Inworld.Realtime.SttStreamAudioEncodingExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.JsonSerializerContext.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.JsonSerializerContext.g.cs index 7358a55..76e1917 100644 --- a/src/libs/Inworld/Generated/Inworld.Realtime.JsonSerializerContext.g.cs +++ b/src/libs/Inworld/Generated/Inworld.Realtime.JsonSerializerContext.g.cs @@ -13,16 +13,45 @@ namespace Inworld.Realtime DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, Converters = new global::System.Type[] { + typeof(global::Inworld.Realtime.JsonConverters.StreamAudioEncodingJsonConverter), + + typeof(global::Inworld.Realtime.JsonConverters.StreamAudioEncodingNullableJsonConverter), + + typeof(global::Inworld.Realtime.JsonConverters.StreamTimestampTypeJsonConverter), + + typeof(global::Inworld.Realtime.JsonConverters.StreamTimestampTypeNullableJsonConverter), + + typeof(global::Inworld.Realtime.JsonConverters.StreamApplyTextNormalizationJsonConverter), + + typeof(global::Inworld.Realtime.JsonConverters.StreamApplyTextNormalizationNullableJsonConverter), + + typeof(global::Inworld.Realtime.JsonConverters.StreamDeliveryModeJsonConverter), + + typeof(global::Inworld.Realtime.JsonConverters.StreamDeliveryModeNullableJsonConverter), + + typeof(global::Inworld.Realtime.JsonConverters.StreamTimestampTransportStrategyJsonConverter), + + typeof(global::Inworld.Realtime.JsonConverters.StreamTimestampTransportStrategyNullableJsonConverter), + + typeof(global::Inworld.Realtime.JsonConverters.SttStreamAudioEncodingJsonConverter), + + typeof(global::Inworld.Realtime.JsonConverters.SttStreamAudioEncodingNullableJsonConverter), + typeof(global::Inworld.Realtime.JsonConverters.TextToSpeechStreamServerEventJsonConverter), typeof(global::Inworld.Realtime.JsonConverters.SpeechToTextStreamServerEventJsonConverter), })] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Inworld.Realtime.JsonSerializerContextTypes))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Inworld.Realtime.StreamAudioEncoding), TypeInfoPropertyName = "StreamAudioEncoding2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Inworld.Realtime.StreamTimestampType), TypeInfoPropertyName = "StreamTimestampType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Inworld.Realtime.StreamApplyTextNormalization), TypeInfoPropertyName = "StreamApplyTextNormalization2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Inworld.Realtime.StreamDeliveryMode), TypeInfoPropertyName = "StreamDeliveryMode2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Inworld.Realtime.StreamTimestampTransportStrategy), TypeInfoPropertyName = "StreamTimestampTransportStrategy2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Inworld.Realtime.StreamAudioConfig))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Inworld.Realtime.StreamStatus))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Inworld.Realtime.TtsCreateContextParams))] @@ -37,6 +66,7 @@ namespace Inworld.Realtime [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Inworld.Realtime.TtsAudioChunkData))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(byte[]))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Inworld.Realtime.TtsResultEnvelope))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Inworld.Realtime.SttStreamAudioEncoding), TypeInfoPropertyName = "SttStreamAudioEncoding2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Inworld.Realtime.SttVoiceProfileConfig))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Inworld.Realtime.SttGroqConfig))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(float))] diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.JsonSerializerContextTypes.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.JsonSerializerContextTypes.g.cs index 611a15b..70acf0b 100644 --- a/src/libs/Inworld/Generated/Inworld.Realtime.JsonSerializerContextTypes.g.cs +++ b/src/libs/Inworld/Generated/Inworld.Realtime.JsonSerializerContextTypes.g.cs @@ -28,207 +28,231 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public string? Type0 { get; set; } + public global::Inworld.Realtime.StreamAudioEncoding? Type0 { get; set; } /// /// /// - public global::Inworld.Realtime.StreamAudioConfig? Type1 { get; set; } + public global::Inworld.Realtime.StreamTimestampType? Type1 { get; set; } /// /// /// - public int? Type2 { get; set; } + public global::Inworld.Realtime.StreamApplyTextNormalization? Type2 { get; set; } /// /// /// - public double? Type3 { get; set; } + public global::Inworld.Realtime.StreamDeliveryMode? Type3 { get; set; } /// /// /// - public global::Inworld.Realtime.StreamStatus? Type4 { get; set; } + public global::Inworld.Realtime.StreamTimestampTransportStrategy? Type4 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type5 { get; set; } + public global::Inworld.Realtime.StreamAudioConfig? Type5 { get; set; } /// /// /// - public object? Type6 { get; set; } + public int? Type6 { get; set; } /// /// /// - public global::Inworld.Realtime.TtsCreateContextParams? Type7 { get; set; } + public double? Type7 { get; set; } /// /// /// - public bool? Type8 { get; set; } + public global::Inworld.Realtime.StreamStatus? Type8 { get; set; } /// /// /// - public global::Inworld.Realtime.TtsSendTextParams? Type9 { get; set; } + public string? Type9 { get; set; } /// /// /// - public global::Inworld.Realtime.TtsWordAlignment? Type10 { get; set; } + public global::System.Collections.Generic.IList? Type10 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type11 { get; set; } + public object? Type11 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type12 { get; set; } + public global::Inworld.Realtime.TtsCreateContextParams? Type12 { get; set; } /// /// /// - public global::Inworld.Realtime.TtsCharacterAlignment? Type13 { get; set; } + public bool? Type13 { get; set; } /// /// /// - public global::Inworld.Realtime.TtsTimestampInfo? Type14 { get; set; } + public global::Inworld.Realtime.TtsSendTextParams? Type14 { get; set; } /// /// /// - public global::Inworld.Realtime.TtsStreamUsage? Type15 { get; set; } + public global::Inworld.Realtime.TtsWordAlignment? Type15 { get; set; } /// /// /// - public global::Inworld.Realtime.TtsAudioChunkData? Type16 { get; set; } + public global::System.Collections.Generic.IList? Type16 { get; set; } /// /// /// - public byte[]? Type17 { get; set; } + public global::System.Collections.Generic.IList? Type17 { get; set; } /// /// /// - public global::Inworld.Realtime.TtsResultEnvelope? Type18 { get; set; } + public global::Inworld.Realtime.TtsCharacterAlignment? Type18 { get; set; } /// /// /// - public global::Inworld.Realtime.SttVoiceProfileConfig? Type19 { get; set; } + public global::Inworld.Realtime.TtsTimestampInfo? Type19 { get; set; } /// /// /// - public global::Inworld.Realtime.SttGroqConfig? Type20 { get; set; } + public global::Inworld.Realtime.TtsStreamUsage? Type20 { get; set; } /// /// /// - public float? Type21 { get; set; } + public global::Inworld.Realtime.TtsAudioChunkData? Type21 { get; set; } /// /// /// - public global::Inworld.Realtime.SttAssemblyAiConfig? Type22 { get; set; } + public byte[]? Type22 { get; set; } /// /// /// - public global::Inworld.Realtime.SttInworldSttV1Config? Type23 { get; set; } + public global::Inworld.Realtime.TtsResultEnvelope? Type23 { get; set; } /// /// /// - public global::Inworld.Realtime.SttTranscribeConfigParams? Type24 { get; set; } + public global::Inworld.Realtime.SttStreamAudioEncoding? Type24 { get; set; } /// /// /// - public global::Inworld.Realtime.SttAudioChunkData? Type25 { get; set; } + public global::Inworld.Realtime.SttVoiceProfileConfig? Type25 { get; set; } /// /// /// - public global::Inworld.Realtime.SttWordTimestamp? Type26 { get; set; } + public global::Inworld.Realtime.SttGroqConfig? Type26 { get; set; } /// /// /// - public global::Inworld.Realtime.SttTranscriptionData? Type27 { get; set; } + public float? Type27 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type28 { get; set; } + public global::Inworld.Realtime.SttAssemblyAiConfig? Type28 { get; set; } /// /// /// - public global::Inworld.Realtime.SttUsageData? Type29 { get; set; } + public global::Inworld.Realtime.SttInworldSttV1Config? Type29 { get; set; } /// /// /// - public global::Inworld.Realtime.SttSpeechStartedData? Type30 { get; set; } + public global::Inworld.Realtime.SttTranscribeConfigParams? Type30 { get; set; } /// /// /// - public global::Inworld.Realtime.TtsCreateContext? Type31 { get; set; } + public global::Inworld.Realtime.SttAudioChunkData? Type31 { get; set; } /// /// /// - public global::Inworld.Realtime.TtsSendText? Type32 { get; set; } + public global::Inworld.Realtime.SttWordTimestamp? Type32 { get; set; } /// /// /// - public global::Inworld.Realtime.TtsFlushContext? Type33 { get; set; } + public global::Inworld.Realtime.SttTranscriptionData? Type33 { get; set; } /// /// /// - public global::Inworld.Realtime.TtsCloseContext? Type34 { get; set; } + public global::System.Collections.Generic.IList? Type34 { get; set; } /// /// /// - public global::Inworld.Realtime.TtsContextCreated? Type35 { get; set; } + public global::Inworld.Realtime.SttUsageData? Type35 { get; set; } /// /// /// - public global::Inworld.Realtime.TtsAudioChunk? Type36 { get; set; } + public global::Inworld.Realtime.SttSpeechStartedData? Type36 { get; set; } /// /// /// - public global::Inworld.Realtime.TtsFlushCompleted? Type37 { get; set; } + public global::Inworld.Realtime.TtsCreateContext? Type37 { get; set; } /// /// /// - public global::Inworld.Realtime.TtsContextClosed? Type38 { get; set; } + public global::Inworld.Realtime.TtsSendText? Type38 { get; set; } /// /// /// - public global::Inworld.Realtime.SttConfigure? Type39 { get; set; } + public global::Inworld.Realtime.TtsFlushContext? Type39 { get; set; } /// /// /// - public global::Inworld.Realtime.SttAudioChunk? Type40 { get; set; } + public global::Inworld.Realtime.TtsCloseContext? Type40 { get; set; } /// /// /// - public global::Inworld.Realtime.SttEndTurn? Type41 { get; set; } + public global::Inworld.Realtime.TtsContextCreated? Type41 { get; set; } /// /// /// - public global::Inworld.Realtime.SttCloseStream? Type42 { get; set; } + public global::Inworld.Realtime.TtsAudioChunk? Type42 { get; set; } /// /// /// - public global::Inworld.Realtime.SttTranscriptionResult? Type43 { get; set; } + public global::Inworld.Realtime.TtsFlushCompleted? Type43 { get; set; } /// /// /// - public global::Inworld.Realtime.SttTranscription? Type44 { get; set; } + public global::Inworld.Realtime.TtsContextClosed? Type44 { get; set; } /// /// /// - public global::Inworld.Realtime.SttUsageResult? Type45 { get; set; } + public global::Inworld.Realtime.SttConfigure? Type45 { get; set; } /// /// /// - public global::Inworld.Realtime.SttUsage? Type46 { get; set; } + public global::Inworld.Realtime.SttAudioChunk? Type46 { get; set; } /// /// /// - public global::Inworld.Realtime.SttSpeechStartedResult? Type47 { get; set; } + public global::Inworld.Realtime.SttEndTurn? Type47 { get; set; } /// /// /// - public global::Inworld.Realtime.SttSpeechStarted? Type48 { get; set; } + public global::Inworld.Realtime.SttCloseStream? Type48 { get; set; } /// /// /// - public global::Inworld.Realtime.TextToSpeechStreamServerEvent? Type49 { get; set; } + public global::Inworld.Realtime.SttTranscriptionResult? Type49 { get; set; } /// /// /// - public global::Inworld.Realtime.SpeechToTextStreamServerEvent? Type50 { get; set; } + public global::Inworld.Realtime.SttTranscription? Type50 { get; set; } + /// + /// + /// + public global::Inworld.Realtime.SttUsageResult? Type51 { get; set; } + /// + /// + /// + public global::Inworld.Realtime.SttUsage? Type52 { get; set; } + /// + /// + /// + public global::Inworld.Realtime.SttSpeechStartedResult? Type53 { get; set; } + /// + /// + /// + public global::Inworld.Realtime.SttSpeechStarted? Type54 { get; set; } + /// + /// + /// + public global::Inworld.Realtime.TextToSpeechStreamServerEvent? Type55 { get; set; } + /// + /// + /// + public global::Inworld.Realtime.SpeechToTextStreamServerEvent? Type56 { get; set; } /// /// diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.Models.StreamApplyTextNormalization.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.Models.StreamApplyTextNormalization.g.cs new file mode 100644 index 0000000..1c17a20 --- /dev/null +++ b/src/libs/Inworld/Generated/Inworld.Realtime.Models.StreamApplyTextNormalization.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace Inworld.Realtime +{ + /// + /// + /// + public enum StreamApplyTextNormalization + { + /// + /// + /// + ApplyTextNormalizationUnspecified, + /// + /// + /// + Off, + /// + /// + /// + On, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class StreamApplyTextNormalizationExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this StreamApplyTextNormalization value) + { + return value switch + { + StreamApplyTextNormalization.ApplyTextNormalizationUnspecified => "APPLY_TEXT_NORMALIZATION_UNSPECIFIED", + StreamApplyTextNormalization.Off => "OFF", + StreamApplyTextNormalization.On => "ON", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static StreamApplyTextNormalization? ToEnum(string value) + { + return value switch + { + "APPLY_TEXT_NORMALIZATION_UNSPECIFIED" => StreamApplyTextNormalization.ApplyTextNormalizationUnspecified, + "OFF" => StreamApplyTextNormalization.Off, + "ON" => StreamApplyTextNormalization.On, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.Models.StreamAudioConfig.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.Models.StreamAudioConfig.g.cs index 832d06e..73af1da 100644 --- a/src/libs/Inworld/Generated/Inworld.Realtime.Models.StreamAudioConfig.g.cs +++ b/src/libs/Inworld/Generated/Inworld.Realtime.Models.StreamAudioConfig.g.cs @@ -12,7 +12,8 @@ public sealed partial class StreamAudioConfig /// /// [global::System.Text.Json.Serialization.JsonPropertyName("audioEncoding")] - public string? AudioEncoding { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Inworld.Realtime.JsonConverters.StreamAudioEncodingJsonConverter))] + public global::Inworld.Realtime.StreamAudioEncoding? AudioEncoding { get; set; } /// /// @@ -49,7 +50,7 @@ public sealed partial class StreamAudioConfig [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public StreamAudioConfig( - string? audioEncoding, + global::Inworld.Realtime.StreamAudioEncoding? audioEncoding, int? sampleRateHertz, int? bitRate, double? speakingRate) diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.Models.StreamAudioEncoding.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.Models.StreamAudioEncoding.g.cs new file mode 100644 index 0000000..b8ce086 --- /dev/null +++ b/src/libs/Inworld/Generated/Inworld.Realtime.Models.StreamAudioEncoding.g.cs @@ -0,0 +1,81 @@ + +#nullable enable + +namespace Inworld.Realtime +{ + /// + /// + /// + public enum StreamAudioEncoding + { + /// + /// + /// + Alaw, + /// + /// + /// + Linear16, + /// + /// + /// + Mp3, + /// + /// + /// + Mulaw, + /// + /// + /// + OggOpus, + /// + /// + /// + Pcm, + /// + /// + /// + Wav, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class StreamAudioEncodingExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this StreamAudioEncoding value) + { + return value switch + { + StreamAudioEncoding.Alaw => "ALAW", + StreamAudioEncoding.Linear16 => "LINEAR16", + StreamAudioEncoding.Mp3 => "MP3", + StreamAudioEncoding.Mulaw => "MULAW", + StreamAudioEncoding.OggOpus => "OGG_OPUS", + StreamAudioEncoding.Pcm => "PCM", + StreamAudioEncoding.Wav => "WAV", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static StreamAudioEncoding? ToEnum(string value) + { + return value switch + { + "ALAW" => StreamAudioEncoding.Alaw, + "LINEAR16" => StreamAudioEncoding.Linear16, + "MP3" => StreamAudioEncoding.Mp3, + "MULAW" => StreamAudioEncoding.Mulaw, + "OGG_OPUS" => StreamAudioEncoding.OggOpus, + "PCM" => StreamAudioEncoding.Pcm, + "WAV" => StreamAudioEncoding.Wav, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.Models.StreamDeliveryMode.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.Models.StreamDeliveryMode.g.cs new file mode 100644 index 0000000..ee428cc --- /dev/null +++ b/src/libs/Inworld/Generated/Inworld.Realtime.Models.StreamDeliveryMode.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace Inworld.Realtime +{ + /// + /// Variation and expressiveness mode for Realtime TTS-2. + /// + public enum StreamDeliveryMode + { + /// + /// + /// + Balanced, + /// + /// + /// + Creative, + /// + /// + /// + Stable, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class StreamDeliveryModeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this StreamDeliveryMode value) + { + return value switch + { + StreamDeliveryMode.Balanced => "BALANCED", + StreamDeliveryMode.Creative => "CREATIVE", + StreamDeliveryMode.Stable => "STABLE", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static StreamDeliveryMode? ToEnum(string value) + { + return value switch + { + "BALANCED" => StreamDeliveryMode.Balanced, + "CREATIVE" => StreamDeliveryMode.Creative, + "STABLE" => StreamDeliveryMode.Stable, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.Models.StreamTimestampTransportStrategy.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.Models.StreamTimestampTransportStrategy.g.cs new file mode 100644 index 0000000..ffbfad4 --- /dev/null +++ b/src/libs/Inworld/Generated/Inworld.Realtime.Models.StreamTimestampTransportStrategy.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace Inworld.Realtime +{ + /// + /// + /// + public enum StreamTimestampTransportStrategy + { + /// + /// + /// + Async, + /// + /// + /// + Sync, + /// + /// + /// + TimestampTransportStrategyUnspecified, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class StreamTimestampTransportStrategyExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this StreamTimestampTransportStrategy value) + { + return value switch + { + StreamTimestampTransportStrategy.Async => "ASYNC", + StreamTimestampTransportStrategy.Sync => "SYNC", + StreamTimestampTransportStrategy.TimestampTransportStrategyUnspecified => "TIMESTAMP_TRANSPORT_STRATEGY_UNSPECIFIED", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static StreamTimestampTransportStrategy? ToEnum(string value) + { + return value switch + { + "ASYNC" => StreamTimestampTransportStrategy.Async, + "SYNC" => StreamTimestampTransportStrategy.Sync, + "TIMESTAMP_TRANSPORT_STRATEGY_UNSPECIFIED" => StreamTimestampTransportStrategy.TimestampTransportStrategyUnspecified, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.Models.StreamTimestampType.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.Models.StreamTimestampType.g.cs new file mode 100644 index 0000000..b31de86 --- /dev/null +++ b/src/libs/Inworld/Generated/Inworld.Realtime.Models.StreamTimestampType.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace Inworld.Realtime +{ + /// + /// + /// + public enum StreamTimestampType + { + /// + /// + /// + Character, + /// + /// + /// + TimestampTypeUnspecified, + /// + /// + /// + Word, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class StreamTimestampTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this StreamTimestampType value) + { + return value switch + { + StreamTimestampType.Character => "CHARACTER", + StreamTimestampType.TimestampTypeUnspecified => "TIMESTAMP_TYPE_UNSPECIFIED", + StreamTimestampType.Word => "WORD", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static StreamTimestampType? ToEnum(string value) + { + return value switch + { + "CHARACTER" => StreamTimestampType.Character, + "TIMESTAMP_TYPE_UNSPECIFIED" => StreamTimestampType.TimestampTypeUnspecified, + "WORD" => StreamTimestampType.Word, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttAudioChunk.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttAudioChunk.g.cs index f49f3f2..f94fa36 100644 --- a/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttAudioChunk.g.cs +++ b/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttAudioChunk.g.cs @@ -12,7 +12,8 @@ public sealed partial class SttAudioChunk /// /// [global::System.Text.Json.Serialization.JsonPropertyName("audio_chunk")] - public global::Inworld.Realtime.SttAudioChunkData? AudioChunk { get; set; } + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Inworld.Realtime.SttAudioChunkData AudioChunk { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -28,9 +29,9 @@ public sealed partial class SttAudioChunk [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public SttAudioChunk( - global::Inworld.Realtime.SttAudioChunkData? audioChunk) + global::Inworld.Realtime.SttAudioChunkData audioChunk) { - this.AudioChunk = audioChunk; + this.AudioChunk = audioChunk ?? throw new global::System.ArgumentNullException(nameof(audioChunk)); } /// diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttAudioChunkData.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttAudioChunkData.g.cs index ed92369..cfedb8b 100644 --- a/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttAudioChunkData.g.cs +++ b/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttAudioChunkData.g.cs @@ -12,7 +12,8 @@ public sealed partial class SttAudioChunkData /// Base64-encoded audio bytes whose encoding matches transcribe_config.audioEncoding. /// [global::System.Text.Json.Serialization.JsonPropertyName("content")] - public byte[]? Content { get; set; } + [global::System.Text.Json.Serialization.JsonRequired] + public required byte[] Content { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -30,9 +31,9 @@ public sealed partial class SttAudioChunkData [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public SttAudioChunkData( - byte[]? content) + byte[] content) { - this.Content = content; + this.Content = content ?? throw new global::System.ArgumentNullException(nameof(content)); } /// diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttCloseStream.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttCloseStream.g.cs index 79cf33e..c9e4163 100644 --- a/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttCloseStream.g.cs +++ b/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttCloseStream.g.cs @@ -12,7 +12,8 @@ public sealed partial class SttCloseStream /// /// [global::System.Text.Json.Serialization.JsonPropertyName("close_stream")] - public object? CloseStream { get; set; } + [global::System.Text.Json.Serialization.JsonRequired] + public required object CloseStream { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -28,9 +29,9 @@ public sealed partial class SttCloseStream [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public SttCloseStream( - object? closeStream) + object closeStream) { - this.CloseStream = closeStream; + this.CloseStream = closeStream ?? throw new global::System.ArgumentNullException(nameof(closeStream)); } /// diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttConfigure.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttConfigure.g.cs index 6f2b9cd..3bb906b 100644 --- a/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttConfigure.g.cs +++ b/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttConfigure.g.cs @@ -12,7 +12,8 @@ public sealed partial class SttConfigure /// /// [global::System.Text.Json.Serialization.JsonPropertyName("transcribe_config")] - public global::Inworld.Realtime.SttTranscribeConfigParams? TranscribeConfig { get; set; } + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Inworld.Realtime.SttTranscribeConfigParams TranscribeConfig { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -28,9 +29,9 @@ public sealed partial class SttConfigure [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public SttConfigure( - global::Inworld.Realtime.SttTranscribeConfigParams? transcribeConfig) + global::Inworld.Realtime.SttTranscribeConfigParams transcribeConfig) { - this.TranscribeConfig = transcribeConfig; + this.TranscribeConfig = transcribeConfig ?? throw new global::System.ArgumentNullException(nameof(transcribeConfig)); } /// diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttEndTurn.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttEndTurn.g.cs index 65d19f9..65e729a 100644 --- a/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttEndTurn.g.cs +++ b/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttEndTurn.g.cs @@ -12,7 +12,8 @@ public sealed partial class SttEndTurn /// /// [global::System.Text.Json.Serialization.JsonPropertyName("end_turn")] - public object? EndTurn { get; set; } + [global::System.Text.Json.Serialization.JsonRequired] + public required object EndTurn { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -28,9 +29,9 @@ public sealed partial class SttEndTurn [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public SttEndTurn( - object? endTurn) + object endTurn) { - this.EndTurn = endTurn; + this.EndTurn = endTurn ?? throw new global::System.ArgumentNullException(nameof(endTurn)); } /// diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttSpeechStarted.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttSpeechStarted.g.cs index 9256d60..213d120 100644 --- a/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttSpeechStarted.g.cs +++ b/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttSpeechStarted.g.cs @@ -12,7 +12,8 @@ public sealed partial class SttSpeechStarted /// /// [global::System.Text.Json.Serialization.JsonPropertyName("result")] - public global::Inworld.Realtime.SttSpeechStartedResult? Result { get; set; } + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Inworld.Realtime.SttSpeechStartedResult Result { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -28,9 +29,9 @@ public sealed partial class SttSpeechStarted [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public SttSpeechStarted( - global::Inworld.Realtime.SttSpeechStartedResult? result) + global::Inworld.Realtime.SttSpeechStartedResult result) { - this.Result = result; + this.Result = result ?? throw new global::System.ArgumentNullException(nameof(result)); } /// diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttStreamAudioEncoding.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttStreamAudioEncoding.g.cs new file mode 100644 index 0000000..6cf48bf --- /dev/null +++ b/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttStreamAudioEncoding.g.cs @@ -0,0 +1,75 @@ + +#nullable enable + +namespace Inworld.Realtime +{ + /// + /// + /// + public enum SttStreamAudioEncoding + { + /// + /// + /// + AudioEncodingUnspecified, + /// + /// + /// + AutoDetect, + /// + /// + /// + Flac, + /// + /// + /// + Linear16, + /// + /// + /// + Mp3, + /// + /// + /// + OggOpus, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class SttStreamAudioEncodingExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this SttStreamAudioEncoding value) + { + return value switch + { + SttStreamAudioEncoding.AudioEncodingUnspecified => "AUDIO_ENCODING_UNSPECIFIED", + SttStreamAudioEncoding.AutoDetect => "AUTO_DETECT", + SttStreamAudioEncoding.Flac => "FLAC", + SttStreamAudioEncoding.Linear16 => "LINEAR16", + SttStreamAudioEncoding.Mp3 => "MP3", + SttStreamAudioEncoding.OggOpus => "OGG_OPUS", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static SttStreamAudioEncoding? ToEnum(string value) + { + return value switch + { + "AUDIO_ENCODING_UNSPECIFIED" => SttStreamAudioEncoding.AudioEncodingUnspecified, + "AUTO_DETECT" => SttStreamAudioEncoding.AutoDetect, + "FLAC" => SttStreamAudioEncoding.Flac, + "LINEAR16" => SttStreamAudioEncoding.Linear16, + "MP3" => SttStreamAudioEncoding.Mp3, + "OGG_OPUS" => SttStreamAudioEncoding.OggOpus, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttTranscribeConfigParams.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttTranscribeConfigParams.g.cs index c57793f..dfaa7e8 100644 --- a/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttTranscribeConfigParams.g.cs +++ b/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttTranscribeConfigParams.g.cs @@ -9,16 +9,20 @@ namespace Inworld.Realtime public sealed partial class SttTranscribeConfigParams { /// - /// | + /// Provider-qualified model ID, e.g. `inworld/inworld-stt-1`,
+ /// `deepgram/flux-general-en`, `deepgram/flux-general-multi`,
+ /// `soniox/stt-rt-v5`, or `assemblyai/universal-streaming-multilingual`. ///
[global::System.Text.Json.Serialization.JsonPropertyName("modelId")] - public string? ModelId { get; set; } + [global::System.Text.Json.Serialization.JsonRequired] + public required string ModelId { get; set; } /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("audioEncoding")] - public string? AudioEncoding { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Inworld.Realtime.JsonConverters.SttStreamAudioEncodingJsonConverter))] + public global::Inworld.Realtime.SttStreamAudioEncoding? AudioEncoding { get; set; } /// /// @@ -96,7 +100,9 @@ public sealed partial class SttTranscribeConfigParams /// Initializes a new instance of the class. /// /// - /// | + /// Provider-qualified model ID, e.g. `inworld/inworld-stt-1`,
+ /// `deepgram/flux-general-en`, `deepgram/flux-general-multi`,
+ /// `soniox/stt-rt-v5`, or `assemblyai/universal-streaming-multilingual`. /// /// /// @@ -114,8 +120,8 @@ public sealed partial class SttTranscribeConfigParams [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public SttTranscribeConfigParams( - string? modelId, - string? audioEncoding, + string modelId, + global::Inworld.Realtime.SttStreamAudioEncoding? audioEncoding, string? language, int? sampleRateHertz, int? numberOfChannels, @@ -128,7 +134,7 @@ public SttTranscribeConfigParams( global::Inworld.Realtime.SttInworldSttV1Config? inworldSttV1Config, global::Inworld.Realtime.SttVoiceProfileConfig? voiceProfileConfig) { - this.ModelId = modelId; + this.ModelId = modelId ?? throw new global::System.ArgumentNullException(nameof(modelId)); this.AudioEncoding = audioEncoding; this.Language = language; this.SampleRateHertz = sampleRateHertz; diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttTranscription.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttTranscription.g.cs index 700e86b..bd502ca 100644 --- a/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttTranscription.g.cs +++ b/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttTranscription.g.cs @@ -12,7 +12,8 @@ public sealed partial class SttTranscription /// ///
[global::System.Text.Json.Serialization.JsonPropertyName("result")] - public global::Inworld.Realtime.SttTranscriptionResult? Result { get; set; } + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Inworld.Realtime.SttTranscriptionResult Result { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -28,9 +29,9 @@ public sealed partial class SttTranscription [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public SttTranscription( - global::Inworld.Realtime.SttTranscriptionResult? result) + global::Inworld.Realtime.SttTranscriptionResult result) { - this.Result = result; + this.Result = result ?? throw new global::System.ArgumentNullException(nameof(result)); } /// diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttUsage.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttUsage.g.cs index 57a963b..4c99274 100644 --- a/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttUsage.g.cs +++ b/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttUsage.g.cs @@ -12,7 +12,8 @@ public sealed partial class SttUsage /// /// [global::System.Text.Json.Serialization.JsonPropertyName("result")] - public global::Inworld.Realtime.SttUsageResult? Result { get; set; } + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Inworld.Realtime.SttUsageResult Result { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -28,9 +29,9 @@ public sealed partial class SttUsage [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public SttUsage( - global::Inworld.Realtime.SttUsageResult? result) + global::Inworld.Realtime.SttUsageResult result) { - this.Result = result; + this.Result = result ?? throw new global::System.ArgumentNullException(nameof(result)); } /// diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttVoiceProfileConfig.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttVoiceProfileConfig.g.cs index 0f2b613..7acbbc2 100644 --- a/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttVoiceProfileConfig.g.cs +++ b/src/libs/Inworld/Generated/Inworld.Realtime.Models.SttVoiceProfileConfig.g.cs @@ -12,7 +12,8 @@ public sealed partial class SttVoiceProfileConfig /// /// [global::System.Text.Json.Serialization.JsonPropertyName("enableVoiceProfile")] - public bool? EnableVoiceProfile { get; set; } + [global::System.Text.Json.Serialization.JsonRequired] + public required bool EnableVoiceProfile { get; set; } /// /// @@ -35,7 +36,7 @@ public sealed partial class SttVoiceProfileConfig [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public SttVoiceProfileConfig( - bool? enableVoiceProfile, + bool enableVoiceProfile, int? topN) { this.EnableVoiceProfile = enableVoiceProfile; diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsAudioChunk.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsAudioChunk.g.cs index 6644105..15f1416 100644 --- a/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsAudioChunk.g.cs +++ b/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsAudioChunk.g.cs @@ -9,10 +9,12 @@ namespace Inworld.Realtime public sealed partial class TtsAudioChunk { /// - /// | + /// Server-side result envelope. Exactly one of `contextCreated`,
+ /// `audioChunk`, `flushCompleted`, or `contextClosed` is populated. ///
[global::System.Text.Json.Serialization.JsonPropertyName("result")] - public global::Inworld.Realtime.TtsResultEnvelope? Result { get; set; } + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Inworld.Realtime.TtsResultEnvelope Result { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -24,15 +26,16 @@ public sealed partial class TtsAudioChunk /// Initializes a new instance of the class. /// /// - /// | + /// Server-side result envelope. Exactly one of `contextCreated`,
+ /// `audioChunk`, `flushCompleted`, or `contextClosed` is populated. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public TtsAudioChunk( - global::Inworld.Realtime.TtsResultEnvelope? result) + global::Inworld.Realtime.TtsResultEnvelope result) { - this.Result = result; + this.Result = result ?? throw new global::System.ArgumentNullException(nameof(result)); } /// diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsCloseContext.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsCloseContext.g.cs index 9866d0d..b9e73f5 100644 --- a/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsCloseContext.g.cs +++ b/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsCloseContext.g.cs @@ -12,7 +12,8 @@ public sealed partial class TtsCloseContext /// /// [global::System.Text.Json.Serialization.JsonPropertyName("close_context")] - public object? CloseContext { get; set; } + [global::System.Text.Json.Serialization.JsonRequired] + public required object CloseContext { get; set; } /// /// @@ -35,10 +36,10 @@ public sealed partial class TtsCloseContext [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public TtsCloseContext( - object? closeContext, + object closeContext, string? contextId) { - this.CloseContext = closeContext; + this.CloseContext = closeContext ?? throw new global::System.ArgumentNullException(nameof(closeContext)); this.ContextId = contextId; } diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsContextClosed.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsContextClosed.g.cs index d25e5a9..c92cfd0 100644 --- a/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsContextClosed.g.cs +++ b/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsContextClosed.g.cs @@ -9,10 +9,12 @@ namespace Inworld.Realtime public sealed partial class TtsContextClosed { /// - /// | + /// Server-side result envelope. Exactly one of `contextCreated`,
+ /// `audioChunk`, `flushCompleted`, or `contextClosed` is populated. ///
[global::System.Text.Json.Serialization.JsonPropertyName("result")] - public global::Inworld.Realtime.TtsResultEnvelope? Result { get; set; } + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Inworld.Realtime.TtsResultEnvelope Result { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -24,15 +26,16 @@ public sealed partial class TtsContextClosed /// Initializes a new instance of the class. /// /// - /// | + /// Server-side result envelope. Exactly one of `contextCreated`,
+ /// `audioChunk`, `flushCompleted`, or `contextClosed` is populated. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public TtsContextClosed( - global::Inworld.Realtime.TtsResultEnvelope? result) + global::Inworld.Realtime.TtsResultEnvelope result) { - this.Result = result; + this.Result = result ?? throw new global::System.ArgumentNullException(nameof(result)); } /// diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsContextCreated.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsContextCreated.g.cs index 06bccf9..814ea13 100644 --- a/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsContextCreated.g.cs +++ b/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsContextCreated.g.cs @@ -9,10 +9,12 @@ namespace Inworld.Realtime public sealed partial class TtsContextCreated { /// - /// | + /// Server-side result envelope. Exactly one of `contextCreated`,
+ /// `audioChunk`, `flushCompleted`, or `contextClosed` is populated. ///
[global::System.Text.Json.Serialization.JsonPropertyName("result")] - public global::Inworld.Realtime.TtsResultEnvelope? Result { get; set; } + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Inworld.Realtime.TtsResultEnvelope Result { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -24,15 +26,16 @@ public sealed partial class TtsContextCreated /// Initializes a new instance of the class. /// /// - /// | + /// Server-side result envelope. Exactly one of `contextCreated`,
+ /// `audioChunk`, `flushCompleted`, or `contextClosed` is populated. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public TtsContextCreated( - global::Inworld.Realtime.TtsResultEnvelope? result) + global::Inworld.Realtime.TtsResultEnvelope result) { - this.Result = result; + this.Result = result ?? throw new global::System.ArgumentNullException(nameof(result)); } /// diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsCreateContext.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsCreateContext.g.cs index 15a2be5..a0e423d 100644 --- a/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsCreateContext.g.cs +++ b/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsCreateContext.g.cs @@ -12,7 +12,8 @@ public sealed partial class TtsCreateContext /// /// [global::System.Text.Json.Serialization.JsonPropertyName("create")] - public global::Inworld.Realtime.TtsCreateContextParams? Create { get; set; } + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Inworld.Realtime.TtsCreateContextParams Create { get; set; } /// /// Optional stable context id; server generates one when omitted. @@ -37,10 +38,10 @@ public sealed partial class TtsCreateContext [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public TtsCreateContext( - global::Inworld.Realtime.TtsCreateContextParams? create, + global::Inworld.Realtime.TtsCreateContextParams create, string? contextId) { - this.Create = create; + this.Create = create ?? throw new global::System.ArgumentNullException(nameof(create)); this.ContextId = contextId; } diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsCreateContextParams.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsCreateContextParams.g.cs index e1d9d76..46227fd 100644 --- a/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsCreateContextParams.g.cs +++ b/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsCreateContextParams.g.cs @@ -12,13 +12,15 @@ public sealed partial class TtsCreateContextParams /// /// [global::System.Text.Json.Serialization.JsonPropertyName("voiceId")] - public string? VoiceId { get; set; } + [global::System.Text.Json.Serialization.JsonRequired] + public required string VoiceId { get; set; } /// /// Model identifier, including `inworld-tts-2` for the latest research preview. /// [global::System.Text.Json.Serialization.JsonPropertyName("modelId")] - public string? ModelId { get; set; } + [global::System.Text.Json.Serialization.JsonRequired] + public required string ModelId { get; set; } /// /// Audio output configuration for streaming TTS. @@ -36,7 +38,8 @@ public sealed partial class TtsCreateContextParams /// /// [global::System.Text.Json.Serialization.JsonPropertyName("timestampType")] - public string? TimestampType { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Inworld.Realtime.JsonConverters.StreamTimestampTypeJsonConverter))] + public global::Inworld.Realtime.StreamTimestampType? TimestampType { get; set; } /// /// @@ -54,13 +57,15 @@ public sealed partial class TtsCreateContextParams /// /// [global::System.Text.Json.Serialization.JsonPropertyName("applyTextNormalization")] - public string? ApplyTextNormalization { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Inworld.Realtime.JsonConverters.StreamApplyTextNormalizationJsonConverter))] + public global::Inworld.Realtime.StreamApplyTextNormalization? ApplyTextNormalization { get; set; } /// /// Variation and expressiveness mode for Realtime TTS-2. /// [global::System.Text.Json.Serialization.JsonPropertyName("deliveryMode")] - public string? DeliveryMode { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Inworld.Realtime.JsonConverters.StreamDeliveryModeJsonConverter))] + public global::Inworld.Realtime.StreamDeliveryMode? DeliveryMode { get; set; } /// /// @@ -72,7 +77,8 @@ public sealed partial class TtsCreateContextParams /// /// [global::System.Text.Json.Serialization.JsonPropertyName("timestampTransportStrategy")] - public string? TimestampTransportStrategy { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Inworld.Realtime.JsonConverters.StreamTimestampTransportStrategyJsonConverter))] + public global::Inworld.Realtime.StreamTimestampTransportStrategy? TimestampTransportStrategy { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -104,20 +110,20 @@ public sealed partial class TtsCreateContextParams [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public TtsCreateContextParams( - string? voiceId, - string? modelId, + string voiceId, + string modelId, global::Inworld.Realtime.StreamAudioConfig? audioConfig, double? temperature, - string? timestampType, + global::Inworld.Realtime.StreamTimestampType? timestampType, int? maxBufferDelayMs, int? bufferCharThreshold, - string? applyTextNormalization, - string? deliveryMode, + global::Inworld.Realtime.StreamApplyTextNormalization? applyTextNormalization, + global::Inworld.Realtime.StreamDeliveryMode? deliveryMode, bool? autoMode, - string? timestampTransportStrategy) + global::Inworld.Realtime.StreamTimestampTransportStrategy? timestampTransportStrategy) { - this.VoiceId = voiceId; - this.ModelId = modelId; + this.VoiceId = voiceId ?? throw new global::System.ArgumentNullException(nameof(voiceId)); + this.ModelId = modelId ?? throw new global::System.ArgumentNullException(nameof(modelId)); this.AudioConfig = audioConfig; this.Temperature = temperature; this.TimestampType = timestampType; diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsFlushCompleted.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsFlushCompleted.g.cs index dce6855..155eda5 100644 --- a/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsFlushCompleted.g.cs +++ b/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsFlushCompleted.g.cs @@ -9,10 +9,12 @@ namespace Inworld.Realtime public sealed partial class TtsFlushCompleted { /// - /// | + /// Server-side result envelope. Exactly one of `contextCreated`,
+ /// `audioChunk`, `flushCompleted`, or `contextClosed` is populated. ///
[global::System.Text.Json.Serialization.JsonPropertyName("result")] - public global::Inworld.Realtime.TtsResultEnvelope? Result { get; set; } + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Inworld.Realtime.TtsResultEnvelope Result { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -24,15 +26,16 @@ public sealed partial class TtsFlushCompleted /// Initializes a new instance of the class. /// /// - /// | + /// Server-side result envelope. Exactly one of `contextCreated`,
+ /// `audioChunk`, `flushCompleted`, or `contextClosed` is populated. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public TtsFlushCompleted( - global::Inworld.Realtime.TtsResultEnvelope? result) + global::Inworld.Realtime.TtsResultEnvelope result) { - this.Result = result; + this.Result = result ?? throw new global::System.ArgumentNullException(nameof(result)); } /// diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsFlushContext.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsFlushContext.g.cs index 55f991e..b7591a2 100644 --- a/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsFlushContext.g.cs +++ b/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsFlushContext.g.cs @@ -12,7 +12,8 @@ public sealed partial class TtsFlushContext /// /// [global::System.Text.Json.Serialization.JsonPropertyName("flush_context")] - public object? FlushContext { get; set; } + [global::System.Text.Json.Serialization.JsonRequired] + public required object FlushContext { get; set; } /// /// @@ -35,10 +36,10 @@ public sealed partial class TtsFlushContext [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public TtsFlushContext( - object? flushContext, + object flushContext, string? contextId) { - this.FlushContext = flushContext; + this.FlushContext = flushContext ?? throw new global::System.ArgumentNullException(nameof(flushContext)); this.ContextId = contextId; } diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsResultEnvelope.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsResultEnvelope.g.cs index 240b09e..b89e2d1 100644 --- a/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsResultEnvelope.g.cs +++ b/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsResultEnvelope.g.cs @@ -4,7 +4,8 @@ namespace Inworld.Realtime { /// - /// | + /// Server-side result envelope. Exactly one of `contextCreated`,
+ /// `audioChunk`, `flushCompleted`, or `contextClosed` is populated. ///
public sealed partial class TtsResultEnvelope { diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsSendText.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsSendText.g.cs index d99f857..571107f 100644 --- a/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsSendText.g.cs +++ b/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsSendText.g.cs @@ -12,7 +12,8 @@ public sealed partial class TtsSendText /// ///
[global::System.Text.Json.Serialization.JsonPropertyName("send_text")] - public global::Inworld.Realtime.TtsSendTextParams? SendText { get; set; } + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Inworld.Realtime.TtsSendTextParams SendText { get; set; } /// /// @@ -35,10 +36,10 @@ public sealed partial class TtsSendText [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public TtsSendText( - global::Inworld.Realtime.TtsSendTextParams? sendText, + global::Inworld.Realtime.TtsSendTextParams sendText, string? contextId) { - this.SendText = sendText; + this.SendText = sendText ?? throw new global::System.ArgumentNullException(nameof(sendText)); this.ContextId = contextId; } diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsSendTextParams.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsSendTextParams.g.cs index 79524c0..14969d0 100644 --- a/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsSendTextParams.g.cs +++ b/src/libs/Inworld/Generated/Inworld.Realtime.Models.TtsSendTextParams.g.cs @@ -12,7 +12,8 @@ public sealed partial class TtsSendTextParams /// Text to synthesize. Maximum 1000 characters per chunk. /// [global::System.Text.Json.Serialization.JsonPropertyName("text")] - public string? Text { get; set; } + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } /// /// Optional empty object; if set, triggers flush after text is enqueued. @@ -39,10 +40,10 @@ public sealed partial class TtsSendTextParams [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public TtsSendTextParams( - string? text, + string text, object? flushContext) { - this.Text = text; + this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); this.FlushContext = flushContext; }