Skip to content

Commit acd1cb0

Browse files
Merge pull request #137 from apivideo/add-transcript-feature
Add transcript feature
2 parents be59fff + dcec3b0 commit acd1cb0

File tree

23 files changed

+109
-11
lines changed

23 files changed

+109
-11
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
49fece4f39cb92341dc77e0eb7371a152903bf6aebcfa250d289efc9018b0f72
1+
5ad86d4a6e6bdfede262551219ba43c8a645a86bc20fc9740b6f950e86f99f1d

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Changelog
22
All changes to this project will be documented in this file.
33

4+
## [1.6.4] - 2024-10-08
5+
- Add transcript feature
6+
47
## [1.6.3] - 2024-09-30
58
- Add /tags API endpoint
69

docs/Video.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Name | Type | Description | Notes
1313
**DiscardedAt** | **DateTime?** | The date and time the video was discarded. The API populates this field only if you have the Video Restore feature enabled and discard a video. Date and time are provided using ATOM UTC format. | [optional]
1414
**DeletesAt** | **DateTime?** | The date and time the video will be permanently deleted. The API populates this field only if you have the Video Restore feature enabled and discard a video. Discarded videos are pemanently deleted after 90 days. Date and time are provided using ATOM UTC format. | [optional]
1515
**Discarded** | **bool** | Returns `true` for videos you discarded when you have the Video Restore feature enabled. Returns `false` for every other video. | [optional]
16+
**Language** | **string** | Returns the language of a video in [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format. You can set the language during video creation via the API, otherwise it is detected automatically. | [optional]
17+
**LanguageOrigin** | **string** | Returns the origin of the last update on the video's `language` attribute. - `api` means that the last update was requested from the API. - `auto` means that the last update was done automatically by the API. | [optional]
1618
**Tags** | **List<string>** | One array of tags (each tag is a string) in order to categorize a video. Tags may include spaces. | [optional]
1719
**Metadata** | [**List<Metadata>**](Metadata.md) | Metadata you can use to categorise and filter videos. Metadata is a list of dictionaries, where each dictionary represents a key value pair for categorising a video. | [optional]
1820
**Source** | [**VideoSource**](VideoSource.md) | | [optional]

docs/VideoCreationPayload.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Name | Type | Description | Notes
1515
**Metadata** | [**List<Metadata>**](Metadata.md) | A list of key value pairs that you use to provide metadata for your video. | [optional]
1616
**Clip** | [**VideoClip**](VideoClip.md) | | [optional]
1717
**Watermark** | [**VideoWatermark**](VideoWatermark.md) | | [optional]
18+
**Language** | **string** | Use this parameter to set the language of the video. When this parameter is set, the API creates a transcript of the video using the language you specify. You must use the [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format. `language` is a permanent attribute of the video. You can update it to another language using the [`PATCH /videos/{videoId}`](https://docs.api.video/reference/api/Videos#update-a-video-object) operation. This triggers the API to generate a new transcript using a different language. | [optional]
19+
**Transcript** | **bool** | Use this parameter to enable transcription. - When `true`, the API generates a transcript for the video. - The default value is `false`. - If you define a video language using the `language` parameter, the API uses that language to transcribe the video. If you do not define a language, the API detects it based on the video. - When the API generates a transcript, it will be available as a caption for the video. | [optional]
1820

1921
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
2022

docs/VideoUpdatePayload.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Name | Type | Description | Notes
1212
**Mp4Support** | **bool** | Whether the player supports the mp4 format. | [optional]
1313
**Tags** | **List<string>** | A list of terms or words you want to tag the video with. Make sure the list includes all the tags you want as whatever you send in this list will overwrite the existing list for the video. | [optional]
1414
**Metadata** | [**List<Metadata>**](Metadata.md) | A list (array) of dictionaries where each dictionary contains a key value pair that describes the video. As with tags, you must send the complete list of metadata you want as whatever you send here will overwrite the existing metadata for the video. | [optional]
15+
**Language** | **string** | Use this parameter to set the language of the video. When this parameter is set, the API creates a transcript of the video using the language you specify. You must use the [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format. `language` is a permanent attribute of the video. You can update it to another language using the [`PATCH /videos/{videoId}`](https://docs.api.video/reference/api/Videos#update-a-video-object) operation. This triggers the API to generate a new transcript using a different language. | [optional]
16+
**Transcript** | **bool** | Use this parameter to enable transcription. - When `true`, the API generates a transcript for the video. - The default value is `false`. - If you define a video language using the `language` parameter, the API uses that language to transcribe the video. If you do not define a language, the API detects it based on the video. - When the API generates a transcript, it will be available as a caption for the video. | [optional]
1517

1618
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1719

src/Api/VideosApi.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public Task<ApiResponse<Video>> createWithHttpInfoAsync(VideoCreationPayload vid
8585
if (videoCreationPayload != null && videoCreationPayload.title == null) {
8686
throw new ApiException(400,"Missing required parameter 'videoCreationPayload.Title' when calling VideosApi->create");
8787
}
88-
88+
8989
// verify the required parameter 'videoCreationPayload' is set
9090
if (videoCreationPayload == null)
9191
throw new ApiException(400, "Missing required parameter 'videoCreationPayload' when calling VideosApi->create");
@@ -157,7 +157,7 @@ public ApiResponse<Video> createWithHttpInfo(VideoCreationPayload videoCreationP
157157
if (videoCreationPayload != null && videoCreationPayload.title == null) {
158158
throw new ApiException(400,"Missing required parameter 'videoCreationPayload.Title' when calling VideosApi->create");
159159
}
160-
160+
161161
// verify the required parameter 'videoCreationPayload' is set
162162
if (videoCreationPayload == null)
163163
throw new ApiException(400, "Missing required parameter 'videoCreationPayload' when calling VideosApi->create");
@@ -1242,11 +1242,11 @@ public Task<ApiResponse<Video>> updateWithHttpInfoAsync(string videoId, VideoUpd
12421242
if (videoUpdatePayload == null)
12431243
throw new ApiException(400,"Missing required parameter 'videoUpdatePayload' when calling VideosApi->update");
12441244

1245-
1245+
12461246
if (videoUpdatePayload == null)
12471247
throw new ApiException(400,"Missing required parameter 'videoUpdatePayload' when calling VideosApi->update");
12481248

1249-
1249+
12501250
// verify the required parameter 'videoId' is set
12511251
if (videoId == null)
12521252
throw new ApiException(400, "Missing required parameter 'videoId' when calling VideosApi->update");
@@ -1326,11 +1326,11 @@ public ApiResponse<Video> updateWithHttpInfo(string videoId, VideoUpdatePayload
13261326
if (videoUpdatePayload == null)
13271327
throw new ApiException(400,"Missing required parameter 'videoUpdatePayload' when calling VideosApi->update");
13281328

1329-
1329+
13301330
if (videoUpdatePayload == null)
13311331
throw new ApiException(400,"Missing required parameter 'videoUpdatePayload' when calling VideosApi->update");
13321332

1333-
1333+
13341334
// verify the required parameter 'videoId' is set
13351335
if (videoId == null)
13361336
throw new ApiException(400, "Missing required parameter 'videoId' when calling VideosApi->update");

src/ApiVideo.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The version of the OpenAPI document: 1
1313
<OutputType>Library</OutputType>
1414
<PackOnBuild>true</PackOnBuild>
1515
<PackageId>ApiVideo</PackageId>
16-
<PackageVersion>1.6.3</PackageVersion>
16+
<PackageVersion>1.6.4</PackageVersion>
1717
<Authors>api.video</Authors>
1818
<Description>api.video csharp API client</Description>
1919
<PackageLicenseExpression>MIT</PackageLicenseExpression>

src/Client/ApiClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public ApiClient(IRestClient client) {
9595
private void Initialize(IRestClient client)
9696
{
9797
this.RestClient = client;
98-
setName("AV-Origin-Client", "csharp", "1.6.3");
98+
setName("AV-Origin-Client", "csharp", "1.6.4");
9999
}
100100

101101
/// <summary>

src/Model/Video.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,20 @@ public class Video: DeepObject {
7676
[JsonProperty(PropertyName = "discarded")]
7777
public Nullable<bool> discarded { get; set; }
7878
/// <summary>
79+
/// Returns the language of a video in [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format. You can set the language during video creation via the API, otherwise it is detected automatically.
80+
/// </summary>
81+
/// <value>Returns the language of a video in [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format. You can set the language during video creation via the API, otherwise it is detected automatically.</value>
82+
[DataMember(Name="language", EmitDefaultValue=false)]
83+
[JsonProperty(PropertyName = "language")]
84+
public string language { get; set; }
85+
/// <summary>
86+
/// Returns the origin of the last update on the video's `language` attribute. - `api` means that the last update was requested from the API. - `auto` means that the last update was done automatically by the API.
87+
/// </summary>
88+
/// <value>Returns the origin of the last update on the video's `language` attribute. - `api` means that the last update was requested from the API. - `auto` means that the last update was done automatically by the API.</value>
89+
[DataMember(Name="languageOrigin", EmitDefaultValue=false)]
90+
[JsonProperty(PropertyName = "languageOrigin")]
91+
public string languageorigin { get; set; }
92+
/// <summary>
7993
/// One array of tags (each tag is a string) in order to categorize a video. Tags may include spaces.
8094
/// </summary>
8195
/// <value>One array of tags (each tag is a string) in order to categorize a video. Tags may include spaces. </value>
@@ -147,6 +161,8 @@ public override string ToString() {
147161
sb.Append(" DiscardedAt: ").Append(discardedat).Append("\n");
148162
sb.Append(" DeletesAt: ").Append(deletesat).Append("\n");
149163
sb.Append(" Discarded: ").Append(discarded).Append("\n");
164+
sb.Append(" Language: ").Append(language).Append("\n");
165+
sb.Append(" LanguageOrigin: ").Append(languageorigin).Append("\n");
150166
sb.Append(" Tags: ").Append(tags).Append("\n");
151167
sb.Append(" Metadata: ").Append(metadata).Append("\n");
152168
sb.Append(" Source: ").Append(source).Append("\n");

src/Model/VideoCreationPayload.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,20 @@ public class VideoCreationPayload: DeepObject {
8787
[DataMember(Name="watermark", EmitDefaultValue=false)]
8888
[JsonProperty(PropertyName = "watermark")]
8989
public VideoWatermark watermark { get; set; }
90+
/// <summary>
91+
/// Use this parameter to set the language of the video. When this parameter is set, the API creates a transcript of the video using the language you specify. You must use the [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format. `language` is a permanent attribute of the video. You can update it to another language using the [`PATCH /videos/{videoId}`](https://docs.api.video/reference/api/Videos#update-a-video-object) operation. This triggers the API to generate a new transcript using a different language.
92+
/// </summary>
93+
/// <value>Use this parameter to set the language of the video. When this parameter is set, the API creates a transcript of the video using the language you specify. You must use the [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format. `language` is a permanent attribute of the video. You can update it to another language using the [`PATCH /videos/{videoId}`](https://docs.api.video/reference/api/Videos#update-a-video-object) operation. This triggers the API to generate a new transcript using a different language.</value>
94+
[DataMember(Name="language", EmitDefaultValue=false)]
95+
[JsonProperty(PropertyName = "language")]
96+
public string language { get; set; }
97+
/// <summary>
98+
/// Use this parameter to enable transcription. - When `true`, the API generates a transcript for the video. - The default value is `false`. - If you define a video language using the `language` parameter, the API uses that language to transcribe the video. If you do not define a language, the API detects it based on the video. - When the API generates a transcript, it will be available as a caption for the video.
99+
/// </summary>
100+
/// <value>Use this parameter to enable transcription. - When `true`, the API generates a transcript for the video. - The default value is `false`. - If you define a video language using the `language` parameter, the API uses that language to transcribe the video. If you do not define a language, the API detects it based on the video. - When the API generates a transcript, it will be available as a caption for the video.</value>
101+
[DataMember(Name="transcript", EmitDefaultValue=false)]
102+
[JsonProperty(PropertyName = "transcript")]
103+
public Nullable<bool> transcript { get; set; }
90104

91105

92106
/// <summary>
@@ -117,6 +131,8 @@ public override string ToString() {
117131
sb.Append(" Metadata: ").Append(metadata).Append("\n");
118132
sb.Append(" Clip: ").Append(clip).Append("\n");
119133
sb.Append(" Watermark: ").Append(watermark).Append("\n");
134+
sb.Append(" Language: ").Append(language).Append("\n");
135+
sb.Append(" Transcript: ").Append(transcript).Append("\n");
120136
sb.Append("}\n");
121137
return sb.ToString();
122138
}

0 commit comments

Comments
 (0)