-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Bitmovin OpenApi Bot
committed
Jun 11, 2024
1 parent
b0e31b3
commit 1f43a5f
Showing
20 changed files
with
337 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
api/encoding_encodings_live_reset_live_manifest_timeshift_api.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package api | ||
|
||
import ( | ||
"github.com/bitmovin/bitmovin-api-sdk-go/apiclient" | ||
"github.com/bitmovin/bitmovin-api-sdk-go/model" | ||
) | ||
|
||
// EncodingEncodingsLiveResetLiveManifestTimeshiftAPI communicates with '/encoding/encodings/{encoding_id}/live/reset-live-manifest-timeshift' endpoints | ||
type EncodingEncodingsLiveResetLiveManifestTimeshiftAPI struct { | ||
apiClient *apiclient.APIClient | ||
} | ||
|
||
// NewEncodingEncodingsLiveResetLiveManifestTimeshiftAPI constructor for EncodingEncodingsLiveResetLiveManifestTimeshiftAPI that takes options as argument | ||
func NewEncodingEncodingsLiveResetLiveManifestTimeshiftAPI(options ...apiclient.APIClientOption) (*EncodingEncodingsLiveResetLiveManifestTimeshiftAPI, error) { | ||
apiClient, err := apiclient.NewAPIClient(options...) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
return NewEncodingEncodingsLiveResetLiveManifestTimeshiftAPIWithClient(apiClient), nil | ||
} | ||
|
||
// NewEncodingEncodingsLiveResetLiveManifestTimeshiftAPIWithClient constructor for EncodingEncodingsLiveResetLiveManifestTimeshiftAPI that takes an APIClient as argument | ||
func NewEncodingEncodingsLiveResetLiveManifestTimeshiftAPIWithClient(apiClient *apiclient.APIClient) *EncodingEncodingsLiveResetLiveManifestTimeshiftAPI { | ||
a := &EncodingEncodingsLiveResetLiveManifestTimeshiftAPI{apiClient: apiClient} | ||
return a | ||
} | ||
|
||
// Create Reset Live manifest time-shift | ||
func (api *EncodingEncodingsLiveResetLiveManifestTimeshiftAPI) Create(encodingId string, resetLiveManifestTimeShift model.ResetLiveManifestTimeShift) (*model.ResetLiveManifestTimeShift, error) { | ||
reqParams := func(params *apiclient.RequestParams) { | ||
params.PathParams["encoding_id"] = encodingId | ||
} | ||
|
||
var responseModel model.ResetLiveManifestTimeShift | ||
err := api.apiClient.Post("/encoding/encodings/{encoding_id}/live/reset-live-manifest-timeshift", &resetLiveManifestTimeShift, &responseModel, reqParams) | ||
return &responseModel, err | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
package api | ||
|
||
import ( | ||
"github.com/bitmovin/bitmovin-api-sdk-go/apiclient" | ||
"github.com/bitmovin/bitmovin-api-sdk-go/model" | ||
"github.com/bitmovin/bitmovin-api-sdk-go/pagination" | ||
) | ||
|
||
// EncodingFiltersAzureSpeechToCaptionsAPI communicates with '/encoding/filters/azure-speech-to-captions' endpoints | ||
type EncodingFiltersAzureSpeechToCaptionsAPI struct { | ||
apiClient *apiclient.APIClient | ||
|
||
// Customdata communicates with '/encoding/filters/azure-speech-to-captions/{filter_id}/customData' endpoints | ||
Customdata *EncodingFiltersAzureSpeechToCaptionsCustomdataAPI | ||
} | ||
|
||
// NewEncodingFiltersAzureSpeechToCaptionsAPI constructor for EncodingFiltersAzureSpeechToCaptionsAPI that takes options as argument | ||
func NewEncodingFiltersAzureSpeechToCaptionsAPI(options ...apiclient.APIClientOption) (*EncodingFiltersAzureSpeechToCaptionsAPI, error) { | ||
apiClient, err := apiclient.NewAPIClient(options...) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
return NewEncodingFiltersAzureSpeechToCaptionsAPIWithClient(apiClient), nil | ||
} | ||
|
||
// NewEncodingFiltersAzureSpeechToCaptionsAPIWithClient constructor for EncodingFiltersAzureSpeechToCaptionsAPI that takes an APIClient as argument | ||
func NewEncodingFiltersAzureSpeechToCaptionsAPIWithClient(apiClient *apiclient.APIClient) *EncodingFiltersAzureSpeechToCaptionsAPI { | ||
a := &EncodingFiltersAzureSpeechToCaptionsAPI{apiClient: apiClient} | ||
a.Customdata = NewEncodingFiltersAzureSpeechToCaptionsCustomdataAPIWithClient(apiClient) | ||
|
||
return a | ||
} | ||
|
||
// Create Azure Speech to captions Filter | ||
// This filter uses the Azure Speech Services - Speech to captions feature to transcribe an audio stream in real-time. - Required for this filter is an Azure account with an Azure Speech service resource. - Your own Azure speech service subscription key is required. - This filter only works for Live Encodings. - This filter transforms an audio input stream into a captions stream. - The filter must be applied to a stream that has an audio input. - The stream's codec configuration must be a subtitle or caption format (WebVtt, TTML, ..). | ||
func (api *EncodingFiltersAzureSpeechToCaptionsAPI) Create(azureSpeechToCaptionsFilter model.AzureSpeechToCaptionsFilter) (*model.AzureSpeechToCaptionsFilter, error) { | ||
reqParams := func(params *apiclient.RequestParams) { | ||
} | ||
|
||
var responseModel model.AzureSpeechToCaptionsFilter | ||
err := api.apiClient.Post("/encoding/filters/azure-speech-to-captions", &azureSpeechToCaptionsFilter, &responseModel, reqParams) | ||
return &responseModel, err | ||
} | ||
|
||
// Delete Azure Speech to captions Filter | ||
func (api *EncodingFiltersAzureSpeechToCaptionsAPI) Delete(filterId string) (*model.BitmovinResponse, error) { | ||
reqParams := func(params *apiclient.RequestParams) { | ||
params.PathParams["filter_id"] = filterId | ||
} | ||
|
||
var responseModel model.BitmovinResponse | ||
err := api.apiClient.Delete("/encoding/filters/azure-speech-to-captions/{filter_id}", nil, &responseModel, reqParams) | ||
return &responseModel, err | ||
} | ||
|
||
// Get Azure Speech to captions Filter details | ||
func (api *EncodingFiltersAzureSpeechToCaptionsAPI) Get(filterId string) (*model.AzureSpeechToCaptionsFilter, error) { | ||
reqParams := func(params *apiclient.RequestParams) { | ||
params.PathParams["filter_id"] = filterId | ||
} | ||
|
||
var responseModel model.AzureSpeechToCaptionsFilter | ||
err := api.apiClient.Get("/encoding/filters/azure-speech-to-captions/{filter_id}", nil, &responseModel, reqParams) | ||
return &responseModel, err | ||
} | ||
|
||
// List Azure Speech to captions Filters | ||
func (api *EncodingFiltersAzureSpeechToCaptionsAPI) List(queryParams ...func(*EncodingFiltersAzureSpeechToCaptionsAPIListQueryParams)) (*pagination.AzureSpeechToCaptionsFiltersListPagination, error) { | ||
queryParameters := &EncodingFiltersAzureSpeechToCaptionsAPIListQueryParams{} | ||
for _, queryParam := range queryParams { | ||
queryParam(queryParameters) | ||
} | ||
|
||
reqParams := func(params *apiclient.RequestParams) { | ||
params.QueryParams = queryParameters | ||
} | ||
|
||
var responseModel pagination.AzureSpeechToCaptionsFiltersListPagination | ||
err := api.apiClient.Get("/encoding/filters/azure-speech-to-captions", nil, &responseModel, reqParams) | ||
return &responseModel, err | ||
} | ||
|
||
// EncodingFiltersAzureSpeechToCaptionsAPIListQueryParams contains all query parameters for the List endpoint | ||
type EncodingFiltersAzureSpeechToCaptionsAPIListQueryParams struct { | ||
Offset int32 `query:"offset"` | ||
Limit int32 `query:"limit"` | ||
Name string `query:"name"` | ||
} | ||
|
||
// Params will return a map of query parameters | ||
func (q *EncodingFiltersAzureSpeechToCaptionsAPIListQueryParams) Params() map[string]string { | ||
return apiclient.GetParamsMap(q) | ||
} |
38 changes: 38 additions & 0 deletions
38
api/encoding_filters_azure_speech_to_captions_customdata_api.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package api | ||
|
||
import ( | ||
"github.com/bitmovin/bitmovin-api-sdk-go/apiclient" | ||
"github.com/bitmovin/bitmovin-api-sdk-go/model" | ||
) | ||
|
||
// EncodingFiltersAzureSpeechToCaptionsCustomdataAPI communicates with '/encoding/filters/azure-speech-to-captions/{filter_id}/customData' endpoints | ||
type EncodingFiltersAzureSpeechToCaptionsCustomdataAPI struct { | ||
apiClient *apiclient.APIClient | ||
} | ||
|
||
// NewEncodingFiltersAzureSpeechToCaptionsCustomdataAPI constructor for EncodingFiltersAzureSpeechToCaptionsCustomdataAPI that takes options as argument | ||
func NewEncodingFiltersAzureSpeechToCaptionsCustomdataAPI(options ...apiclient.APIClientOption) (*EncodingFiltersAzureSpeechToCaptionsCustomdataAPI, error) { | ||
apiClient, err := apiclient.NewAPIClient(options...) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
return NewEncodingFiltersAzureSpeechToCaptionsCustomdataAPIWithClient(apiClient), nil | ||
} | ||
|
||
// NewEncodingFiltersAzureSpeechToCaptionsCustomdataAPIWithClient constructor for EncodingFiltersAzureSpeechToCaptionsCustomdataAPI that takes an APIClient as argument | ||
func NewEncodingFiltersAzureSpeechToCaptionsCustomdataAPIWithClient(apiClient *apiclient.APIClient) *EncodingFiltersAzureSpeechToCaptionsCustomdataAPI { | ||
a := &EncodingFiltersAzureSpeechToCaptionsCustomdataAPI{apiClient: apiClient} | ||
return a | ||
} | ||
|
||
// Get Azure Speech to captions Filter Custom Data | ||
func (api *EncodingFiltersAzureSpeechToCaptionsCustomdataAPI) Get(filterId string) (*model.CustomData, error) { | ||
reqParams := func(params *apiclient.RequestParams) { | ||
params.PathParams["filter_id"] = filterId | ||
} | ||
|
||
var responseModel model.CustomData | ||
err := api.apiClient.Get("/encoding/filters/azure-speech-to-captions/{filter_id}/customData", nil, &responseModel, reqParams) | ||
return &responseModel, err | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package model | ||
|
||
// AzureSpeechServicesCredentials model | ||
type AzureSpeechServicesCredentials struct { | ||
// Azure Speech Services resource key (required) | ||
SubscriptionKey *string `json:"subscriptionKey,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package model | ||
|
||
import ( | ||
"encoding/json" | ||
) | ||
|
||
// AzureSpeechToCaptionsFilter model | ||
type AzureSpeechToCaptionsFilter struct { | ||
// Id of the resource (required) | ||
Id *string `json:"id,omitempty"` | ||
// Name of the resource. Can be freely chosen by the user. | ||
Name *string `json:"name,omitempty"` | ||
// Description of the resource. Can be freely chosen by the user. | ||
Description *string `json:"description,omitempty"` | ||
// Creation timestamp, returned as UTC expressed in ISO 8601 format: YYYY-MM-DDThh:mm:ssZ | ||
CreatedAt *DateTime `json:"createdAt,omitempty"` | ||
// Modified timestamp, returned as UTC expressed in ISO 8601 format: YYYY-MM-DDThh:mm:ssZ | ||
ModifiedAt *DateTime `json:"modifiedAt,omitempty"` | ||
// User-specific meta data. This can hold anything. | ||
CustomData *map[string]interface{} `json:"customData,omitempty"` | ||
AzureSpeechToCaptionsSettings *AzureSpeechToCaptionsSettings `json:"azureSpeechToCaptionsSettings,omitempty"` | ||
} | ||
|
||
func (m AzureSpeechToCaptionsFilter) FilterType() FilterType { | ||
return FilterType_AZURE_SPEECH_TO_CAPTIONS | ||
} | ||
func (m AzureSpeechToCaptionsFilter) MarshalJSON() ([]byte, error) { | ||
type M AzureSpeechToCaptionsFilter | ||
x := struct { | ||
Type string `json:"type"` | ||
M | ||
}{M: M(m)} | ||
|
||
x.Type = "AZURE_SPEECH_TO_CAPTIONS" | ||
|
||
return json.Marshal(x) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package model | ||
|
||
// AzureSpeechToCaptionsProfanity : AzureSpeechToCaptionsProfanity model | ||
type AzureSpeechToCaptionsProfanity string | ||
|
||
// List of possible AzureSpeechToCaptionsProfanity values | ||
const ( | ||
AzureSpeechToCaptionsProfanity_MASKED AzureSpeechToCaptionsProfanity = "MASKED" | ||
AzureSpeechToCaptionsProfanity_REMOVED AzureSpeechToCaptionsProfanity = "REMOVED" | ||
AzureSpeechToCaptionsProfanity_RAW AzureSpeechToCaptionsProfanity = "RAW" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package model | ||
|
||
// AzureSpeechToCaptionsSettings model | ||
type AzureSpeechToCaptionsSettings struct { | ||
// Credential settings to access Azure Speech Services | ||
AzureSpeechServicesCredentials *AzureSpeechServicesCredentials `json:"azureSpeechServicesCredentials,omitempty"` | ||
// Azure Speech Services Region Identifier. The list of speech service supported regions can be found at Azure's official documentation. | ||
Region *string `json:"region,omitempty"` | ||
// Azure Speech Services API endpoint. This information can be found in Azure's Speech resource data. | ||
ApiEndpoint *string `json:"apiEndpoint,omitempty"` | ||
// Azure Speech to captions supported language (IETF BCP 47 language tag). The list of supported languages can be found at Azure's official documentation. | ||
Language *string `json:"language,omitempty"` | ||
// How many MILLISECONDS to delay the display of each caption, to mimic a real-time experience. The minimum value is 0. | ||
CaptionDelay *int64 `json:"captionDelay,omitempty"` | ||
// How many MILLISECONDS a caption should remain on screen if it is not replaced by another. The minimum value is 0. | ||
CaptionRemainTime *int64 `json:"captionRemainTime,omitempty"` | ||
// The maximum number of characters per line for a caption. The minimum value is 20. | ||
CaptionMaxLineLength *int64 `json:"captionMaxLineLength,omitempty"` | ||
// The number of lines for a caption. The minimum value is 1. | ||
CaptionLines *int64 `json:"captionLines,omitempty"` | ||
// The profanity filter options are: - Masked: Replaces letters in profane words with asterisk (*) characters. - Raw: Include the profane words verbatim. - Removed: Removes profane words. | ||
ProfanityOption AzureSpeechToCaptionsProfanity `json:"profanityOption,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.