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
Expand Up @@ -98,14 +98,29 @@ public partial interface IProjectsClient
/// A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"Vmd4Zor6fplcA7WrINey\",\"version_id\":\"hRPaxjlTdR7wFMhV4w0b\"}"' --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"JzWtcGQMJ6bnlWwyMo7e\",\"version_id\":\"lbmwxiLu4q6txYxgdZqn\"}"'. Note that multiple dictionaries are not currently supported by our UI which will only show the first.
/// </param>
/// <param name="callbackUrl">
/// [Deprecated] A url that will be called by our service when the project is converted with a json containing the status of the conversion
/// A url that will be called by our service when the project is converted with a json containing the status of the conversion
/// </param>
/// <param name="fiction">
/// An optional fiction of the project.
/// </param>
/// <param name="qualityCheckOn">
/// Whether to run quality check on the generated audio and regenerate if needed. Applies to individual block conversion.
/// </param>
/// <param name="applyTextNormalization">
/// This parameter controls text normalization with four modes: 'auto', 'on', 'apply_english' and 'off'.<br/>
/// When set to 'auto', the system will automatically decide whether to apply text normalization <br/>
/// (e.g., spelling out numbers). With 'on', text normalization will always be applied, while <br/>
/// with 'off', it will be skipped. 'apply_english' is the same as 'on' but will assume that text is in English.<br/>
///
/// </param>
/// <param name="autoConvert">
/// Whether to auto convert the project to audio or not.<br/>
/// Default Value: false
/// </param>
/// <param name="autoAssignVoices">
/// [Alpha Feature] Whether automatically assign voices to phrases in the create Project.<br/>
/// Default Value: false
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<global::ElevenLabs.AddProjectResponseModel> CreateProjectsAddAsync(
Expand Down Expand Up @@ -134,6 +149,9 @@ public partial interface IProjectsClient
string? callbackUrl = default,
global::ElevenLabs.BodyAddProjectV1ProjectsAddPostFiction? fiction = default,
bool? qualityCheckOn = default,
global::ElevenLabs.BodyAddProjectV1ProjectsAddPostApplyTextNormalization? applyTextNormalization = default,
bool? autoConvert = default,
bool? autoAssignVoices = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ public sealed partial class AgentSummaryResponseModel
[global::System.Text.Json.Serialization.JsonRequired]
public required int CreatedAtUnixSecs { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("access_level")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::ElevenLabs.JsonConverters.AgentSummaryResponseModelAccessLevelJsonConverter))]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::ElevenLabs.AgentSummaryResponseModelAccessLevel AccessLevel { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
Expand All @@ -41,15 +49,18 @@ public sealed partial class AgentSummaryResponseModel
/// <param name="agentId"></param>
/// <param name="name"></param>
/// <param name="createdAtUnixSecs"></param>
/// <param name="accessLevel"></param>
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
public AgentSummaryResponseModel(
string agentId,
string name,
int createdAtUnixSecs)
int createdAtUnixSecs,
global::ElevenLabs.AgentSummaryResponseModelAccessLevel accessLevel)
{
this.AgentId = agentId ?? throw new global::System.ArgumentNullException(nameof(agentId));
this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name));
this.CreatedAtUnixSecs = createdAtUnixSecs;
this.AccessLevel = accessLevel;
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@

#nullable enable

namespace ElevenLabs
{
/// <summary>
///
/// </summary>
public enum AgentSummaryResponseModelAccessLevel
{
/// <summary>
///
/// </summary>
Admin,
/// <summary>
///
/// </summary>
Editor,
/// <summary>
///
/// </summary>
Viewer,
}

/// <summary>
/// Enum extensions to do fast conversions without the reflection.
/// </summary>
public static class AgentSummaryResponseModelAccessLevelExtensions
{
/// <summary>
/// Converts an enum to a string.
/// </summary>
public static string ToValueString(this AgentSummaryResponseModelAccessLevel value)
{
return value switch
{
AgentSummaryResponseModelAccessLevel.Admin => "admin",
AgentSummaryResponseModelAccessLevel.Editor => "editor",
AgentSummaryResponseModelAccessLevel.Viewer => "viewer",
_ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null),
};
}
/// <summary>
/// Converts an string to a enum.
/// </summary>
public static AgentSummaryResponseModelAccessLevel? ToEnum(string value)
{
return value switch
{
"admin" => AgentSummaryResponseModelAccessLevel.Admin,
"editor" => AgentSummaryResponseModelAccessLevel.Editor,
"viewer" => AgentSummaryResponseModelAccessLevel.Viewer,
_ => null,
};
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public sealed partial class BodyAddProjectV1ProjectsAddPost
public global::System.Collections.Generic.IList<string>? PronunciationDictionaryLocators { get; set; }

/// <summary>
/// [Deprecated] A url that will be called by our service when the project is converted with a json containing the status of the conversion
/// A url that will be called by our service when the project is converted with a json containing the status of the conversion
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("callback_url")]
public string? CallbackUrl { get; set; }
Expand All @@ -166,6 +166,31 @@ public sealed partial class BodyAddProjectV1ProjectsAddPost
[global::System.Text.Json.Serialization.JsonPropertyName("quality_check_on")]
public bool? QualityCheckOn { get; set; }

/// <summary>
/// This parameter controls text normalization with four modes: 'auto', 'on', 'apply_english' and 'off'.<br/>
/// When set to 'auto', the system will automatically decide whether to apply text normalization <br/>
/// (e.g., spelling out numbers). With 'on', text normalization will always be applied, while <br/>
/// with 'off', it will be skipped. 'apply_english' is the same as 'on' but will assume that text is in English.<br/>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("apply_text_normalization")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::ElevenLabs.JsonConverters.BodyAddProjectV1ProjectsAddPostApplyTextNormalizationJsonConverter))]
public global::ElevenLabs.BodyAddProjectV1ProjectsAddPostApplyTextNormalization? ApplyTextNormalization { get; set; }

/// <summary>
/// Whether to auto convert the project to audio or not.<br/>
/// Default Value: false
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("auto_convert")]
public bool? AutoConvert { get; set; }

