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 7, 2024
1 parent 4d6848d commit 9ff53b1
Show file tree
Hide file tree
Showing 19 changed files with 799 additions and 11 deletions.
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
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 `true` for videos you discarded when you have the Video Restore feature enabled. Returns `false` 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'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]
**tags** | **List<String>** | One array of tags (each tag is a string) in order to categorize a video. Tags may include spaces. | [optional]
**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]
**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 | "api"
AUTO | "auto"


## Implemented Interfaces

* Serializable
Expand Down
42 changes: 42 additions & 0 deletions docs/VideoCreationPayload.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,48 @@ Name | Type | Description | Notes
**metadata** | [**List<Metadata>**](Metadata.md) | A list of key value pairs that you use to provide metadata for your video. | [optional]
**clip** | [**VideoClip**](VideoClip.md) | | [optional]
**watermark** | [**VideoWatermark**](VideoWatermark.md) | | [optional]
**language** | [**LanguageEnum**](#LanguageEnum) | 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]
**transcript** | **Boolean** | 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]



## Enum: LanguageEnum

Name | Value
---- | -----
AR | "ar"
CA | "ca"
CS | "cs"
DA | "da"
DE | "de"
EL | "el"
EN | "en"
ES | "es"
FA | "fa"
FI | "fi"
FR | "fr"
HE | "he"
HI | "hi"
HR | "hr"
HU | "hu"
IT | "it"
JA | "ja"
KO | "ko"
ML | "ml"
NL | "nl"
NN | "nn"
FALSE | "false"
PL | "pl"
PT | "pt"
RU | "ru"
SK | "sk"
SL | "sl"
TE | "te"
TR | "tr"
UK | "uk"
UR | "ur"
VI | "vi"
ZH | "zh"


## Implemented Interfaces
Expand Down
Loading

0 comments on commit 9ff53b1

Please sign in to comment.