Skip to content

Commit

Permalink
Add transcript feature
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierapivideo authored Oct 8, 2024
1 parent ab29fb4 commit 7a25f7e
Show file tree
Hide file tree
Showing 24 changed files with 808 additions and 17 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog
All changes to this project will be documented in this file.

## [1.4.4] - 2024-10-08
- Add transcript feature

## [1.4.3] - 2024-09-30
- Add /tags API endpoint

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Add this dependency to your project's POM:
<dependency>
<groupId>video.api</groupId>
<artifactId>java-api-client</artifactId>
<version>1.4.3</version>
<version>1.4.4</version>
<scope>compile</scope>
</dependency>
```
Expand All @@ -79,7 +79,7 @@ Add this dependency to your project's POM:
Add this dependency to your project's build file:

```groovy
implementation "video.api:java-api-client:1.4.3"
implementation "video.api:java-api-client:1.4.4"
```

#### Others
Expand All @@ -92,7 +92,7 @@ mvn clean package

Then manually install the following JARs:

* `target/java-api-client-1.4.3.jar`
* `target/java-api-client-1.4.4.jar`
* `target/lib/*.jar`

### Code sample
Expand Down
178 changes: 176 additions & 2 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,8 @@ paths:
playerId: pl45KFKdlddgk654dspkze
title: Maths video
description: An amazing video explaining the string theory
language: en
languageOrigin: api
public: false
panoramic: false
mp4Support: true
Expand Down Expand Up @@ -318,6 +320,8 @@ paths:
- videoId: vi4blUQJFrYWbaG44NChkH27
title: Video Title
description: A description for your video.
language: en
languageOrigin: api
public: false
panoramic: false
mp4Support: true
Expand Down Expand Up @@ -350,6 +354,8 @@ paths:
playerId: pl45KFKdlddgk654dspkze
title: My Video Title
description: A brief description of the video.
language: fr
languageOrigin: api
public: false
panoramic: false
mp4Support: true
Expand Down Expand Up @@ -616,6 +622,8 @@ paths:
videoId: vi4blUQJFrYWbaG44NChkH27
title: Maths video
description: An amazing video explaining the string theory
language: en
languageOrigin: api
public: false
panoramic: false
mp4Support: true
Expand Down Expand Up @@ -698,7 +706,7 @@ paths:
content:
application/json:
examples:
response:
Arttribute required:
value:
type: https://docs.api.video/reference/attribute-required
title: This attribute is required.
Expand All @@ -717,6 +725,25 @@ paths:
- type: https://docs.api.video/reference/invalid-attribute
title: This attribute must be an array.
name: metadata
Invalid language formatting:
description: This error occurs when the language tag you provided
contains characters other than letters and dashes.
value:
type: https://docs.api.video/reference/invalid-attribute
title: An attribute is invalid.
status: 400
detail: The "language" attribute must contain only letters and
dashes (for example "fr", "fr-BE").
name: language
Invalid language:
description: This error occurs when the language tag you provided
does not match any supported language.
value:
type: https://docs.api.video/reference/invalid-attribute
title: An attribute is invalid.
status: 400
detail: The "language" attribute is not valid.
name: language
schema:
$ref: '#/components/schemas/bad-request'
description: Bad Request
Expand Down Expand Up @@ -2977,6 +3004,8 @@ paths:
playerId: pl45KFKdlddgk654dspkze
title: Maths video
description: An amazing video explaining string theory
language: en
languageOrigin: api
public: false
panoramic: false
mp4Support: true
Expand Down Expand Up @@ -3231,6 +3260,8 @@ paths:
playerId: pl45KFKdlddgk654dspkze
title: Maths video
description: An amazing video explaining the string theory
language: en
languageOrigin: api
public: false
panoramic: false
mp4Support: true
Expand Down Expand Up @@ -3286,7 +3317,7 @@ paths:
content:
application/json:
examples:
response:
Invalid attribute:
value:
type: https://docs.api.video/reference/invalid-attribute
title: This attribute must be a ISO-8601 date.
Expand All @@ -3302,6 +3333,25 @@ paths:
- type: https://docs.api.video/reference/invalid-attribute
title: This attribute must be an array.
name: metadata
Invalid language formatting:
description: This error occurs when the language tag you provided
contains characters other than letters and dashes.
value:
type: https://docs.api.video/reference/invalid-attribute
title: An attribute is invalid.
status: 400
detail: The "language" attribute must contain only letters and
dashes (for example "fr", "fr-BE").
name: language
Invalid language:
description: This error occurs when the language tag you provided
does not match any supported language.
value:
type: https://docs.api.video/reference/invalid-attribute
title: An attribute is invalid.
status: 400
detail: The "language" attribute is not valid.
name: language
schema:
$ref: '#/components/schemas/bad-request'
description: Bad Request
Expand Down Expand Up @@ -5607,6 +5657,7 @@ paths:
playerId: pl45KFKdlddgk654dspkze
title: Maths video
description: An amazing video explaining the string theory
language: en
public: false
panoramic: false
tags:
Expand Down Expand Up @@ -14886,6 +14937,8 @@ components:
videoId: vi4k0jvEUuaTdRAEjQ4Jfrgz
title: Maths video
description: An amazing video explaining the string theory
language: en
languageOrigin: api
tags:
- maths
- string theory
Expand Down Expand Up @@ -14957,6 +15010,21 @@ components:
description: Returns `true` for videos you discarded when you have the Video
Restore feature enabled. Returns `false` for every other video.
type: boolean
language:
description: 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.
type: string
languageOrigin:
description: |-
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.
enum:
- api
- auto
type: string
tags:
description: "One array of tags (each tag is a string) in order to categorize\
\ a video. Tags may include spaces. \n"
Expand Down Expand Up @@ -15705,6 +15773,8 @@ components:
- videoId: vi4k0jvEUuaTdRAEjQ4Jfrgz
title: Maths video
description: An amazing video explaining the string theory
language: en
languageOrigin: api
tags:
- maths
- string theory
Expand All @@ -15726,6 +15796,8 @@ components:
- videoId: vi4k0jvEUuaTdRAEjQ4Jfrgz
title: Maths video
description: An amazing video explaining the string theory
language: en
languageOrigin: api
tags:
- maths
- string theory
Expand Down Expand Up @@ -15777,6 +15849,8 @@ components:
panoramic: false
mp4Support: true
playerId: pl45KFKdlddgk654dspkze
language: en
transcript: true
tags:
- maths
- string theory
Expand Down Expand Up @@ -15847,6 +15921,55 @@ components:
$ref: '#/components/schemas/video-clip'
watermark:
$ref: '#/components/schemas/video-watermark'
language:
description: |-
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.
enum:
- ar
- ca
- cs
- da
- de
- el
- en
- es
- fa
- fi
- fr
- he
- hi
- hr
- hu
- it
- ja
- ko
- ml
- nl
- nn
- "false"
- pl
- pt
- ru
- sk
- sl
- te
- tr
- uk
- ur
- vi
- zh
example: fr
type: string
transcript:
description: "Use this parameter to enable transcription. \n\n- When `true`,\
\ the API generates a transcript for the video.\n- The default value is\
\ `false`.\n- 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. \n- When the API\
\ generates a transcript, it will be available as a caption for the video."
type: boolean
required:
- title
title: VideoCreationPayload
Expand Down Expand Up @@ -15897,6 +16020,8 @@ components:
title: String theory
description: An amazing video explaining the string theory
public: false
language: en
reanscript: true
panoramic: false
mp4Support: true
tags:
Expand Down Expand Up @@ -15951,6 +16076,55 @@ components:
items:
$ref: '#/components/schemas/metadata'
type: array
language:
description: |-
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.
enum:
- ar
- ca
- cs
- da
- de
- el
- en
- es
- fa
- fi
- fr
- he
- hi
- hr
- hu
- it
- ja
- ko
- ml
- nl
- nn
- "false"
- pl
- pt
- ru
- sk
- sl
- te
- tr
- uk
- ur
- vi
- zh
example: fr
type: string
transcript:
description: "Use this parameter to enable transcription. \n\n- When `true`,\
\ the API generates a transcript for the video.\n- The default value is\
\ `false`.\n- 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. \n- When the API\
\ generates a transcript, it will be available as a caption for the video."
type: boolean
title: VideoUpdatePayload
type: object
discarded-video-update-payload:
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apply plugin: 'com.diffplug.spotless'
apply plugin: 'maven-publish'

group = 'video.api'
version = '1.4.3'
version = '1.4.4'

buildscript {
repositories {
Expand Down
11 changes: 11 additions & 0 deletions docs/Video.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Name | Type | Description | Notes
**discardedAt** | **OffsetDateTime** | 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]
**deletesAt** | **OffsetDateTime** | 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]
**discarded** | **Boolean** | Returns &#x60;true&#x60; for videos you discarded when you have the Video Restore feature enabled. Returns &#x60;false&#x60; for every other video. | [optional]
**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]
**languageOrigin** | [**LanguageOriginEnum**](#LanguageOriginEnum) | Returns the origin of the last update on the video&#39;s &#x60;language&#x60; attribute. - &#x60;api&#x60; means that the last update was requested from the API. - &#x60;auto&#x60; means that the last update was done automatically by the API. | [optional]
**tags** | **List&lt;String&gt;** | One array of tags (each tag is a string) in order to categorize a video. Tags may include spaces. | [optional]
**metadata** | [**List&lt;Metadata&gt;**](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]
**source** | [**VideoSource**](VideoSource.md) | | [optional]
Expand All @@ -25,6 +27,15 @@ Name | Type | Description | Notes
**mp4Support** | **Boolean** | This lets you know whether mp4 is supported. If enabled, an mp4 URL will be provided in the response for the video. | [optional]



## Enum: LanguageOriginEnum

Name | Value
---- | -----
API | &quot;api&quot;
AUTO | &quot;auto&quot;


## Implemented Interfaces

* Serializable
Expand Down
Loading

0 comments on commit 7a25f7e

Please sign in to comment.