/// <summary>
/// [Alpha Feature] Whether automatically assign voices to phrases in the create Project.<br/>
/// Default Value: false
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("auto_assign_voices")]
public bool? AutoAssignVoices { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
Expand Down Expand Up @@ -247,14 +272,29 @@ public sealed partial class BodyAddProjectV1ProjectsAddPost
/// A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"Vmd4Zor6fplcA7WrINey\",\"version_id\":\"hRPaxjlTdR7wFMhV4w0b\"}"' --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"JzWtcGQMJ6bnlWwyMo7e\",\"version_id\":\"lbmwxiLu4q6txYxgdZqn\"}"'. Note that multiple dictionaries are not currently supported by our UI which will only show the first.
/// </param>
/// <param name="callbackUrl">
/// [Deprecated] A url that will be called by our service when the project is converted with a json containing the status of the conversion
/// A url that will be called by our service when the project is converted with a json containing the status of the conversion
/// </param>
/// <param name="fiction">
/// An optional fiction of the project.
/// </param>
/// <param name="qualityCheckOn">
/// Whether to run quality check on the generated audio and regenerate if needed. Applies to individual block conversion.
/// </param>
/// <param name="applyTextNormalization">
/// This parameter controls text normalization with four modes: 'auto', 'on', 'apply_english' and 'off'.<br/>
/// When set to 'auto', the system will automatically decide whether to apply text normalization <br/>
/// (e.g., spelling out numbers). With 'on', text normalization will always be applied, while <br/>
/// with 'off', it will be skipped. 'apply_english' is the same as 'on' but will assume that text is in English.<br/>
///
/// </param>
/// <param name="autoConvert">
/// Whether to auto convert the project to audio or not.<br/>
/// Default Value: false
/// </param>
/// <param name="autoAssignVoices">
/// [Alpha Feature] Whether automatically assign voices to phrases in the create Project.<br/>
/// Default Value: false
/// </param>
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
public BodyAddProjectV1ProjectsAddPost(
string name,
Expand All @@ -280,7 +320,10 @@ public BodyAddProjectV1ProjectsAddPost(
global::System.Collections.Generic.IList<string>? pronunciationDictionaryLocators,
string? callbackUrl,
global::ElevenLabs.BodyAddProjectV1ProjectsAddPostFiction? fiction,
bool? qualityCheckOn)
bool? qualityCheckOn,
global::ElevenLabs.BodyAddProjectV1ProjectsAddPostApplyTextNormalization? applyTextNormalization,
bool? autoConvert,
bool? autoAssignVoices)
{
this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name));
this.DefaultTitleVoiceId = defaultTitleVoiceId ?? throw new global::System.ArgumentNullException(nameof(defaultTitleVoiceId));
Expand All @@ -306,6 +349,9 @@ public BodyAddProjectV1ProjectsAddPost(
this.CallbackUrl = callbackUrl;
this.Fiction = fiction;
this.QualityCheckOn = qualityCheckOn;
this.ApplyTextNormalization = applyTextNormalization;
this.AutoConvert = autoConvert;
this.AutoAssignVoices = autoAssignVoices;
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@

#nullable enable

namespace ElevenLabs
{
/// <summary>
/// This parameter controls text normalization with four modes: 'auto', 'on', 'apply_english' and 'off'.<br/>
/// When set to 'auto', the system will automatically decide whether to apply text normalization <br/>
/// (e.g., spelling out numbers). With 'on', text normalization will always be applied, while <br/>
/// with 'off', it will be skipped. 'apply_english' is the same as 'on' but will assume that text is in English.<br/>
///
/// </summary>
public enum BodyAddProjectV1ProjectsAddPostApplyTextNormalization
{
/// <summary>
/// 'auto', 'on', 'apply_english' and 'off'.
/// </summary>
Auto,
/// <summary>
/// 'auto', 'on', 'apply_english' and 'off'.
/// </summary>
On,
/// <summary>
/// 'auto', 'on', 'apply_english' and 'off'.
/// </summary>
Off,
/// <summary>
/// 'auto', 'on', 'apply_english' and 'off'.
/// </summary>
ApplyEnglish,
}

/// <summary>
/// Enum extensions to do fast conversions without the reflection.
/// </summary>
public static class BodyAddProjectV1ProjectsAddPostApplyTextNormalizationExtensions
{
/// <summary>
/// Converts an enum to a string.
/// </summary>
public static string ToValueString(this BodyAddProjectV1ProjectsAddPostApplyTextNormalization value)
{
return value switch
{
BodyAddProjectV1ProjectsAddPostApplyTextNormalization.Auto => "auto",
BodyAddProjectV1ProjectsAddPostApplyTextNormalization.On => "on",
BodyAddProjectV1ProjectsAddPostApplyTextNormalization.Off => "off",
BodyAddProjectV1ProjectsAddPostApplyTextNormalization.ApplyEnglish => "apply_english",
_ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null),
};
}
/// <summary>
/// Converts an string to a enum.
/// </summary>
public static BodyAddProjectV1ProjectsAddPostApplyTextNormalization? ToEnum(string value)
{
return value switch
{
"auto" => BodyAddProjectV1ProjectsAddPostApplyTextNormalization.Auto,
"on" => BodyAddProjectV1ProjectsAddPostApplyTextNormalization.On,
"off" => BodyAddProjectV1ProjectsAddPostApplyTextNormalization.Off,
"apply_english" => BodyAddProjectV1ProjectsAddPostApplyTextNormalization.ApplyEnglish,
_ => null,
};
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ public enum BreakdownTypes
/// <summary>
///
/// </summary>
VoiceMultiplier,
/// <summary>
///
/// </summary>
User,
/// <summary>
///
Expand Down Expand Up @@ -56,6 +60,7 @@ public static string ToValueString(this BreakdownTypes value)
{
BreakdownTypes.None => "none",
BreakdownTypes.Voice => "voice",
BreakdownTypes.VoiceMultiplier => "voice_multiplier",
BreakdownTypes.User => "user",
BreakdownTypes.ApiKeys => "api_keys",
BreakdownTypes.AllApiKeys => "all_api_keys",
Expand All @@ -74,6 +79,7 @@ public static string ToValueString(this BreakdownTypes value)
{
"none" => BreakdownTypes.None,
"voice" => BreakdownTypes.Voice,
"voice_multiplier" => BreakdownTypes.VoiceMultiplier,
"user" => BreakdownTypes.User,
"api_keys" => BreakdownTypes.ApiKeys,
"all_api_keys" => BreakdownTypes.AllApiKeys,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ public sealed partial class ModerationStatusResponseModel
[global::System.Text.Json.Serialization.JsonRequired]
public required global::ElevenLabs.ModerationStatusResponseModelWarningStatus WarningStatus { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("on_watchlist")]
[global::System.Text.Json.Serialization.JsonRequired]
public required bool OnWatchlist { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
Expand All @@ -83,6 +90,7 @@ public sealed partial class ModerationStatusResponseModel
/// <param name="enterpriseBackgroundModerationEnabled"></param>
/// <param name="safetyStatus"></param>
/// <param name="warningStatus"></param>
/// <param name="onWatchlist"></param>
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
public ModerationStatusResponseModel(
bool isInProbation,
Expand All @@ -92,7 +100,8 @@ public ModerationStatusResponseModel(
int nogoVoiceSimilarVoiceUploadCount,
bool enterpriseBackgroundModerationEnabled,
global::ElevenLabs.ModerationStatusResponseModelSafetyStatus safetyStatus,
global::ElevenLabs.ModerationStatusResponseModelWarningStatus warningStatus)
global::ElevenLabs.ModerationStatusResponseModelWarningStatus warningStatus,
bool onWatchlist)
{
this.IsInProbation = isInProbation;
this.EnterpriseCheckNogoVoice = enterpriseCheckNogoVoice;
Expand All @@ -102,6 +111,7 @@ public ModerationStatusResponseModel(
this.EnterpriseBackgroundModerationEnabled = enterpriseBackgroundModerationEnabled;
this.SafetyStatus = safetyStatus;
this.WarningStatus = warningStatus;
this.OnWatchlist = onWatchlist;
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ public enum ModerationStatusResponseModelSafetyStatus
///
/// </summary>
AppealDenied,
/// <summary>
///
/// </summary>
FalsePositive,
}

/// <summary>
Expand All @@ -32,6 +36,7 @@ public static string ToValueString(this ModerationStatusResponseModelSafetyStatu
{
ModerationStatusResponseModelSafetyStatus.AppealApproved => "appeal_approved",
ModerationStatusResponseModelSafetyStatus.AppealDenied => "appeal_denied",
ModerationStatusResponseModelSafetyStatus.FalsePositive => "false_positive",
_ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null),
};
}
Expand All @@ -44,6 +49,7 @@ public static string ToValueString(this ModerationStatusResponseModelSafetyStatu
{
"appeal_approved" => ModerationStatusResponseModelSafetyStatus.AppealApproved,
"appeal_denied" => ModerationStatusResponseModelSafetyStatus.AppealDenied,
"false_positive" => ModerationStatusResponseModelSafetyStatus.FalsePositive,
_ => null,
};
}
Expand Down
Loading