diff --git a/src/cli/Descript.CLI/Commands/ApiEndpointsExportTranscriptCommandApiCommand.g.cs b/src/cli/Descript.CLI/Commands/ApiEndpointsExportTranscriptCommandApiCommand.g.cs index 7f2633a..7da24a2 100644 --- a/src/cli/Descript.CLI/Commands/ApiEndpointsExportTranscriptCommandApiCommand.g.cs +++ b/src/cli/Descript.CLI/Commands/ApiEndpointsExportTranscriptCommandApiCommand.g.cs @@ -25,6 +25,7 @@ internal static partial class ApiEndpointsExportTranscriptCommandApiCommand { Description = @"Transcript file format. The response body is the raw transcript file in the requested format (binary for `docx`, plain text otherwise). +The `srt` format exports a SubRip subtitle file with timed captions. ", Required = true, }; @@ -92,7 +93,7 @@ public static Command Create() var command = new Command(@"export-transcript", @"Export project transcript Export the transcript from a project composition. -Supports plain text, Markdown, HTML, RTF, and DOCX formats. +Supports plain text, Markdown, HTML, RTF, DOCX, and SRT (SubRip subtitle) formats. Options include speaker labels, timecodes, and markers. The response body is the raw transcript file (binary for `docx`, diff --git a/src/libs/Descript/Generated/Descript.ApiEndpointsClient.ExportTranscript.g.cs b/src/libs/Descript/Generated/Descript.ApiEndpointsClient.ExportTranscript.g.cs index ee22491..b6c85a9 100644 --- a/src/libs/Descript/Generated/Descript.ApiEndpointsClient.ExportTranscript.g.cs +++ b/src/libs/Descript/Generated/Descript.ApiEndpointsClient.ExportTranscript.g.cs @@ -44,7 +44,7 @@ partial void ProcessExportTranscriptResponseContent( /// /// Export project transcript
/// Export the transcript from a project composition.
- /// Supports plain text, Markdown, HTML, RTF, and DOCX formats.
+ /// Supports plain text, Markdown, HTML, RTF, DOCX, and SRT (SubRip subtitle) formats.
/// Options include speaker labels, timecodes, and markers.
/// The response body is the raw transcript file (binary for `docx`,
/// text otherwise) with a `Content-Disposition: attachment` header and
@@ -72,7 +72,7 @@ partial void ProcessExportTranscriptResponseContent( /// /// Export project transcript
/// Export the transcript from a project composition.
- /// Supports plain text, Markdown, HTML, RTF, and DOCX formats.
+ /// Supports plain text, Markdown, HTML, RTF, DOCX, and SRT (SubRip subtitle) formats.
/// Options include speaker labels, timecodes, and markers.
/// The response body is the raw transcript file (binary for `docx`,
/// text otherwise) with a `Content-Disposition: attachment` header and
@@ -590,7 +590,7 @@ partial void ProcessExportTranscriptResponseContent( /// /// Export project transcript
/// Export the transcript from a project composition.
- /// Supports plain text, Markdown, HTML, RTF, and DOCX formats.
+ /// Supports plain text, Markdown, HTML, RTF, DOCX, and SRT (SubRip subtitle) formats.
/// Options include speaker labels, timecodes, and markers.
/// The response body is the raw transcript file (binary for `docx`,
/// text otherwise) with a `Content-Disposition: attachment` header and
@@ -606,7 +606,8 @@ partial void ProcessExportTranscriptResponseContent( /// /// /// Transcript file format. The response body is the raw transcript file
- /// in the requested format (binary for `docx`, plain text otherwise). + /// in the requested format (binary for `docx`, plain text otherwise).
+ /// The `srt` format exports a SubRip subtitle file with timed captions. /// /// /// Speaker label mode.
diff --git a/src/libs/Descript/Generated/Descript.IApiEndpointsClient.ExportTranscript.g.cs b/src/libs/Descript/Generated/Descript.IApiEndpointsClient.ExportTranscript.g.cs index 9cdab6c..bf47d68 100644 --- a/src/libs/Descript/Generated/Descript.IApiEndpointsClient.ExportTranscript.g.cs +++ b/src/libs/Descript/Generated/Descript.IApiEndpointsClient.ExportTranscript.g.cs @@ -7,7 +7,7 @@ public partial interface IApiEndpointsClient /// /// Export project transcript
/// Export the transcript from a project composition.
- /// Supports plain text, Markdown, HTML, RTF, and DOCX formats.
+ /// Supports plain text, Markdown, HTML, RTF, DOCX, and SRT (SubRip subtitle) formats.
/// Options include speaker labels, timecodes, and markers.
/// The response body is the raw transcript file (binary for `docx`,
/// text otherwise) with a `Content-Disposition: attachment` header and
@@ -25,7 +25,7 @@ public partial interface IApiEndpointsClient /// /// Export project transcript
/// Export the transcript from a project composition.
- /// Supports plain text, Markdown, HTML, RTF, and DOCX formats.
+ /// Supports plain text, Markdown, HTML, RTF, DOCX, and SRT (SubRip subtitle) formats.
/// Options include speaker labels, timecodes, and markers.
/// The response body is the raw transcript file (binary for `docx`,
/// text otherwise) with a `Content-Disposition: attachment` header and
@@ -43,7 +43,7 @@ public partial interface IApiEndpointsClient /// /// Export project transcript
/// Export the transcript from a project composition.
- /// Supports plain text, Markdown, HTML, RTF, and DOCX formats.
+ /// Supports plain text, Markdown, HTML, RTF, DOCX, and SRT (SubRip subtitle) formats.
/// Options include speaker labels, timecodes, and markers.
/// The response body is the raw transcript file (binary for `docx`,
/// text otherwise) with a `Content-Disposition: attachment` header and
@@ -59,7 +59,8 @@ public partial interface IApiEndpointsClient /// /// /// Transcript file format. The response body is the raw transcript file
- /// in the requested format (binary for `docx`, plain text otherwise). + /// in the requested format (binary for `docx`, plain text otherwise).
+ /// The `srt` format exports a SubRip subtitle file with timed captions. /// /// /// Speaker label mode.
diff --git a/src/libs/Descript/Generated/Descript.Models.ExportTranscriptRequest.g.cs b/src/libs/Descript/Generated/Descript.Models.ExportTranscriptRequest.g.cs index dafc8af..c26c89f 100644 --- a/src/libs/Descript/Generated/Descript.Models.ExportTranscriptRequest.g.cs +++ b/src/libs/Descript/Generated/Descript.Models.ExportTranscriptRequest.g.cs @@ -27,7 +27,8 @@ public sealed partial class ExportTranscriptRequest /// /// Transcript file format. The response body is the raw transcript file
- /// in the requested format (binary for `docx`, plain text otherwise). + /// in the requested format (binary for `docx`, plain text otherwise).
+ /// The `srt` format exports a SubRip subtitle file with timed captions. ///
[global::System.Text.Json.Serialization.JsonPropertyName("format")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Descript.JsonConverters.ExportTranscriptRequestFormatJsonConverter))] @@ -74,7 +75,8 @@ public sealed partial class ExportTranscriptRequest /// /// /// Transcript file format. The response body is the raw transcript file
- /// in the requested format (binary for `docx`, plain text otherwise). + /// in the requested format (binary for `docx`, plain text otherwise).
+ /// The `srt` format exports a SubRip subtitle file with timed captions. /// /// /// The ID of the composition to export. Defaults to the first composition.
diff --git a/src/libs/Descript/Generated/Descript.Models.ExportTranscriptRequestFormat.g.cs b/src/libs/Descript/Generated/Descript.Models.ExportTranscriptRequestFormat.g.cs index df92f1c..285a848 100644 --- a/src/libs/Descript/Generated/Descript.Models.ExportTranscriptRequestFormat.g.cs +++ b/src/libs/Descript/Generated/Descript.Models.ExportTranscriptRequestFormat.g.cs @@ -5,7 +5,8 @@ namespace Descript { /// /// Transcript file format. The response body is the raw transcript file
- /// in the requested format (binary for `docx`, plain text otherwise). + /// in the requested format (binary for `docx`, plain text otherwise).
+ /// The `srt` format exports a SubRip subtitle file with timed captions. ///
public enum ExportTranscriptRequestFormat { @@ -28,6 +29,10 @@ public enum ExportTranscriptRequestFormat /// /// /// + Srt, + /// + /// + /// Txt, } @@ -47,6 +52,7 @@ public static string ToValueString(this ExportTranscriptRequestFormat value) ExportTranscriptRequestFormat.Html => "html", ExportTranscriptRequestFormat.Markdown => "markdown", ExportTranscriptRequestFormat.Rtf => "rtf", + ExportTranscriptRequestFormat.Srt => "srt", ExportTranscriptRequestFormat.Txt => "txt", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; @@ -62,6 +68,7 @@ public static string ToValueString(this ExportTranscriptRequestFormat value) "html" => ExportTranscriptRequestFormat.Html, "markdown" => ExportTranscriptRequestFormat.Markdown, "rtf" => ExportTranscriptRequestFormat.Rtf, + "srt" => ExportTranscriptRequestFormat.Srt, "txt" => ExportTranscriptRequestFormat.Txt, _ => null, }; diff --git a/src/libs/Descript/Generated/autosdk.generated-examples.json b/src/libs/Descript/Generated/autosdk.generated-examples.json index 00e660f..aa0a095 100644 --- a/src/libs/Descript/Generated/autosdk.generated-examples.json +++ b/src/libs/Descript/Generated/autosdk.generated-examples.json @@ -26,7 +26,7 @@ "Order": 3, "Title": "Export project transcript", "Slug": "exporttranscript", - "Description": "Export the transcript from a project composition.\n\nSupports plain text, Markdown, HTML, RTF, and DOCX formats.\nOptions include speaker labels, timecodes, and markers.\n\nThe response body is the raw transcript file (binary for \u0060docx\u0060,\ntext otherwise) with a \u0060Content-Disposition: attachment\u0060 header and\nan \u0060X-Composition-Id\u0060 header identifying the exported composition.", + "Description": "Export the transcript from a project composition.\n\nSupports plain text, Markdown, HTML, RTF, DOCX, and SRT (SubRip subtitle) formats.\nOptions include speaker labels, timecodes, and markers.\n\nThe response body is the raw transcript file (binary for \u0060docx\u0060,\ntext otherwise) with a \u0060Content-Disposition: attachment\u0060 header and\nan \u0060X-Composition-Id\u0060 header identifying the exported composition.", "Language": "csharp", "Code": "using var client = new DescriptClient(apiKey);\n\nvar request = global::System.Text.Json.JsonSerializer.Deserialize\u003Cglobal::Descript.ExportTranscriptRequest\u003E(\n @\u0022{\n \u0022\u0022project_id\u0022\u0022: \u0022\u00229f36ee32-5a2c-47e7-b1a3-94991d3e3ddb\u0022\u0022,\n \u0022\u0022format\u0022\u0022: \u0022\u0022markdown\u0022\u0022,\n \u0022\u0022include_speaker_labels\u0022\u0022: \u0022\u0022every_paragraph\u0022\u0022,\n \u0022\u0022timecodes\u0022\u0022: {\n \u0022\u0022on_paragraphs\u0022\u0022: true\n }\n}\u0022)!;\n\nvar response = await client.ApiEndpoints.ExportTranscriptAsync(\n request: request\n);\n\n// Example response:\n// Speaker 1: Hello, welcome to the show.\n// \n// Speaker 2: Thanks for having me.", "Format": "sdk", diff --git a/src/libs/Descript/openapi.yaml b/src/libs/Descript/openapi.yaml index eda70cb..bf3a7e4 100644 --- a/src/libs/Descript/openapi.yaml +++ b/src/libs/Descript/openapi.yaml @@ -1321,7 +1321,7 @@ paths: description: | Export the transcript from a project composition. - Supports plain text, Markdown, HTML, RTF, and DOCX formats. + Supports plain text, Markdown, HTML, RTF, DOCX, and SRT (SubRip subtitle) formats. Options include speaker labels, timecodes, and markers. The response body is the raw transcript file (binary for `docx`, @@ -1353,9 +1353,11 @@ paths: - html - rtf - docx + - srt description: | Transcript file format. The response body is the raw transcript file in the requested format (binary for `docx`, plain text otherwise). + The `srt` format exports a SubRip subtitle file with timed captions. include_speaker_labels: type: string enum: @@ -1416,6 +1418,12 @@ paths: include_speaker_labels: every_paragraph timecodes: on_paragraphs: true + srt_subtitles: + summary: Export as SRT subtitles + value: + project_id: 9f36ee32-5a2c-47e7-b1a3-94991d3e3ddb + format: srt + include_speaker_labels: 'off' description: Transcript export request required: true responses: @@ -1458,6 +1466,9 @@ paths: schema: type: string format: binary + application/x-subrip: + schema: + type: string '400': description: Invalid input content: