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 AssemblyAI.JsonConverters
{
/// <inheritdoc />
public sealed class TranscriptOptionalParamsDomainJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::AssemblyAI.TranscriptOptionalParamsDomain>
{
/// <inheritdoc />
public override global::AssemblyAI.TranscriptOptionalParamsDomain 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::AssemblyAI.TranscriptOptionalParamsDomainExtensions.ToEnum(stringValue) ?? default;
}

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

return default;
}

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

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

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

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

return default;
}

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

typeof(global::AssemblyAI.JsonConverters.SubtitleFormatNullableJsonConverter),

typeof(global::AssemblyAI.JsonConverters.TranscriptOptionalParamsDomainJsonConverter),

typeof(global::AssemblyAI.JsonConverters.TranscriptOptionalParamsDomainNullableJsonConverter),

typeof(global::AssemblyAI.JsonConverters.TranscriptOptionalParamsRedactPiiAudioOptionsOverrideAudioRedactionMethodJsonConverter),

typeof(global::AssemblyAI.JsonConverters.TranscriptOptionalParamsRedactPiiAudioOptionsOverrideAudioRedactionMethodNullableJsonConverter),
Expand Down Expand Up @@ -105,8 +109,6 @@ namespace AssemblyAI

typeof(global::AssemblyAI.JsonConverters.TranscriptParamsJsonConverter),

typeof(global::AssemblyAI.JsonConverters.OneOfJsonConverter<string, object>),

typeof(global::AssemblyAI.JsonConverters.OneOfJsonConverter<global::AssemblyAI.AnyOf<global::AssemblyAI.TranscriptLanguageCode?, string>?, object>),

