Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace Ultravox.JsonConverters
{
/// <inheritdoc />
public sealed class UltravoxV1InworldVoiceDeliveryModeJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Ultravox.UltravoxV1InworldVoiceDeliveryMode>
{
/// <inheritdoc />
public override global::Ultravox.UltravoxV1InworldVoiceDeliveryMode 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::Ultravox.UltravoxV1InworldVoiceDeliveryModeExtensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::Ultravox.UltravoxV1InworldVoiceDeliveryMode)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::Ultravox.UltravoxV1InworldVoiceDeliveryMode);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::Ultravox.UltravoxV1InworldVoiceDeliveryMode value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::Ultravox.UltravoxV1InworldVoiceDeliveryModeExtensions.ToValueString(value));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#nullable enable

namespace Ultravox.JsonConverters
{
/// <inheritdoc />
public sealed class UltravoxV1InworldVoiceDeliveryModeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Ultravox.UltravoxV1InworldVoiceDeliveryMode?>
{
/// <inheritdoc />
public override global::Ultravox.UltravoxV1InworldVoiceDeliveryMode? 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::Ultravox.UltravoxV1InworldVoiceDeliveryModeExtensions.ToEnum(stringValue);
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::Ultravox.UltravoxV1InworldVoiceDeliveryMode)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::Ultravox.UltravoxV1InworldVoiceDeliveryMode?);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::Ultravox.UltravoxV1InworldVoiceDeliveryMode? 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::Ultravox.UltravoxV1InworldVoiceDeliveryModeExtensions.ToValueString(value.Value));
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ namespace Ultravox

typeof(global::Ultravox.JsonConverters.UltravoxV1GenericVoiceJsonByteEncodingNullableJsonConverter),

typeof(global::Ultravox.JsonConverters.UltravoxV1InworldVoiceDeliveryModeJsonConverter),

typeof(global::Ultravox.JsonConverters.UltravoxV1InworldVoiceDeliveryModeNullableJsonConverter),

typeof(global::Ultravox.JsonConverters.UltravoxV1SourceStatsStatusJsonConverter),

