mux_ruby 3.5.2 → 3.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +4 -4
- data/docs/CreateLiveStreamRequest.md +2 -0
- data/docs/CreateTranscriptionVocabularyRequest.md +22 -0
- data/docs/ListTranscriptionVocabulariesResponse.md +18 -0
- data/docs/LiveStream.md +3 -1
- data/docs/LiveStreamGeneratedSubtitleSettings.md +24 -0
- data/docs/LiveStreamsApi.md +73 -0
- data/docs/MetricsApi.md +2 -2
- data/docs/SpacesApi.md +1 -1
- data/docs/Track.md +2 -0
- data/docs/TranscriptionVocabulariesApi.md +367 -0
- data/docs/TranscriptionVocabulary.md +28 -0
- data/docs/TranscriptionVocabularyResponse.md +18 -0
- data/docs/UpdateLiveStreamGeneratedSubtitlesRequest.md +18 -0
- data/docs/UpdateTranscriptionVocabularyRequest.md +22 -0
- data/docs/VideoView.md +11 -1
- data/gen/generator-config.json +1 -1
- data/gen/templates/partial_model_generic.mustache +2 -2
- data/lib/mux_ruby/api/live_streams_api.rb +71 -0
- data/lib/mux_ruby/api/metrics_api.rb +2 -2
- data/lib/mux_ruby/api/spaces_api.rb +2 -2
- data/lib/mux_ruby/api/transcription_vocabularies_api.rb +349 -0
- data/lib/mux_ruby/models/create_live_stream_request.rb +18 -6
- data/lib/mux_ruby/models/create_transcription_vocabulary_request.rb +265 -0
- data/lib/mux_ruby/models/list_transcription_vocabularies_response.rb +220 -0
- data/lib/mux_ruby/models/live_stream.rb +14 -2
- data/lib/mux_ruby/models/live_stream_generated_subtitle_settings.rb +287 -0
- data/lib/mux_ruby/models/track.rb +23 -1
- data/lib/mux_ruby/models/transcription_vocabulary.rb +286 -0
- data/lib/mux_ruby/models/transcription_vocabulary_response.rb +218 -0
- data/lib/mux_ruby/models/update_live_stream_generated_subtitles_request.rb +221 -0
- data/lib/mux_ruby/models/update_live_stream_request.rb +5 -5
- data/lib/mux_ruby/models/update_transcription_vocabulary_request.rb +265 -0
- data/lib/mux_ruby/models/video_view.rb +55 -5
- data/lib/mux_ruby/version.rb +1 -1
- data/lib/mux_ruby.rb +8 -0
- data/spec/api/transcription_vocabularies_api_spec.rb +97 -0
- data/spec/models/create_transcription_vocabulary_request_spec.rb +46 -0
- data/spec/models/list_transcription_vocabularies_response_spec.rb +34 -0
- data/spec/models/live_stream_generated_subtitle_settings_spec.rb +56 -0
- data/spec/models/transcription_vocabulary_response_spec.rb +34 -0
- data/spec/models/transcription_vocabulary_spec.rb +64 -0
- data/spec/models/update_live_stream_generated_subtitles_request_spec.rb +34 -0
- data/spec/models/update_transcription_vocabulary_request_spec.rb +46 -0
- metadata +151 -119
@@ -0,0 +1,349 @@
|
|
1
|
+
=begin
|
2
|
+
#Mux API
|
3
|
+
|
4
|
+
#Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v1
|
7
|
+
Contact: devex@mux.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.0.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module MuxRuby
|
16
|
+
class TranscriptionVocabulariesApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create a Transcription Vocabulary
|
23
|
+
# Create a new Transcription Vocabulary.
|
24
|
+
# @param create_transcription_vocabulary_request [CreateTranscriptionVocabularyRequest]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [TranscriptionVocabularyResponse]
|
27
|
+
def create_transcription_vocabulary(create_transcription_vocabulary_request, opts = {})
|
28
|
+
data, _status_code, _headers = create_transcription_vocabulary_with_http_info(create_transcription_vocabulary_request, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Create a Transcription Vocabulary
|
33
|
+
# Create a new Transcription Vocabulary.
|
34
|
+
# @param create_transcription_vocabulary_request [CreateTranscriptionVocabularyRequest]
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(TranscriptionVocabularyResponse, Integer, Hash)>] TranscriptionVocabularyResponse data, response status code and response headers
|
37
|
+
def create_transcription_vocabulary_with_http_info(create_transcription_vocabulary_request, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: TranscriptionVocabulariesApi.create_transcription_vocabulary ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'create_transcription_vocabulary_request' is set
|
42
|
+
if @api_client.config.client_side_validation && create_transcription_vocabulary_request.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'create_transcription_vocabulary_request' when calling TranscriptionVocabulariesApi.create_transcription_vocabulary"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/video/v1/transcription-vocabularies'
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = opts[:query_params] || {}
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = opts[:header_params] || {}
|
53
|
+
# HTTP header 'Accept' (if needed)
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
55
|
+
# HTTP header 'Content-Type'
|
56
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
57
|
+
|
58
|
+
# form parameters
|
59
|
+
form_params = opts[:form_params] || {}
|
60
|
+
|
61
|
+
# http body (model)
|
62
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_transcription_vocabulary_request)
|
63
|
+
|
64
|
+
# return_type
|
65
|
+
return_type = opts[:debug_return_type] || 'TranscriptionVocabularyResponse'
|
66
|
+
|
67
|
+
# auth_names
|
68
|
+
auth_names = opts[:debug_auth_names] || ['accessToken']
|
69
|
+
|
70
|
+
new_options = opts.merge(
|
71
|
+
:operation => :"TranscriptionVocabulariesApi.create_transcription_vocabulary",
|
72
|
+
:header_params => header_params,
|
73
|
+
:query_params => query_params,
|
74
|
+
:form_params => form_params,
|
75
|
+
:body => post_body,
|
76
|
+
:auth_names => auth_names,
|
77
|
+
:return_type => return_type
|
78
|
+
)
|
79
|
+
|
80
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
81
|
+
if @api_client.config.debugging
|
82
|
+
@api_client.config.logger.debug "API called: TranscriptionVocabulariesApi#create_transcription_vocabulary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
83
|
+
end
|
84
|
+
return data, status_code, headers
|
85
|
+
end
|
86
|
+
|
87
|
+
# Delete a Transcription Vocabulary
|
88
|
+
# Deletes a Transcription Vocabulary. The Transcription Vocabulary's ID will be disassociated from any live streams using it. Transcription Vocabularies can be deleted while associated live streams are active. However, the words and phrases in the deleted Transcription Vocabulary will remain attached to those streams while they are active.
|
89
|
+
# @param transcription_vocabulary_id [String] The ID of the Transcription Vocabulary.
|
90
|
+
# @param [Hash] opts the optional parameters
|
91
|
+
# @return [nil]
|
92
|
+
def delete_transcription_vocabulary(transcription_vocabulary_id, opts = {})
|
93
|
+
delete_transcription_vocabulary_with_http_info(transcription_vocabulary_id, opts)
|
94
|
+
nil
|
95
|
+
end
|
96
|
+
|
97
|
+
# Delete a Transcription Vocabulary
|
98
|
+
# Deletes a Transcription Vocabulary. The Transcription Vocabulary's ID will be disassociated from any live streams using it. Transcription Vocabularies can be deleted while associated live streams are active. However, the words and phrases in the deleted Transcription Vocabulary will remain attached to those streams while they are active.
|
99
|
+
# @param transcription_vocabulary_id [String] The ID of the Transcription Vocabulary.
|
100
|
+
# @param [Hash] opts the optional parameters
|
101
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
102
|
+
def delete_transcription_vocabulary_with_http_info(transcription_vocabulary_id, opts = {})
|
103
|
+
if @api_client.config.debugging
|
104
|
+
@api_client.config.logger.debug 'Calling API: TranscriptionVocabulariesApi.delete_transcription_vocabulary ...'
|
105
|
+
end
|
106
|
+
# verify the required parameter 'transcription_vocabulary_id' is set
|
107
|
+
if @api_client.config.client_side_validation && transcription_vocabulary_id.nil?
|
108
|
+
fail ArgumentError, "Missing the required parameter 'transcription_vocabulary_id' when calling TranscriptionVocabulariesApi.delete_transcription_vocabulary"
|
109
|
+
end
|
110
|
+
# resource path
|
111
|
+
local_var_path = '/video/v1/transcription-vocabularies/{TRANSCRIPTION_VOCABULARY_ID}'.sub('{' + 'TRANSCRIPTION_VOCABULARY_ID' + '}', CGI.escape(transcription_vocabulary_id.to_s))
|
112
|
+
|
113
|
+
# query parameters
|
114
|
+
query_params = opts[:query_params] || {}
|
115
|
+
|
116
|
+
# header parameters
|
117
|
+
header_params = opts[:header_params] || {}
|
118
|
+
|
119
|
+
# form parameters
|
120
|
+
form_params = opts[:form_params] || {}
|
121
|
+
|
122
|
+
# http body (model)
|
123
|
+
post_body = opts[:debug_body]
|
124
|
+
|
125
|
+
# return_type
|
126
|
+
return_type = opts[:debug_return_type]
|
127
|
+
|
128
|
+
# auth_names
|
129
|
+
auth_names = opts[:debug_auth_names] || ['accessToken']
|
130
|
+
|
131
|
+
new_options = opts.merge(
|
132
|
+
:operation => :"TranscriptionVocabulariesApi.delete_transcription_vocabulary",
|
133
|
+
:header_params => header_params,
|
134
|
+
:query_params => query_params,
|
135
|
+
:form_params => form_params,
|
136
|
+
:body => post_body,
|
137
|
+
:auth_names => auth_names,
|
138
|
+
:return_type => return_type
|
139
|
+
)
|
140
|
+
|
141
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
142
|
+
if @api_client.config.debugging
|
143
|
+
@api_client.config.logger.debug "API called: TranscriptionVocabulariesApi#delete_transcription_vocabulary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
144
|
+
end
|
145
|
+
return data, status_code, headers
|
146
|
+
end
|
147
|
+
|
148
|
+
# Retrieve a Transcription Vocabulary
|
149
|
+
# Retrieves the details of a Transcription Vocabulary that has previously been created. Supply the unique Transcription Vocabulary ID and Mux will return the corresponding Transcription Vocabulary information. The same information is returned when creating a Transcription Vocabulary.
|
150
|
+
# @param transcription_vocabulary_id [String] The ID of the Transcription Vocabulary.
|
151
|
+
# @param [Hash] opts the optional parameters
|
152
|
+
# @return [TranscriptionVocabularyResponse]
|
153
|
+
def get_transcription_vocabulary(transcription_vocabulary_id, opts = {})
|
154
|
+
data, _status_code, _headers = get_transcription_vocabulary_with_http_info(transcription_vocabulary_id, opts)
|
155
|
+
data
|
156
|
+
end
|
157
|
+
|
158
|
+
# Retrieve a Transcription Vocabulary
|
159
|
+
# Retrieves the details of a Transcription Vocabulary that has previously been created. Supply the unique Transcription Vocabulary ID and Mux will return the corresponding Transcription Vocabulary information. The same information is returned when creating a Transcription Vocabulary.
|
160
|
+
# @param transcription_vocabulary_id [String] The ID of the Transcription Vocabulary.
|
161
|
+
# @param [Hash] opts the optional parameters
|
162
|
+
# @return [Array<(TranscriptionVocabularyResponse, Integer, Hash)>] TranscriptionVocabularyResponse data, response status code and response headers
|
163
|
+
def get_transcription_vocabulary_with_http_info(transcription_vocabulary_id, opts = {})
|
164
|
+
if @api_client.config.debugging
|
165
|
+
@api_client.config.logger.debug 'Calling API: TranscriptionVocabulariesApi.get_transcription_vocabulary ...'
|
166
|
+
end
|
167
|
+
# verify the required parameter 'transcription_vocabulary_id' is set
|
168
|
+
if @api_client.config.client_side_validation && transcription_vocabulary_id.nil?
|
169
|
+
fail ArgumentError, "Missing the required parameter 'transcription_vocabulary_id' when calling TranscriptionVocabulariesApi.get_transcription_vocabulary"
|
170
|
+
end
|
171
|
+
# resource path
|
172
|
+
local_var_path = '/video/v1/transcription-vocabularies/{TRANSCRIPTION_VOCABULARY_ID}'.sub('{' + 'TRANSCRIPTION_VOCABULARY_ID' + '}', CGI.escape(transcription_vocabulary_id.to_s))
|
173
|
+
|
174
|
+
# query parameters
|
175
|
+
query_params = opts[:query_params] || {}
|
176
|
+
|
177
|
+
# header parameters
|
178
|
+
header_params = opts[:header_params] || {}
|
179
|
+
# HTTP header 'Accept' (if needed)
|
180
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
181
|
+
|
182
|
+
# form parameters
|
183
|
+
form_params = opts[:form_params] || {}
|
184
|
+
|
185
|
+
# http body (model)
|
186
|
+
post_body = opts[:debug_body]
|
187
|
+
|
188
|
+
# return_type
|
189
|
+
return_type = opts[:debug_return_type] || 'TranscriptionVocabularyResponse'
|
190
|
+
|
191
|
+
# auth_names
|
192
|
+
auth_names = opts[:debug_auth_names] || ['accessToken']
|
193
|
+
|
194
|
+
new_options = opts.merge(
|
195
|
+
:operation => :"TranscriptionVocabulariesApi.get_transcription_vocabulary",
|
196
|
+
:header_params => header_params,
|
197
|
+
:query_params => query_params,
|
198
|
+
:form_params => form_params,
|
199
|
+
:body => post_body,
|
200
|
+
:auth_names => auth_names,
|
201
|
+
:return_type => return_type
|
202
|
+
)
|
203
|
+
|
204
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
205
|
+
if @api_client.config.debugging
|
206
|
+
@api_client.config.logger.debug "API called: TranscriptionVocabulariesApi#get_transcription_vocabulary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
207
|
+
end
|
208
|
+
return data, status_code, headers
|
209
|
+
end
|
210
|
+
|
211
|
+
# List Transcription Vocabularies
|
212
|
+
# List all Transcription Vocabularies.
|
213
|
+
# @param [Hash] opts the optional parameters
|
214
|
+
# @option opts [Integer] :limit Number of items to include in the response (default to 10)
|
215
|
+
# @option opts [Integer] :page Offset by this many pages, of the size of `limit` (default to 1)
|
216
|
+
# @return [ListTranscriptionVocabulariesResponse]
|
217
|
+
def list_transcription_vocabularies(opts = {})
|
218
|
+
data, _status_code, _headers = list_transcription_vocabularies_with_http_info(opts)
|
219
|
+
data
|
220
|
+
end
|
221
|
+
|
222
|
+
# List Transcription Vocabularies
|
223
|
+
# List all Transcription Vocabularies.
|
224
|
+
# @param [Hash] opts the optional parameters
|
225
|
+
# @option opts [Integer] :limit Number of items to include in the response
|
226
|
+
# @option opts [Integer] :page Offset by this many pages, of the size of `limit`
|
227
|
+
# @return [Array<(ListTranscriptionVocabulariesResponse, Integer, Hash)>] ListTranscriptionVocabulariesResponse data, response status code and response headers
|
228
|
+
def list_transcription_vocabularies_with_http_info(opts = {})
|
229
|
+
if @api_client.config.debugging
|
230
|
+
@api_client.config.logger.debug 'Calling API: TranscriptionVocabulariesApi.list_transcription_vocabularies ...'
|
231
|
+
end
|
232
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 10
|
233
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TranscriptionVocabulariesApi.list_transcription_vocabularies, must be smaller than or equal to 10.'
|
234
|
+
end
|
235
|
+
|
236
|
+
# resource path
|
237
|
+
local_var_path = '/video/v1/transcription-vocabularies'
|
238
|
+
|
239
|
+
# query parameters
|
240
|
+
query_params = opts[:query_params] || {}
|
241
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
242
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
243
|
+
|
244
|
+
# header parameters
|
245
|
+
header_params = opts[:header_params] || {}
|
246
|
+
# HTTP header 'Accept' (if needed)
|
247
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
248
|
+
|
249
|
+
# form parameters
|
250
|
+
form_params = opts[:form_params] || {}
|
251
|
+
|
252
|
+
# http body (model)
|
253
|
+
post_body = opts[:debug_body]
|
254
|
+
|
255
|
+
# return_type
|
256
|
+
return_type = opts[:debug_return_type] || 'ListTranscriptionVocabulariesResponse'
|
257
|
+
|
258
|
+
# auth_names
|
259
|
+
auth_names = opts[:debug_auth_names] || ['accessToken']
|
260
|
+
|
261
|
+
new_options = opts.merge(
|
262
|
+
:operation => :"TranscriptionVocabulariesApi.list_transcription_vocabularies",
|
263
|
+
:header_params => header_params,
|
264
|
+
:query_params => query_params,
|
265
|
+
:form_params => form_params,
|
266
|
+
:body => post_body,
|
267
|
+
:auth_names => auth_names,
|
268
|
+
:return_type => return_type
|
269
|
+
)
|
270
|
+
|
271
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
272
|
+
if @api_client.config.debugging
|
273
|
+
@api_client.config.logger.debug "API called: TranscriptionVocabulariesApi#list_transcription_vocabularies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
274
|
+
end
|
275
|
+
return data, status_code, headers
|
276
|
+
end
|
277
|
+
|
278
|
+
# Update a Transcription Vocabulary
|
279
|
+
# Updates the details of a previously-created Transcription Vocabulary. Updates to Transcription Vocabularies are allowed while associated live streams are active. However, updates will not be applied to those streams while they are active.
|
280
|
+
# @param transcription_vocabulary_id [String] The ID of the Transcription Vocabulary.
|
281
|
+
# @param update_transcription_vocabulary_request [UpdateTranscriptionVocabularyRequest]
|
282
|
+
# @param [Hash] opts the optional parameters
|
283
|
+
# @return [TranscriptionVocabularyResponse]
|
284
|
+
def update_transcription_vocabulary(transcription_vocabulary_id, update_transcription_vocabulary_request, opts = {})
|
285
|
+
data, _status_code, _headers = update_transcription_vocabulary_with_http_info(transcription_vocabulary_id, update_transcription_vocabulary_request, opts)
|
286
|
+
data
|
287
|
+
end
|
288
|
+
|
289
|
+
# Update a Transcription Vocabulary
|
290
|
+
# Updates the details of a previously-created Transcription Vocabulary. Updates to Transcription Vocabularies are allowed while associated live streams are active. However, updates will not be applied to those streams while they are active.
|
291
|
+
# @param transcription_vocabulary_id [String] The ID of the Transcription Vocabulary.
|
292
|
+
# @param update_transcription_vocabulary_request [UpdateTranscriptionVocabularyRequest]
|
293
|
+
# @param [Hash] opts the optional parameters
|
294
|
+
# @return [Array<(TranscriptionVocabularyResponse, Integer, Hash)>] TranscriptionVocabularyResponse data, response status code and response headers
|
295
|
+
def update_transcription_vocabulary_with_http_info(transcription_vocabulary_id, update_transcription_vocabulary_request, opts = {})
|
296
|
+
if @api_client.config.debugging
|
297
|
+
@api_client.config.logger.debug 'Calling API: TranscriptionVocabulariesApi.update_transcription_vocabulary ...'
|
298
|
+
end
|
299
|
+
# verify the required parameter 'transcription_vocabulary_id' is set
|
300
|
+
if @api_client.config.client_side_validation && transcription_vocabulary_id.nil?
|
301
|
+
fail ArgumentError, "Missing the required parameter 'transcription_vocabulary_id' when calling TranscriptionVocabulariesApi.update_transcription_vocabulary"
|
302
|
+
end
|
303
|
+
# verify the required parameter 'update_transcription_vocabulary_request' is set
|
304
|
+
if @api_client.config.client_side_validation && update_transcription_vocabulary_request.nil?
|
305
|
+
fail ArgumentError, "Missing the required parameter 'update_transcription_vocabulary_request' when calling TranscriptionVocabulariesApi.update_transcription_vocabulary"
|
306
|
+
end
|
307
|
+
# resource path
|
308
|
+
local_var_path = '/video/v1/transcription-vocabularies/{TRANSCRIPTION_VOCABULARY_ID}'.sub('{' + 'TRANSCRIPTION_VOCABULARY_ID' + '}', CGI.escape(transcription_vocabulary_id.to_s))
|
309
|
+
|
310
|
+
# query parameters
|
311
|
+
query_params = opts[:query_params] || {}
|
312
|
+
|
313
|
+
# header parameters
|
314
|
+
header_params = opts[:header_params] || {}
|
315
|
+
# HTTP header 'Accept' (if needed)
|
316
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
317
|
+
# HTTP header 'Content-Type'
|
318
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
319
|
+
|
320
|
+
# form parameters
|
321
|
+
form_params = opts[:form_params] || {}
|
322
|
+
|
323
|
+
# http body (model)
|
324
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_transcription_vocabulary_request)
|
325
|
+
|
326
|
+
# return_type
|
327
|
+
return_type = opts[:debug_return_type] || 'TranscriptionVocabularyResponse'
|
328
|
+
|
329
|
+
# auth_names
|
330
|
+
auth_names = opts[:debug_auth_names] || ['accessToken']
|
331
|
+
|
332
|
+
new_options = opts.merge(
|
333
|
+
:operation => :"TranscriptionVocabulariesApi.update_transcription_vocabulary",
|
334
|
+
:header_params => header_params,
|
335
|
+
:query_params => query_params,
|
336
|
+
:form_params => form_params,
|
337
|
+
:body => post_body,
|
338
|
+
:auth_names => auth_names,
|
339
|
+
:return_type => return_type
|
340
|
+
)
|
341
|
+
|
342
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
343
|
+
if @api_client.config.debugging
|
344
|
+
@api_client.config.logger.debug "API called: TranscriptionVocabulariesApi#update_transcription_vocabulary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
345
|
+
end
|
346
|
+
return data, status_code, headers
|
347
|
+
end
|
348
|
+
end
|
349
|
+
end
|
@@ -30,6 +30,9 @@ module MuxRuby
|
|
30
30
|
# Describe the embedded closed caption contents of the incoming live stream.
|
31
31
|
attr_accessor :embedded_subtitles
|
32
32
|
|
33
|
+
# Configure the incoming live stream to include subtitles created with automatic speech recognition. Each Asset created from a live stream with `generated_subtitles` configured will automatically receive two text tracks. The first of these will have a `text_source` value of `generated_live`, and will be available with `ready` status as soon as the stream is live. The second text track will have a `text_source` value of `generated_live_final` and will contain subtitles with improved accuracy, timing, and formatting. However, `generated_live_final` tracks will not be available in `ready` status until the live stream ends. If an Asset has both `generated_live` and `generated_live_final` tracks that are `ready`, then only the `generated_live_final` track will be included during playback.
|
34
|
+
attr_accessor :generated_subtitles
|
35
|
+
|
33
36
|
# This field is deprecated. Please use latency_mode instead. Latency is the time from when the streamer transmits a frame of video to when you see it in the player. Set this if you want lower latency for your live stream. Note: Reconnect windows are incompatible with Reduced Latency and will always be set to zero (0) seconds. Read more here: https://mux.com/blog/reduced-latency-for-mux-live-streaming-now-available/
|
34
37
|
attr_accessor :reduced_latency
|
35
38
|
|
@@ -78,6 +81,7 @@ module MuxRuby
|
|
78
81
|
:'passthrough' => :'passthrough',
|
79
82
|
:'audio_only' => :'audio_only',
|
80
83
|
:'embedded_subtitles' => :'embedded_subtitles',
|
84
|
+
:'generated_subtitles' => :'generated_subtitles',
|
81
85
|
:'reduced_latency' => :'reduced_latency',
|
82
86
|
:'low_latency' => :'low_latency',
|
83
87
|
:'latency_mode' => :'latency_mode',
|
@@ -101,6 +105,7 @@ module MuxRuby
|
|
101
105
|
:'passthrough' => :'String',
|
102
106
|
:'audio_only' => :'Boolean',
|
103
107
|
:'embedded_subtitles' => :'Array<LiveStreamEmbeddedSubtitleSettings>',
|
108
|
+
:'generated_subtitles' => :'Array<LiveStreamGeneratedSubtitleSettings>',
|
104
109
|
:'reduced_latency' => :'Boolean',
|
105
110
|
:'low_latency' => :'Boolean',
|
106
111
|
:'latency_mode' => :'String',
|
@@ -159,6 +164,12 @@ module MuxRuby
|
|
159
164
|
end
|
160
165
|
end
|
161
166
|
|
167
|
+
if attributes.key?(:'generated_subtitles')
|
168
|
+
if (value = attributes[:'generated_subtitles']).is_a?(Array)
|
169
|
+
self.generated_subtitles = value
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
162
173
|
if attributes.key?(:'reduced_latency')
|
163
174
|
self.reduced_latency = attributes[:'reduced_latency']
|
164
175
|
end
|
@@ -192,8 +203,8 @@ module MuxRuby
|
|
192
203
|
# @return Array for valid properties with the reasons
|
193
204
|
def list_invalid_properties
|
194
205
|
invalid_properties = Array.new
|
195
|
-
if !@reconnect_window.nil? && @reconnect_window >
|
196
|
-
invalid_properties.push('invalid value for "reconnect_window", must be smaller than or equal to
|
206
|
+
if !@reconnect_window.nil? && @reconnect_window > 1800
|
207
|
+
invalid_properties.push('invalid value for "reconnect_window", must be smaller than or equal to 1800.')
|
197
208
|
end
|
198
209
|
|
199
210
|
if !@reconnect_window.nil? && @reconnect_window < 0.1
|
@@ -214,7 +225,7 @@ module MuxRuby
|
|
214
225
|
# Check to see if the all the properties in the model are valid
|
215
226
|
# @return true if the model is valid
|
216
227
|
def valid?
|
217
|
-
return false if !@reconnect_window.nil? && @reconnect_window >
|
228
|
+
return false if !@reconnect_window.nil? && @reconnect_window > 1800
|
218
229
|
return false if !@reconnect_window.nil? && @reconnect_window < 0.1
|
219
230
|
latency_mode_validator = EnumAttributeValidator.new('String', ["low", "reduced", "standard"])
|
220
231
|
return false unless latency_mode_validator.valid?(@latency_mode)
|
@@ -226,8 +237,8 @@ module MuxRuby
|
|
226
237
|
# Custom attribute writer method with validation
|
227
238
|
# @param [Object] reconnect_window Value to be assigned
|
228
239
|
def reconnect_window=(reconnect_window)
|
229
|
-
if !reconnect_window.nil? && reconnect_window >
|
230
|
-
fail ArgumentError, 'invalid value for "reconnect_window", must be smaller than or equal to
|
240
|
+
if !reconnect_window.nil? && reconnect_window > 1800
|
241
|
+
fail ArgumentError, 'invalid value for "reconnect_window", must be smaller than or equal to 1800.'
|
231
242
|
end
|
232
243
|
|
233
244
|
if !reconnect_window.nil? && reconnect_window < 0.1
|
@@ -272,6 +283,7 @@ module MuxRuby
|
|
272
283
|
passthrough == o.passthrough &&
|
273
284
|
audio_only == o.audio_only &&
|
274
285
|
embedded_subtitles == o.embedded_subtitles &&
|
286
|
+
generated_subtitles == o.generated_subtitles &&
|
275
287
|
reduced_latency == o.reduced_latency &&
|
276
288
|
low_latency == o.low_latency &&
|
277
289
|
latency_mode == o.latency_mode &&
|
@@ -289,7 +301,7 @@ module MuxRuby
|
|
289
301
|
# Calculates hash code according to all attributes.
|
290
302
|
# @return [Integer] Hash code
|
291
303
|
def hash
|
292
|
-
[playback_policy, new_asset_settings, reconnect_window, passthrough, audio_only, embedded_subtitles, reduced_latency, low_latency, latency_mode, test, simulcast_targets, max_continuous_duration].hash
|
304
|
+
[playback_policy, new_asset_settings, reconnect_window, passthrough, audio_only, embedded_subtitles, generated_subtitles, reduced_latency, low_latency, latency_mode, test, simulcast_targets, max_continuous_duration].hash
|
293
305
|
end
|
294
306
|
|
295
307
|
# Builds the object from hash
|