typeof(global::AssemblyAI.JsonConverters.AnyOfJsonConverter<global::AssemblyAI.TranscriptLanguageCode?, string>),
Expand Down Expand Up @@ -159,12 +161,12 @@ namespace AssemblyAI
[global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList<global::AssemblyAI.TranscriptCustomSpelling>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::AssemblyAI.TranscriptCustomSpelling))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::AssemblyAI.OneOf<string, object>), TypeInfoPropertyName = "OneOfStringObject2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(object))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::AssemblyAI.TranscriptOptionalParamsDomain), TypeInfoPropertyName = "TranscriptOptionalParamsDomain2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList<string>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::AssemblyAI.OneOf<global::AssemblyAI.AnyOf<global::AssemblyAI.TranscriptLanguageCode?, string>?, object>), TypeInfoPropertyName = "OneOfAnyOfTranscriptLanguageCodeStringObject2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::AssemblyAI.AnyOf<global::AssemblyAI.TranscriptLanguageCode?, string>), TypeInfoPropertyName = "AnyOfTranscriptLanguageCodeString2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::AssemblyAI.TranscriptLanguageCode), TypeInfoPropertyName = "TranscriptLanguageCode2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(object))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList<global::AssemblyAI.TranscriptLanguageCode>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(float))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::AssemblyAI.TranscriptOptionalParamsLanguageDetectionOptions))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,27 +104,27 @@ public sealed partial class JsonSerializerContextTypes
/// <summary>
///
/// </summary>
public global::AssemblyAI.OneOf<string, object>? Type19 { get; set; }
public global::AssemblyAI.TranscriptOptionalParamsDomain? Type19 { get; set; }
/// <summary>
///
/// </summary>
public object? Type20 { get; set; }
public global::System.Collections.Generic.IList<string>? Type20 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<string>? Type21 { get; set; }
public global::AssemblyAI.OneOf<global::AssemblyAI.AnyOf<global::AssemblyAI.TranscriptLanguageCode?, string>?, object>? Type21 { get; set; }
/// <summary>
///
/// </summary>
public global::AssemblyAI.OneOf<global::AssemblyAI.AnyOf<global::AssemblyAI.TranscriptLanguageCode?, string>?, object>? Type22 { get; set; }
public global::AssemblyAI.AnyOf<global::AssemblyAI.TranscriptLanguageCode?, string>? Type22 { get; set; }
/// <summary>
///
/// </summary>
public global::AssemblyAI.AnyOf<global::AssemblyAI.TranscriptLanguageCode?, string>? Type23 { get; set; }
public global::AssemblyAI.TranscriptLanguageCode? Type23 { get; set; }
/// <summary>
///
/// </summary>
public global::AssemblyAI.TranscriptLanguageCode? Type24 { get; set; }
public object? Type24 { get; set; }
/// <summary>
///
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace AssemblyAI
/// <summary>
/// An array of results for the Content Moderation model, if it is enabled.<br/>
/// See [Content moderation](https://www.assemblyai.com/docs/content-moderation) for more information.<br/>
/// Example: {"status":"success","results":[{"text":"Smoke from hundreds of wildfires in Canada is triggering air quality alerts throughout the US. Skylines from Maine to Maryland to Minnesota are gray and smoggy. And in some places, the air quality warnings include the warning to stay inside. We wanted to better understand what\u0027s happening here and why, so we called Peter de Carlo, an associate professor in the Department of Environmental Health and Engineering at Johns Hopkins University Varsity. Good morning, professor. Good morning.","labels":[{"label":"disasters","confidence":0.8142836093902588,"severity":0.4093044400215149}],"sentences_idx_start":0,"sentences_idx_end":5,"timestamp":{"start":250,"end":28840}}],"summary":{"disasters":0.9940800441842205,"health_issues":0.9216489289040967},"severity_score_summary":{"disasters":{"low":0.5733263024656846,"medium":0.42667369753431533,"high":0},"health_issues":{"low":0.22863814977924785,"medium":0.45014154926938227,"high":0.32122030095136983}}}
/// Example: {"status":"success","results":[{"text":"Smoke from hundreds of wildfires in Canada is triggering air quality alerts throughout the US. Skylines from Maine to Maryland to Minnesota are gray and smoggy. And in some places, the air quality warnings include the warning to stay inside. We wanted to better understand what\u0027s happening here and why, so we called Peter de Carlo, an associate professor in the Department of Environmental Health and Engineering at Johns Hopkins University Varsity. Good morning, professor. Good morning.","labels":[{"label":"disasters","confidence":0.8142836093902588,"severity":0.4093044400215149}],"sentences_idx_start":0,"sentences_idx_end":5,"timestamp":{"start":250,"end":28840}}],"summary":{"disasters":0.9940800441842205,"health_issues":0.9216489289040967},"severity_score_summary":{"disasters":{"low":0.5733263024656846,"medium":0.42667369753431533,"high":0.0},"health_issues":{"low":0.22863814977924785,"medium":0.45014154926938227,"high":0.32122030095136983}}}
/// </summary>
public sealed partial class ContentSafetyLabelsResult
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace AssemblyAI
{
/// <summary>
/// Severity score summary<br/>
/// Example: {"low":0.5733263024656846,"medium":0.42667369753431533,"high":0}
/// Example: {"low":0.5733263024656846,"medium":0.42667369753431533,"high":0.0}
/// </summary>
public sealed partial class SeverityScoreSummary
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace AssemblyAI
/// <summary>
/// The result of the Topic Detection model, if it is enabled.<br/>
/// See [Topic Detection](https://www.assemblyai.com/docs/speech-understanding/topic-detection) for more information.<br/>
/// Example: {"status":"success","results":[{"text":"Smoke from hundreds of wildfires in Canada is triggering air quality alerts throughout the US. Skylines from Maine to Maryland to Minnesota are gray and smoggy. And in some places, the air quality warnings include the warning to stay inside. We wanted to better understand what\u0027s happening here and why, so we called Peter de Carlo, an associate professor in the Department of Environmental Health and Engineering at Johns Hopkins University Varsity. Good morning, professor. Good morning.","labels":[{"relevance":0.988274097442627,"label":"Home\u0026Garden\u003EIndoorEnvironmentalQuality"},{"relevance":0.5821335911750793,"label":"NewsAndPolitics\u003EWeather"},{"relevance":0.0042327106930315495,"label":"MedicalHealth\u003EDiseasesAndConditions\u003ELungAndRespiratoryHealth"},{"relevance":0.0033971222583204508,"label":"NewsAndPolitics\u003EDisasters"},{"relevance":0.002469958271831274,"label":"BusinessAndFinance\u003EBusiness\u003EGreenSolutions"},{"relevance":0.0014376690378412604,"label":"MedicalHealth\u003EDiseasesAndConditions\u003ECancer"},{"relevance":0.0014294233405962586,"label":"Science\u003EEnvironment"},{"relevance":0.001234519761055708,"label":"Travel\u003ETravelLocations\u003EPolarTravel"},{"relevance":0.0010231725173071027,"label":"MedicalHealth\u003EDiseasesAndConditions\u003EColdAndFlu"},{"relevance":0.0007445293595083058,"label":"BusinessAndFinance\u003EIndustries\u003EPowerAndEnergyIndustry"}],"timestamp":{"start":250,"end":28840}}],"summary":{"NewsAndPolitics\u003EWeather":1,"Home\u0026Garden\u003EIndoorEnvironmentalQuality":0.9043831825256348,"Science\u003EEnvironment":0.16117265820503235,"BusinessAndFinance\u003EIndustries\u003EEnvironmentalServicesIndustry":0.14393523335456848,"MedicalHealth\u003EDiseasesAndConditions\u003ELungAndRespiratoryHealth":0.11401086300611496,"BusinessAndFinance\u003EBusiness\u003EGreenSolutions":0.06348437070846558,"NewsAndPolitics\u003EDisasters":0.05041387677192688,"Travel\u003ETravelLocations\u003EPolarTravel":0.01308488193899393,"HealthyLiving":0.008222488686442375,"MedicalHealth\u003EDiseasesAndConditions\u003EColdAndFlu":0.0022315620444715023,"MedicalHealth\u003EDiseasesAndConditions\u003EHeartAndCardiovascularDiseases":0.00213034451007843,"HealthyLiving\u003EWellness\u003ESmokingCessation":0.001540527562610805,"MedicalHealth\u003EDiseasesAndConditions\u003EInjuries":0.0013950627762824297,"BusinessAndFinance\u003EIndustries\u003EPowerAndEnergyIndustry":0.0012570273829624057,"MedicalHealth\u003EDiseasesAndConditions\u003ECancer":0.001097781932912767,"MedicalHealth\u003EDiseasesAndConditions\u003EAllergies":0.0010148967849090695,"MedicalHealth\u003EDiseasesAndConditions\u003EMentalHealth":0.000717321818228811,"Style\u0026Fashion\u003EPersonalCare\u003EDeodorantAndAntiperspirant":0.0006022014422342181,"Technology\u0026Computing\u003EComputing\u003EComputerNetworking":0.0005461975233629346,"MedicalHealth\u003EDiseasesAndConditions\u003EInjuries\u003EFirstAid":0.0004885646631009877}}
/// Example: {"status":"success","results":[{"text":"Smoke from hundreds of wildfires in Canada is triggering air quality alerts throughout the US. Skylines from Maine to Maryland to Minnesota are gray and smoggy. And in some places, the air quality warnings include the warning to stay inside. We wanted to better understand what\u0027s happening here and why, so we called Peter de Carlo, an associate professor in the Department of Environmental Health and Engineering at Johns Hopkins University Varsity. Good morning, professor. Good morning.","labels":[{"relevance":0.988274097442627,"label":"Home\u0026Garden\u003EIndoorEnvironmentalQuality"},{"relevance":0.5821335911750793,"label":"NewsAndPolitics\u003EWeather"},{"relevance":0.0042327106930315495,"label":"MedicalHealth\u003EDiseasesAndConditions\u003ELungAndRespiratoryHealth"},{"relevance":0.0033971222583204508,"label":"NewsAndPolitics\u003EDisasters"},{"relevance":0.002469958271831274,"label":"BusinessAndFinance\u003EBusiness\u003EGreenSolutions"},{"relevance":0.0014376690378412604,"label":"MedicalHealth\u003EDiseasesAndConditions\u003ECancer"},{"relevance":0.0014294233405962586,"label":"Science\u003EEnvironment"},{"relevance":0.001234519761055708,"label":"Travel\u003ETravelLocations\u003EPolarTravel"},{"relevance":0.0010231725173071027,"label":"MedicalHealth\u003EDiseasesAndConditions\u003EColdAndFlu"},{"relevance":0.0007445293595083058,"label":"BusinessAndFinance\u003EIndustries\u003EPowerAndEnergyIndustry"}],"timestamp":{"start":250,"end":28840}}],"summary":{"NewsAndPolitics\u003EWeather":1.0,"Home\u0026Garden\u003EIndoorEnvironmentalQuality":0.9043831825256348,"Science\u003EEnvironment":0.16117265820503235,"BusinessAndFinance\u003EIndustries\u003EEnvironmentalServicesIndustry":0.14393523335456848,"MedicalHealth\u003EDiseasesAndConditions\u003ELungAndRespiratoryHealth":0.11401086300611496,"BusinessAndFinance\u003EBusiness\u003EGreenSolutions":0.06348437070846558,"NewsAndPolitics\u003EDisasters":0.05041387677192688,"Travel\u003ETravelLocations\u003EPolarTravel":0.01308488193899393,"HealthyLiving":0.008222488686442375,"MedicalHealth\u003EDiseasesAndConditions\u003EColdAndFlu":0.0022315620444715023,"MedicalHealth\u003EDiseasesAndConditions\u003EHeartAndCardiovascularDiseases":0.00213034451007843,"HealthyLiving\u003EWellness\u003ESmokingCessation":0.001540527562610805,"MedicalHealth\u003EDiseasesAndConditions\u003EInjuries":0.0013950627762824297,"BusinessAndFinance\u003EIndustries\u003EPowerAndEnergyIndustry":0.0012570273829624057,"MedicalHealth\u003EDiseasesAndConditions\u003ECancer":0.001097781932912767,"MedicalHealth\u003EDiseasesAndConditions\u003EAllergies":0.0010148967849090695,"MedicalHealth\u003EDiseasesAndConditions\u003EMentalHealth":0.000717321818228811,"Style\u0026Fashion\u003EPersonalCare\u003EDeodorantAndAntiperspirant":0.0006022014422342181,"Technology\u0026Computing\u003EComputing\u003EComputerNetworking":0.0005461975233629346,"MedicalHealth\u003EDiseasesAndConditions\u003EInjuries\u003EFirstAid":0.0004885646631009877}}
/// </summary>
public sealed partial class TopicDetectionModelResult
{
Expand Down
22 changes: 11 additions & 11 deletions src/libs/AssemblyAI/Generated/AssemblyAI.Models.Transcript.g.cs

Large diffs are not rendered by default.

Loading