typeof(global::Ultravox.JsonConverters.UltravoxV1SourceStatsStatusNullableJsonConverter),
Expand Down Expand Up @@ -439,6 +443,7 @@ namespace Ultravox
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ultravox.UltravoxV1GenericVoiceJsonByteEncoding), TypeInfoPropertyName = "UltravoxV1GenericVoiceJsonByteEncoding2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ultravox.UltravoxV1HeaderApiKeyRequirement))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ultravox.UltravoxV1HttpAuthRequirement))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ultravox.UltravoxV1InworldVoiceDeliveryMode), TypeInfoPropertyName = "UltravoxV1InworldVoiceDeliveryMode2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ultravox.UltravoxV1MimeTypeSet))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ultravox.UltravoxV1QueryApiKeyRequirement))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ultravox.UltravoxV1QueryCorpusRequest))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -936,167 +936,171 @@ public sealed partial class JsonSerializerContextTypes
/// <summary>
///
/// </summary>
public global::Ultravox.UltravoxV1MimeTypeSet? Type227 { get; set; }
public global::Ultravox.UltravoxV1InworldVoiceDeliveryMode? Type227 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.UltravoxV1QueryApiKeyRequirement? Type228 { get; set; }
public global::Ultravox.UltravoxV1MimeTypeSet? Type228 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.UltravoxV1QueryCorpusRequest? Type229 { get; set; }
public global::Ultravox.UltravoxV1QueryApiKeyRequirement? Type229 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.UltravoxV1SecurityOptions? Type230 { get; set; }
public global::Ultravox.UltravoxV1QueryCorpusRequest? Type230 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::Ultravox.UltravoxV1SecurityRequirements>? Type231 { get; set; }
public global::Ultravox.UltravoxV1SecurityOptions? Type231 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.UltravoxV1SecurityRequirements? Type232 { get; set; }
public global::System.Collections.Generic.IList<global::Ultravox.UltravoxV1SecurityRequirements>? Type232 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.UltravoxV1SecurityRequirement? Type233 { get; set; }
public global::Ultravox.UltravoxV1SecurityRequirements? Type233 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.Dictionary<string, global::Ultravox.UltravoxV1SecurityRequirement>? Type234 { get; set; }
public global::Ultravox.UltravoxV1SecurityRequirement? Type234 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.UltravoxV1UltravoxCallTokenRequirement? Type235 { get; set; }
public global::System.Collections.Generic.Dictionary<string, global::Ultravox.UltravoxV1SecurityRequirement>? Type235 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.UltravoxV1SipFallbackHandlerResponse? Type236 { get; set; }
public global::Ultravox.UltravoxV1UltravoxCallTokenRequirement? Type236 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.UltravoxV1StartAgentCallRequest? Type237 { get; set; }
public global::Ultravox.UltravoxV1SipFallbackHandlerResponse? Type237 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.UltravoxV1StartCallRequest? Type238 { get; set; }
public global::Ultravox.UltravoxV1StartAgentCallRequest? Type238 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.UltravoxV1SipRejection? Type239 { get; set; }
public global::Ultravox.UltravoxV1StartCallRequest? Type239 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.UltravoxV1SourceStatsStatus? Type240 { get; set; }
public global::Ultravox.UltravoxV1SipRejection? Type240 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.UltravoxV1StartAgentCallRequestInitialOutputMedium? Type241 { get; set; }
public global::Ultravox.UltravoxV1SourceStatsStatus? Type241 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.UltravoxV1ToolOverrides? Type242 { get; set; }
public global::Ultravox.UltravoxV1StartAgentCallRequestInitialOutputMedium? Type242 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.UltravoxV1StartAgentCallRequestRetentionPolicy? Type243 { get; set; }
public global::Ultravox.UltravoxV1ToolOverrides? Type243 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.UltravoxV1StartCallRequestFirstSpeaker? Type244 { get; set; }
public global::Ultravox.UltravoxV1StartAgentCallRequestRetentionPolicy? Type244 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.UltravoxV1StartCallRequestInitialOutputMedium? Type245 { get; set; }
public global::Ultravox.UltravoxV1StartCallRequestFirstSpeaker? Type245 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.UltravoxV1StartCallRequestRetentionPolicy? Type246 { get; set; }
public global::Ultravox.UltravoxV1StartCallRequestInitialOutputMedium? Type246 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.UltravoxV1StaticParameterLocation? Type247 { get; set; }
public global::Ultravox.UltravoxV1StartCallRequestRetentionPolicy? Type247 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.UltravoxV1TimedMessageEndBehavior? Type248 { get; set; }
public global::Ultravox.UltravoxV1StaticParameterLocation? Type248 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.ToolsCreateRequest? Type249 { get; set; }
public global::Ultravox.UltravoxV1TimedMessageEndBehavior? Type249 { get; set; }
/// <summary>
///
/// </summary>
public byte[]? Type250 { get; set; }
public global::Ultravox.ToolsCreateRequest? Type250 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.VoicesCreateRequest? Type251 { get; set; }
public byte[]? Type251 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.AccountsMeUsageConcurrencyRetrieveBucket? Type252 { get; set; }
public global::Ultravox.VoicesCreateRequest? Type252 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.AgentsScheduledBatchesScheduledCallsListStatus? Type253 { get; set; }
public global::Ultravox.AccountsMeUsageConcurrencyRetrieveBucket? Type253 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.CallsEventsListMinimumSeverity? Type254 { get; set; }
public global::Ultravox.AgentsScheduledBatchesScheduledCallsListStatus? Type254 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.CallsMessagesListMode? Type255 { get; set; }
public global::Ultravox.CallsEventsListMinimumSeverity? Type255 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.SchemaRetrieveFormat? Type256 { get; set; }
public global::Ultravox.CallsMessagesListMode? Type256 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.SchemaRetrieveLang? Type257 { get; set; }
public global::Ultravox.SchemaRetrieveFormat? Type257 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.ToolsListOwnership? Type258 { get; set; }
public global::Ultravox.SchemaRetrieveLang? Type258 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.ToolsListSortOrder? Type259 { get; set; }
public global::Ultravox.ToolsListOwnership? Type259 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.VoicesListBillingStyle? Type260 { get; set; }
public global::Ultravox.ToolsListSortOrder? Type260 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.VoicesListOwnership? Type261 { get; set; }
public global::Ultravox.VoicesListBillingStyle? Type261 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::Ultravox.VoicesListProviderItem>? Type262 { get; set; }
public global::Ultravox.VoicesListOwnership? Type262 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.VoicesListProviderItem? Type263 { get; set; }
public global::System.Collections.Generic.IList<global::Ultravox.VoicesListProviderItem>? Type263 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::Ultravox.Account>? Type264 { get; set; }
public global::Ultravox.VoicesListProviderItem? Type264 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::Ultravox.AgentUsage>? Type265 { get; set; }
public global::System.Collections.Generic.IList<global::Ultravox.Account>? Type265 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::Ultravox.CallTool>? Type266 { get; set; }
public global::System.Collections.Generic.IList<global::Ultravox.AgentUsage>? Type266 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::Ultravox.UltravoxV1CorpusQueryResult>? Type267 { get; set; }
public global::System.Collections.Generic.IList<global::Ultravox.CallTool>? Type267 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::Ultravox.UltravoxV1CorpusQueryResult>? Type268 { get; set; }

/// <summary>
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ public sealed partial class UltravoxV1InworldVoice
[global::System.Text.Json.Serialization.JsonPropertyName("applyTextNormalization")]
public bool? ApplyTextNormalization { get; set; }

/// <summary>
/// How to balance consistency and expressiveness in generated speech. Only used by<br/>
/// inworld-tts-2 models (ignored for other models).<br/>
/// See https://docs.inworld.ai/api-reference/ttsAPI/texttospeech/synthesize-speech-stream#body-delivery-mode
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("deliveryMode")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::Ultravox.JsonConverters.UltravoxV1InworldVoiceDeliveryModeJsonConverter))]
public global::Ultravox.UltravoxV1InworldVoiceDeliveryMode? DeliveryMode { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
Expand Down Expand Up @@ -72,6 +81,11 @@ public sealed partial class UltravoxV1InworldVoice
/// agent is instructed to normalize text directly.<br/>
/// See https://docs.inworld.ai/api-reference/ttsAPI/texttospeech/synthesize-speech-stream#body-apply-text-normalization.
/// </param>
/// <param name="deliveryMode">
/// How to balance consistency and expressiveness in generated speech. Only used by<br/>
/// inworld-tts-2 models (ignored for other models).<br/>
/// See https://docs.inworld.ai/api-reference/ttsAPI/texttospeech/synthesize-speech-stream#body-delivery-mode
/// </param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
Expand All @@ -80,13 +94,15 @@ public UltravoxV1InworldVoice(
string? modelId,
float? speakingRate,
float? temperature,
bool? applyTextNormalization)
bool? applyTextNormalization,
global::Ultravox.UltravoxV1InworldVoiceDeliveryMode? deliveryMode)
{
this.VoiceId = voiceId;
this.ModelId = modelId;
this.SpeakingRate = speakingRate;
this.Temperature = temperature;
this.ApplyTextNormalization = applyTextNormalization;
this.DeliveryMode = deliveryMode;
}

/// <summary>
Expand Down
Loading