tencentcloud-sdk-ams 1.0.200

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1055 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ module TencentCloud
18
+ module Ams
19
+ module V20201229
20
+ # 音频审核输出参数
21
+ class AudioResult < TencentCloud::Common::AbstractModel
22
+ # @param HitFlag: 该字段用于返回审核内容是否命中审核模型;取值:0(**未命中**)、1(**命中**)。
23
+ # 注意:此字段可能返回 null,表示取不到有效值。
24
+ # @type HitFlag: Integer
25
+ # @param Label: 该字段用于返回检测结果所对应的恶意标签。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad**:广告,**Custom**:自定义违规;以及其他令人反感、不安全或不适宜的内容类型。
26
+ # 注意:此字段可能返回 null,表示取不到有效值。
27
+ # @type Label: String
28
+ # @param Suggestion: 该字段用于返回后续操作建议。当您获取到判定结果后,返回值表示具体的后续建议操作。<br>
29
+ # 返回值:**Block**:建议屏蔽,**Review** :建议人工复审,**Pass**:建议通过
30
+ # 注意:此字段可能返回 null,表示取不到有效值。
31
+ # @type Suggestion: String
32
+ # @param Score: 该字段用于返回当前标签下的置信度,取值范围:0(**置信度最低**)-100(**置信度最高** ),越高代表文本越有可能属于当前返回的标签;如:*色情 99*,则表明该文本非常有可能属于色情内容。
33
+ # 注意:此字段可能返回 null,表示取不到有效值。
34
+ # @type Score: Integer
35
+ # @param Text: 该字段用于返回音频文件经ASR识别后的文本信息。最长可识别**5小时**的音频文件,若超出时长限制,接口将会报错。
36
+ # 注意:此字段可能返回 null,表示取不到有效值。
37
+ # @type Text: String
38
+ # @param Url: 该字段用于返回音频片段存储的链接地址,该地址有效期为1天。
39
+ # 注意:此字段可能返回 null,表示取不到有效值。
40
+ # @type Url: String
41
+ # @param Duration: 该字段用于返回音频文件的时长,单位为秒。
42
+ # @type Duration: String
43
+ # @param Extra: 该字段用于返回额外附加信息,不同客户或Biztype下返回信息不同。
44
+ # @type Extra: String
45
+ # @param TextResults: 该字段用于返回音频文件经ASR识别后产生的文本的详细审核结果。具体结果内容请参见AudioResultDetailLanguageResult数据结构的细节描述。
46
+ # @type TextResults: Array
47
+ # @param MoanResults: 该字段用于返回音频文件呻吟检测的详细审核结果。具体结果内容请参见AudioResultDetailMoanResult数据结构的细节描述。
48
+ # @type MoanResults: Array
49
+ # @param LanguageResults: 该字段用于返回音频小语种检测的详细审核结果。具体结果内容请参见AudioResultDetailLanguageResult数据结构的细节描述。
50
+ # @type LanguageResults: Array
51
+
52
+ attr_accessor :HitFlag, :Label, :Suggestion, :Score, :Text, :Url, :Duration, :Extra, :TextResults, :MoanResults, :LanguageResults
53
+
54
+ def initialize(hitflag=nil, label=nil, suggestion=nil, score=nil, text=nil, url=nil, duration=nil, extra=nil, textresults=nil, moanresults=nil, languageresults=nil)
55
+ @HitFlag = hitflag
56
+ @Label = label
57
+ @Suggestion = suggestion
58
+ @Score = score
59
+ @Text = text
60
+ @Url = url
61
+ @Duration = duration
62
+ @Extra = extra
63
+ @TextResults = textresults
64
+ @MoanResults = moanresults
65
+ @LanguageResults = languageresults
66
+ end
67
+
68
+ def deserialize(params)
69
+ @HitFlag = params['HitFlag']
70
+ @Label = params['Label']
71
+ @Suggestion = params['Suggestion']
72
+ @Score = params['Score']
73
+ @Text = params['Text']
74
+ @Url = params['Url']
75
+ @Duration = params['Duration']
76
+ @Extra = params['Extra']
77
+ unless params['TextResults'].nil?
78
+ @TextResults = []
79
+ params['TextResults'].each do |i|
80
+ audioresultdetailtextresult_tmp = AudioResultDetailTextResult.new
81
+ audioresultdetailtextresult_tmp.deserialize(i)
82
+ @TextResults << audioresultdetailtextresult_tmp
83
+ end
84
+ end
85
+ unless params['MoanResults'].nil?
86
+ @MoanResults = []
87
+ params['MoanResults'].each do |i|
88
+ audioresultdetailmoanresult_tmp = AudioResultDetailMoanResult.new
89
+ audioresultdetailmoanresult_tmp.deserialize(i)
90
+ @MoanResults << audioresultdetailmoanresult_tmp
91
+ end
92
+ end
93
+ unless params['LanguageResults'].nil?
94
+ @LanguageResults = []
95
+ params['LanguageResults'].each do |i|
96
+ audioresultdetaillanguageresult_tmp = AudioResultDetailLanguageResult.new
97
+ audioresultdetaillanguageresult_tmp.deserialize(i)
98
+ @LanguageResults << audioresultdetaillanguageresult_tmp
99
+ end
100
+ end
101
+ end
102
+ end
103
+
104
+ # 音频语言种类检测结果
105
+ class AudioResultDetailLanguageResult < TencentCloud::Common::AbstractModel
106
+ # @param Label: 该字段用于返回对应的语言种类信息。
107
+ # 注意:此字段可能返回 null,表示取不到有效值。
108
+ # @type Label: String
109
+ # @param Score: 该参数用于返回当前标签下的置信度,取值范围:0(**置信度最低**)-100(**置信度最高**),越高代表音频越有可能属于当前返回的语种标签;
110
+ # 注意:此字段可能返回 null,表示取不到有效值。
111
+ # @type Score: Integer
112
+ # @param StartTime: 该参数用于返回对应语种标签的片段在音频文件内的开始时间,单位为毫秒。
113
+ # 注意:此字段可能返回 null,表示取不到有效值。
114
+ # @type StartTime: Float
115
+ # @param EndTime: 该参数用于返回对应语种标签的片段在音频文件内的结束时间,单位为毫秒。
116
+ # 注意:此字段可能返回 null,表示取不到有效值。
117
+ # @type EndTime: Float
118
+ # @param SubLabelCode: *内测中,敬请期待*
119
+ # 注意:此字段可能返回 null,表示取不到有效值。
120
+ # @type SubLabelCode: String
121
+
122
+ attr_accessor :Label, :Score, :StartTime, :EndTime, :SubLabelCode
123
+
124
+ def initialize(label=nil, score=nil, starttime=nil, endtime=nil, sublabelcode=nil)
125
+ @Label = label
126
+ @Score = score
127
+ @StartTime = starttime
128
+ @EndTime = endtime
129
+ @SubLabelCode = sublabelcode
130
+ end
131
+
132
+ def deserialize(params)
133
+ @Label = params['Label']
134
+ @Score = params['Score']
135
+ @StartTime = params['StartTime']
136
+ @EndTime = params['EndTime']
137
+ @SubLabelCode = params['SubLabelCode']
138
+ end
139
+ end
140
+
141
+ # 音频呻吟审核结果
142
+ class AudioResultDetailMoanResult < TencentCloud::Common::AbstractModel
143
+ # @param Label: 该字段用于返回检测结果需要检测的内容类型,此处固定为**Moan**(呻吟)以调用呻吟检测功能。
144
+ # 注意:此字段可能返回 null,表示取不到有效值。
145
+ # @type Label: String
146
+ # @param Score: 该字段用于返回呻吟检测的置信度,取值范围:0(**置信度最低**)-100(**置信度最高**),越高代表音频越有可能属于呻吟内容。
147
+ # @type Score: Integer
148
+ # @param StartTime: 该字段用于返回对应呻吟标签的片段在音频文件内的开始时间,单位为毫秒。
149
+ # @type StartTime: Float
150
+ # @param EndTime: 该字段用于返回对应呻吟标签的片段在音频文件内的结束时间,单位为毫秒。
151
+ # @type EndTime: Float
152
+ # @param SubLabelCode: *内测中,敬请期待*
153
+ # @type SubLabelCode: String
154
+
155
+ attr_accessor :Label, :Score, :StartTime, :EndTime, :SubLabelCode
156
+
157
+ def initialize(label=nil, score=nil, starttime=nil, endtime=nil, sublabelcode=nil)
158
+ @Label = label
159
+ @Score = score
160
+ @StartTime = starttime
161
+ @EndTime = endtime
162
+ @SubLabelCode = sublabelcode
163
+ end
164
+
165
+ def deserialize(params)
166
+ @Label = params['Label']
167
+ @Score = params['Score']
168
+ @StartTime = params['StartTime']
169
+ @EndTime = params['EndTime']
170
+ @SubLabelCode = params['SubLabelCode']
171
+ end
172
+ end
173
+
174
+ # 音频ASR文本审核结果
175
+ class AudioResultDetailTextResult < TencentCloud::Common::AbstractModel
176
+ # @param Label: 该字段用于返回检测结果所对应的恶意标签。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad**:广告,**Custom**:自定义违规;以及其他令人反感、不安全或不适宜的内容类型。
177
+ # 注意:此字段可能返回 null,表示取不到有效值。
178
+ # @type Label: String
179
+ # @param Keywords: 该字段用于返回ASR识别出的文本内容命中的关键词信息,用于标注内容违规的具体原因(如:加我微信)。该参数可能会有多个返回值,代表命中的多个关键词;若返回值为空,Score不为空,则代表识别结果所对应的恶意标签(Label)来自于语义模型判断的返回值。
180
+ # 注意:此字段可能返回 null,表示取不到有效值。
181
+ # @type Keywords: Array
182
+ # @param LibId: 该字段**仅当Label为Custom:自定义关键词时该参数有效**,用于返回自定义库的ID,以方便自定义库管理和配置。
183
+ # 注意:此字段可能返回 null,表示取不到有效值。
184
+ # @type LibId: String
185
+ # @param LibName: 该字段**仅当Label为Custom:自定义关键词时该参数有效**,用于返回自定义库的名称,以方便自定义库管理和配置。
186
+ # 注意:此字段可能返回 null,表示取不到有效值。
187
+ # @type LibName: String
188
+ # @param Score: 该字段用于返回当前标签下的置信度,取值范围:0(**置信度最低**)-100(**置信度最高**),越高代表文本越有可能属于当前返回的标签;如:*色情 99*,则表明该文本非常有可能属于色情内容。
189
+ # 注意:此字段可能返回 null,表示取不到有效值。
190
+ # @type Score: Integer
191
+ # @param Suggestion: 该字段用于返回后续操作建议。当您获取到判定结果后,返回值表示具体的后续建议操作。<br>
192
+ # 返回值:**Block**:建议屏蔽,**Review** :建议人工复审,**Pass**:建议通过
193
+ # 注意:此字段可能返回 null,表示取不到有效值。
194
+ # @type Suggestion: String
195
+ # @param LibType: 该字段用于返回自定义关键词对应的词库类型,取值为**1**(黑白库)和**2**(自定义关键词库),若未配置自定义关键词库,则默认值为1(黑白库匹配)。
196
+ # @type LibType: Integer
197
+
198
+ attr_accessor :Label, :Keywords, :LibId, :LibName, :Score, :Suggestion, :LibType
199
+
200
+ def initialize(label=nil, keywords=nil, libid=nil, libname=nil, score=nil, suggestion=nil, libtype=nil)
201
+ @Label = label
202
+ @Keywords = keywords
203
+ @LibId = libid
204
+ @LibName = libname
205
+ @Score = score
206
+ @Suggestion = suggestion
207
+ @LibType = libtype
208
+ end
209
+
210
+ def deserialize(params)
211
+ @Label = params['Label']
212
+ @Keywords = params['Keywords']
213
+ @LibId = params['LibId']
214
+ @LibName = params['LibName']
215
+ @Score = params['Score']
216
+ @Suggestion = params['Suggestion']
217
+ @LibType = params['LibType']
218
+ end
219
+ end
220
+
221
+ # 表示声音段信息
222
+ class AudioSegments < TencentCloud::Common::AbstractModel
223
+ # @param OffsetTime: 该字段用于返回音频片段的开始时间,单位为秒。对于点播文件,该参数代表对应音频相对于完整音轨的偏移时间,如0(代表不偏移),5(音轨开始后5秒),10(音轨开始后10秒);对于直播文件,该参数则返回对应音频片段开始时的Unix时间戳,如:1594650717。
224
+ # 注意:此字段可能返回 null,表示取不到有效值。
225
+ # @type OffsetTime: String
226
+ # @param Result: 该字段用于返回音频片段的具体审核结果,详细内容敬请参考AudioResult数据结构的描述。
227
+ # 注意:此字段可能返回 null,表示取不到有效值。
228
+ # @type Result: :class:`Tencentcloud::Ams.v20201229.models.AudioResult`
229
+
230
+ attr_accessor :OffsetTime, :Result
231
+
232
+ def initialize(offsettime=nil, result=nil)
233
+ @OffsetTime = offsettime
234
+ @Result = result
235
+ end
236
+
237
+ def deserialize(params)
238
+ @OffsetTime = params['OffsetTime']
239
+ unless params['Result'].nil?
240
+ @Result = AudioResult.new
241
+ @Result.deserialize(params['Result'])
242
+ end
243
+ end
244
+ end
245
+
246
+ # 文件桶信息
247
+ # 参考腾讯云存储相关说明 https://cloud.tencent.com/document/product/436/44352
248
+ class BucketInfo < TencentCloud::Common::AbstractModel
249
+ # @param Bucket: 该字段用于标识腾讯云对象存储的存储桶名称,关于文件桶的详细信息敬请参考 [腾讯云存储相关说明](https://cloud.tencent.com/document/product/436/44352)。
250
+ # @type Bucket: String
251
+ # @param Region: 该字段用于标识腾讯云对象存储的托管机房的分布地区,对象存储 COS 的数据存放在这些地域的存储桶中。
252
+ # @type Region: String
253
+ # @param Object: 该字段用于标识腾讯云对象存储的对象Key,对象z作为基本单元被存放在存储桶中;用户可以通过腾讯云控制台、API、SDK 等多种方式管理对象。有关对象的详细描述敬请参阅相应 [产品文档](https://cloud.tencent.com/document/product/436/13324)。
254
+ # @type Object: String
255
+
256
+ attr_accessor :Bucket, :Region, :Object
257
+
258
+ def initialize(bucket=nil, region=nil, object=nil)
259
+ @Bucket = bucket
260
+ @Region = region
261
+ @Object = object
262
+ end
263
+
264
+ def deserialize(params)
265
+ @Bucket = params['Bucket']
266
+ @Region = params['Region']
267
+ @Object = params['Object']
268
+ end
269
+ end
270
+
271
+ # CancelTask请求参数结构体
272
+ class CancelTaskRequest < TencentCloud::Common::AbstractModel
273
+ # @param TaskId: 该字段表示创建音频审核任务后返回的任务ID(在Results参数中),用于标识需要取消的审核任务。
274
+ # @type TaskId: String
275
+
276
+ attr_accessor :TaskId
277
+
278
+ def initialize(taskid=nil)
279
+ @TaskId = taskid
280
+ end
281
+
282
+ def deserialize(params)
283
+ @TaskId = params['TaskId']
284
+ end
285
+ end
286
+
287
+ # CancelTask返回参数结构体
288
+ class CancelTaskResponse < TencentCloud::Common::AbstractModel
289
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
290
+ # @type RequestId: String
291
+
292
+ attr_accessor :RequestId
293
+
294
+ def initialize(requestid=nil)
295
+ @RequestId = requestid
296
+ end
297
+
298
+ def deserialize(params)
299
+ @RequestId = params['RequestId']
300
+ end
301
+ end
302
+
303
+ # CreateAudioModerationSyncTask请求参数结构体
304
+ class CreateAudioModerationSyncTaskRequest < TencentCloud::Common::AbstractModel
305
+ # @param BizType: Biztype为策略的具体的编号,用于接口调度,在内容安全控制台中可配置。不同Biztype关联不同的业务场景与识别能力策略,调用前请确认正确的Biztype。Biztype仅为数字、字母与下划线的组合,长度为3-32个字符;调用时不传入Biztype代表采用默认的识别策略。
306
+ # @type BizType: String
307
+ # @param DataId: 数据标识,可以由英文字母、数字、下划线、-、@#组成,不超过64个字符
308
+ # @type DataId: String
309
+ # @param FileFormat: 音频文件资源格式,当前为mp3,wav,请按照实际文件格式填入
310
+ # @type FileFormat: String
311
+ # @param Name: 文件名称,可以由英文字母、数字、下划线、-、@#组成,不超过64个字符
312
+ # @type Name: String
313
+ # @param FileContent: 数据Base64编码,短音频同步接口仅传入可音频内容;
314
+ # 支持范围:文件大小不能超过5M,时长不可超过60s,码率范围为8-16Kbps;
315
+ # 支持格式:wav、mp3
316
+ # @type FileContent: String
317
+ # @param FileUrl: 音频资源访问链接,与FileContent参数必须二选一输入;
318
+ # 支持范围:同FileContent;
319
+ # @type FileUrl: String
320
+
321
+ attr_accessor :BizType, :DataId, :FileFormat, :Name, :FileContent, :FileUrl
322
+
323
+ def initialize(biztype=nil, dataid=nil, fileformat=nil, name=nil, filecontent=nil, fileurl=nil)
324
+ @BizType = biztype
325
+ @DataId = dataid
326
+ @FileFormat = fileformat
327
+ @Name = name
328
+ @FileContent = filecontent
329
+ @FileUrl = fileurl
330
+ end
331
+
332
+ def deserialize(params)
333
+ @BizType = params['BizType']
334
+ @DataId = params['DataId']
335
+ @FileFormat = params['FileFormat']
336
+ @Name = params['Name']
337
+ @FileContent = params['FileContent']
338
+ @FileUrl = params['FileUrl']
339
+ end
340
+ end
341
+
342
+ # CreateAudioModerationSyncTask返回参数结构体
343
+ class CreateAudioModerationSyncTaskResponse < TencentCloud::Common::AbstractModel
344
+ # @param DataId: 请求接口时传入的数据标识
345
+ # @type DataId: String
346
+ # @param Name: 文件名称,可以由英文字母、数字、下划线、-、@#组成,不超过64个字符
347
+ # 注意:此字段可能返回 null,表示取不到有效值。
348
+ # @type Name: String
349
+ # @param BizType: Biztype为策略的具体的编号,用于接口调度,在内容安全控制台中可配置。不同Biztype关联不同的业务场景与识别能力策略,调用前请确认正确的Biztype。Biztype仅为数字、字母与下划线的组合,长度为3-32个字符;调用时不传入Biztype代表采用默认的识别策略。
350
+ # @type BizType: String
351
+ # @param Suggestion: 智能审核服务对于内容违规类型的等级,可选值:
352
+ # Pass 建议通过;
353
+ # Reveiw 建议复审;
354
+ # Block 建议屏蔽;
355
+ # 注意:此字段可能返回 null,表示取不到有效值。
356
+ # @type Suggestion: String
357
+ # @param Label: 智能审核服务对于内容违规类型的判断,详见返回值列表
358
+ # 如:Label:Porn(色情);
359
+ # 注意:此字段可能返回 null,表示取不到有效值。
360
+ # @type Label: String
361
+ # @param AsrText: 音频文本,备注:这里的文本最大只返回前1000个字符
362
+ # 注意:此字段可能返回 null,表示取不到有效值。
363
+ # @type AsrText: String
364
+ # @param TextResults: 音频中对话内容审核结果;
365
+ # 注意:此字段可能返回 null,表示取不到有效值。
366
+ # @type TextResults: Array
367
+ # @param MoanResults: 音频中低俗内容审核结果;
368
+ # 注意:此字段可能返回 null,表示取不到有效值。
369
+ # @type MoanResults: Array
370
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
371
+ # @type RequestId: String
372
+
373
+ attr_accessor :DataId, :Name, :BizType, :Suggestion, :Label, :AsrText, :TextResults, :MoanResults, :RequestId
374
+
375
+ def initialize(dataid=nil, name=nil, biztype=nil, suggestion=nil, label=nil, asrtext=nil, textresults=nil, moanresults=nil, requestid=nil)
376
+ @DataId = dataid
377
+ @Name = name
378
+ @BizType = biztype
379
+ @Suggestion = suggestion
380
+ @Label = label
381
+ @AsrText = asrtext
382
+ @TextResults = textresults
383
+ @MoanResults = moanresults
384
+ @RequestId = requestid
385
+ end
386
+
387
+ def deserialize(params)
388
+ @DataId = params['DataId']
389
+ @Name = params['Name']
390
+ @BizType = params['BizType']
391
+ @Suggestion = params['Suggestion']
392
+ @Label = params['Label']
393
+ @AsrText = params['AsrText']
394
+ unless params['TextResults'].nil?
395
+ @TextResults = []
396
+ params['TextResults'].each do |i|
397
+ textresult_tmp = TextResult.new
398
+ textresult_tmp.deserialize(i)
399
+ @TextResults << textresult_tmp
400
+ end
401
+ end
402
+ unless params['MoanResults'].nil?
403
+ @MoanResults = []
404
+ params['MoanResults'].each do |i|
405
+ moanresult_tmp = MoanResult.new
406
+ moanresult_tmp.deserialize(i)
407
+ @MoanResults << moanresult_tmp
408
+ end
409
+ end
410
+ @RequestId = params['RequestId']
411
+ end
412
+ end
413
+
414
+ # CreateAudioModerationTask请求参数结构体
415
+ class CreateAudioModerationTaskRequest < TencentCloud::Common::AbstractModel
416
+ # @param Tasks: 该字段表示输入的音频审核任务信息,具体输入内容请参见TaskInput数据结构的详细描述。<br> 备注:最多同时可创建**10个任务**。
417
+ # @type Tasks: Array
418
+ # @param BizType: 该字段表示策略的具体编号,用于接口调度,在内容安全控制台中可配置。若不传入Biztype参数(留空),则代表采用默认的识别策略;传入则会在审核时根据业务场景采取不同的审核策略。<br>备注:Biztype仅为数字、字母与下划线的组合,长度为3-32个字符;不同Biztype关联不同的业务场景与识别能力策略,调用前请确认正确的Biztype。
419
+ # @type BizType: String
420
+ # @param Type: 该字段表示输入的音频审核类型,取值为:**AUDIO**(点播音频)和 **LIVE_AUDIO**(直播音频),默认值为AUDIO。
421
+ # @type Type: String
422
+ # @param Seed: 可选参数,该字段表示回调签名的key信息,用于保证数据的安全性。 签名方法为在返回的HTTP头部添加 X-Signature 的字段,值为: seed + body 的 SHA256 编码和Hex字符串,在收到回调数据后,可以根据返回的body,用 **sha256(seed + body)**, 计算出 `X-Signature` 进行验证。<br>具体使用实例可参考 [回调签名示例](https://cloud.tencent.com/document/product/1219/53263)。
423
+ # @type Seed: String
424
+ # @param CallbackUrl: 可选参数,该字段表示接受审核信息回调的地址,格式为URL链接默认格式。配置成功后,审核过程中产生的违规音频片段将通过此接口发送。回调返回内容格式请参考 [回调签名示例](https://cloud.tencent.com/document/product/1219/53257#.E7.A4.BA.E4.BE.8B2-.E5.9B.9E.E8.B0.83.E7.AD.BE.E5.90.8D.E7.A4.BA.E4.BE.8B)
425
+ # @type CallbackUrl: String
426
+
427
+ attr_accessor :Tasks, :BizType, :Type, :Seed, :CallbackUrl
428
+
429
+ def initialize(tasks=nil, biztype=nil, type=nil, seed=nil, callbackurl=nil)
430
+ @Tasks = tasks
431
+ @BizType = biztype
432
+ @Type = type
433
+ @Seed = seed
434
+ @CallbackUrl = callbackurl
435
+ end
436
+
437
+ def deserialize(params)
438
+ unless params['Tasks'].nil?
439
+ @Tasks = []
440
+ params['Tasks'].each do |i|
441
+ taskinput_tmp = TaskInput.new
442
+ taskinput_tmp.deserialize(i)
443
+ @Tasks << taskinput_tmp
444
+ end
445
+ end
446
+ @BizType = params['BizType']
447
+ @Type = params['Type']
448
+ @Seed = params['Seed']
449
+ @CallbackUrl = params['CallbackUrl']
450
+ end
451
+ end
452
+
453
+ # CreateAudioModerationTask返回参数结构体
454
+ class CreateAudioModerationTaskResponse < TencentCloud::Common::AbstractModel
455
+ # @param Results: 该字段用于返回任务创建的结果,具体输出内容请参见TaskResult数据结构的详细描述。
456
+ # 注意:此字段可能返回 null,表示取不到有效值。
457
+ # @type Results: Array
458
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
459
+ # @type RequestId: String
460
+
461
+ attr_accessor :Results, :RequestId
462
+
463
+ def initialize(results=nil, requestid=nil)
464
+ @Results = results
465
+ @RequestId = requestid
466
+ end
467
+
468
+ def deserialize(params)
469
+ unless params['Results'].nil?
470
+ @Results = []
471
+ params['Results'].each do |i|
472
+ taskresult_tmp = TaskResult.new
473
+ taskresult_tmp.deserialize(i)
474
+ @Results << taskresult_tmp
475
+ end
476
+ end
477
+ @RequestId = params['RequestId']
478
+ end
479
+ end
480
+
481
+ # DescribeTaskDetail请求参数结构体
482
+ class DescribeTaskDetailRequest < TencentCloud::Common::AbstractModel
483
+ # @param TaskId: 该字段表示创建音频审核任务后返回的任务ID(在Results参数中),用于标识需要查询任务详情的审核任务。
484
+ # <br>备注:查询接口单次最大查询量为**20条每次**。
485
+ # @type TaskId: String
486
+ # @param ShowAllSegments: 该布尔字段表示是否展示全部的音频片段,取值:True(展示全部的音频分片)、False(只展示命中审核规则的音频分片);默认值为False。
487
+ # @type ShowAllSegments: Boolean
488
+
489
+ attr_accessor :TaskId, :ShowAllSegments
490
+
491
+ def initialize(taskid=nil, showallsegments=nil)
492
+ @TaskId = taskid
493
+ @ShowAllSegments = showallsegments
494
+ end
495
+
496
+ def deserialize(params)
497
+ @TaskId = params['TaskId']
498
+ @ShowAllSegments = params['ShowAllSegments']
499
+ end
500
+ end
501
+
502
+ # DescribeTaskDetail返回参数结构体
503
+ class DescribeTaskDetailResponse < TencentCloud::Common::AbstractModel
504
+ # @param TaskId: 该字段用于返回创建音频审核任务后返回的任务ID(在Results参数中),用于标识需要查询任务详情的审核任务。
505
+ # 注意:此字段可能返回 null,表示取不到有效值。
506
+ # @type TaskId: String
507
+ # @param DataId: 该字段用于返回调用音频审核接口时在Tasks参数内传入的数据ID参数,方便数据的辨别和管理。
508
+ # 注意:此字段可能返回 null,表示取不到有效值。
509
+ # @type DataId: String
510
+ # @param BizType: 该字段用于返回调用音频审核接口时传入的BizType参数,方便数据的辨别和管理。
511
+ # 注意:此字段可能返回 null,表示取不到有效值。
512
+ # @type BizType: String
513
+ # @param Name: 该字段用于返回调用音频审核接口时传入的TaskInput参数中的任务名称,方便任务的识别与管理。
514
+ # 注意:此字段可能返回 null,表示取不到有效值。
515
+ # @type Name: String
516
+ # @param Status: 该字段用于返回所查询内容的任务状态。
517
+ # <br>取值:**FINISH**(任务已完成)、**PENDING** (任务等待中)、**RUNNING** (任务进行中)、**ERROR** (任务出错)、**CANCELLED** (任务已取消)。
518
+ # 注意:此字段可能返回 null,表示取不到有效值。
519
+ # @type Status: String
520
+ # @param Type: 该字段用于返回调用音频审核接口时输入的音频审核类型,取值为:**AUDIO**(点播音频)和**LIVE_AUDIO**(直播音频),默认值为AUDIO。
521
+ # 注意:此字段可能返回 null,表示取不到有效值。
522
+ # @type Type: String
523
+ # @param Suggestion: 该字段用于返回基于恶意标签的后续操作建议。当您获取到判定结果后,返回值表示系统推荐的后续操作;建议您按照业务所需,对不同违规类型与建议值进行处理。<br>返回值:**Block**:建议屏蔽,**Review** :建议人工复审,**Pass**:建议通过
524
+ # 注意:此字段可能返回 null,表示取不到有效值。
525
+ # @type Suggestion: String
526
+ # @param Labels: 该字段用于返回检测结果所对应的恶意标签。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad**:广告,**Custom**:自定义违规;以及其他令人反感、不安全或不适宜的内容类型。
527
+ # 注意:此字段可能返回 null,表示取不到有效值。
528
+ # @type Labels: Array
529
+ # @param InputInfo: 该字段用于返回审核服务的媒体内容信息,主要包括传入文件类型和访问地址。
530
+ # 注意:此字段可能返回 null,表示取不到有效值。
531
+ # @type InputInfo: :class:`Tencentcloud::Ams.v20201229.models.InputInfo`
532
+ # @param AudioText: 该字段用于返回音频文件识别出的对应文本内容,最大支持**前1000个字符**。
533
+ # 注意:此字段可能返回 null,表示取不到有效值。
534
+ # @type AudioText: String
535
+ # @param AudioSegments: 该字段用于返回音频片段的审核结果,主要包括开始时间和音频审核的相应结果。<br>具体输出内容请参见AudioSegments及AudioResult数据结构的详细描述。
536
+ # 注意:此字段可能返回 null,表示取不到有效值。
537
+ # @type AudioSegments: Array
538
+ # @param ErrorType: 当任务状态为Error时,该字段用于返回对应错误的类型;任务状态非Error时,默认返回为空。
539
+ # 注意:此字段可能返回 null,表示取不到有效值。
540
+ # @type ErrorType: String
541
+ # @param ErrorDescription: 当任务状态为Error时,该字段用于返回对应错误的详细描述,任务状态非Error时默认返回为空。
542
+ # 注意:此字段可能返回 null,表示取不到有效值。
543
+ # @type ErrorDescription: String
544
+ # @param CreatedAt: 该字段用于返回被查询任务创建的时间,格式采用 ISO 8601标准。
545
+ # 注意:此字段可能返回 null,表示取不到有效值。
546
+ # @type CreatedAt: String
547
+ # @param UpdatedAt: 该字段用于返回被查询任务最后更新时间,格式采用 ISO 8601标准。
548
+ # 注意:此字段可能返回 null,表示取不到有效值。
549
+ # @type UpdatedAt: String
550
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
551
+ # @type RequestId: String
552
+
553
+ attr_accessor :TaskId, :DataId, :BizType, :Name, :Status, :Type, :Suggestion, :Labels, :InputInfo, :AudioText, :AudioSegments, :ErrorType, :ErrorDescription, :CreatedAt, :UpdatedAt, :RequestId
554
+
555
+ def initialize(taskid=nil, dataid=nil, biztype=nil, name=nil, status=nil, type=nil, suggestion=nil, labels=nil, inputinfo=nil, audiotext=nil, audiosegments=nil, errortype=nil, errordescription=nil, createdat=nil, updatedat=nil, requestid=nil)
556
+ @TaskId = taskid
557
+ @DataId = dataid
558
+ @BizType = biztype
559
+ @Name = name
560
+ @Status = status
561
+ @Type = type
562
+ @Suggestion = suggestion
563
+ @Labels = labels
564
+ @InputInfo = inputinfo
565
+ @AudioText = audiotext
566
+ @AudioSegments = audiosegments
567
+ @ErrorType = errortype
568
+ @ErrorDescription = errordescription
569
+ @CreatedAt = createdat
570
+ @UpdatedAt = updatedat
571
+ @RequestId = requestid
572
+ end
573
+
574
+ def deserialize(params)
575
+ @TaskId = params['TaskId']
576
+ @DataId = params['DataId']
577
+ @BizType = params['BizType']
578
+ @Name = params['Name']
579
+ @Status = params['Status']
580
+ @Type = params['Type']
581
+ @Suggestion = params['Suggestion']
582
+ unless params['Labels'].nil?
583
+ @Labels = []
584
+ params['Labels'].each do |i|
585
+ tasklabel_tmp = TaskLabel.new
586
+ tasklabel_tmp.deserialize(i)
587
+ @Labels << tasklabel_tmp
588
+ end
589
+ end
590
+ unless params['InputInfo'].nil?
591
+ @InputInfo = InputInfo.new
592
+ @InputInfo.deserialize(params['InputInfo'])
593
+ end
594
+ @AudioText = params['AudioText']
595
+ unless params['AudioSegments'].nil?
596
+ @AudioSegments = []
597
+ params['AudioSegments'].each do |i|
598
+ audiosegments_tmp = AudioSegments.new
599
+ audiosegments_tmp.deserialize(i)
600
+ @AudioSegments << audiosegments_tmp
601
+ end
602
+ end
603
+ @ErrorType = params['ErrorType']
604
+ @ErrorDescription = params['ErrorDescription']
605
+ @CreatedAt = params['CreatedAt']
606
+ @UpdatedAt = params['UpdatedAt']
607
+ @RequestId = params['RequestId']
608
+ end
609
+ end
610
+
611
+ # DescribeTasks请求参数结构体
612
+ class DescribeTasksRequest < TencentCloud::Common::AbstractModel
613
+ # @param Limit: 该参数表示任务列表每页展示的任务条数,**默认值为10**(每页展示10条任务)。
614
+ # @type Limit: Integer
615
+ # @param Filter: 该参数表示任务筛选器的输入参数,可根据业务类型、审核文件类型、处理建议及任务状态筛选想要查看的审核任务,具体参数内容请参见TaskFilter数据结构的详细描述。
616
+ # @type Filter: :class:`Tencentcloud::Ams.v20201229.models.TaskFilter`
617
+ # @param PageToken: 该参数表示翻页时使用的Token信息,由系统自动生成,并在翻页时向下一个生成的页面传递此参数,以方便快速翻页功能的实现。当到最后一页时,该字段为空。
618
+ # @type PageToken: String
619
+ # @param StartTime: 该参数表示任务列表的开始时间,格式为ISO8601标准的时间戳。**默认值为最近3天**,若传入该参数,则在这一时间到EndTime之间的任务将会被筛选出来。<br>备注:该参数与Filter共同起到任务筛选作用,二者作用无先后顺序。
620
+ # @type StartTime: String
621
+ # @param EndTime: 该参数表示任务列表的结束时间,格式为ISO8601标准的时间戳。**默认值为空**,若传入该参数,则在这StartTime到这一时间之间的任务将会被筛选出来。<br>备注:该参数与Filter共同起到任务筛选作用,二者作用无先后顺序。
622
+ # @type EndTime: String
623
+
624
+ attr_accessor :Limit, :Filter, :PageToken, :StartTime, :EndTime
625
+
626
+ def initialize(limit=nil, filter=nil, pagetoken=nil, starttime=nil, endtime=nil)
627
+ @Limit = limit
628
+ @Filter = filter
629
+ @PageToken = pagetoken
630
+ @StartTime = starttime
631
+ @EndTime = endtime
632
+ end
633
+
634
+ def deserialize(params)
635
+ @Limit = params['Limit']
636
+ unless params['Filter'].nil?
637
+ @Filter = TaskFilter.new
638
+ @Filter.deserialize(params['Filter'])
639
+ end
640
+ @PageToken = params['PageToken']
641
+ @StartTime = params['StartTime']
642
+ @EndTime = params['EndTime']
643
+ end
644
+ end
645
+
646
+ # DescribeTasks返回参数结构体
647
+ class DescribeTasksResponse < TencentCloud::Common::AbstractModel
648
+ # @param Total: 该字段用于返回当前查询的任务总量,格式为int字符串。
649
+ # 注意:此字段可能返回 null,表示取不到有效值。
650
+ # @type Total: String
651
+ # @param Data: 该字段用于返回当前页的任务详细数据,具体输出内容请参见TaskData数据结构的详细描述。
652
+ # 注意:此字段可能返回 null,表示取不到有效值。
653
+ # @type Data: Array
654
+ # @param PageToken: 该字段用于返回翻页时使用的Token信息,由系统自动生成,并在翻页时向下一个生成的页面传递此参数,以方便快速翻页功能的实现。当到最后一页时,该字段为空。
655
+ # 注意:此字段可能返回 null,表示取不到有效值。
656
+ # @type PageToken: String
657
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
658
+ # @type RequestId: String
659
+
660
+ attr_accessor :Total, :Data, :PageToken, :RequestId
661
+
662
+ def initialize(total=nil, data=nil, pagetoken=nil, requestid=nil)
663
+ @Total = total
664
+ @Data = data
665
+ @PageToken = pagetoken
666
+ @RequestId = requestid
667
+ end
668
+
669
+ def deserialize(params)
670
+ @Total = params['Total']
671
+ unless params['Data'].nil?
672
+ @Data = []
673
+ params['Data'].each do |i|
674
+ taskdata_tmp = TaskData.new
675
+ taskdata_tmp.deserialize(i)
676
+ @Data << taskdata_tmp
677
+ end
678
+ end
679
+ @PageToken = params['PageToken']
680
+ @RequestId = params['RequestId']
681
+ end
682
+ end
683
+
684
+ # 输入信息详情
685
+ class InputInfo < TencentCloud::Common::AbstractModel
686
+ # @param Type: 该字段表示文件访问类型,取值为**URL**(资源链接)和**COS** (腾讯云对象存储)。
687
+ # 注意:此字段可能返回 null,表示取不到有效值。
688
+ # @type Type: String
689
+ # @param Url: 该字段表示文件访问的链接地址,格式为标准URL格式。<br> 备注:当Type为URL时此字段不为空。
690
+ # 注意:此字段可能返回 null,表示取不到有效值。
691
+ # @type Url: String
692
+ # @param BucketInfo: 该字段表示文件访问的腾讯云存储桶信息。<br> 备注:当Type为COS时此字段不为空。
693
+ # 注意:此字段可能返回 null,表示取不到有效值。
694
+ # @type BucketInfo: :class:`Tencentcloud::Ams.v20201229.models.BucketInfo`
695
+
696
+ attr_accessor :Type, :Url, :BucketInfo
697
+
698
+ def initialize(type=nil, url=nil, bucketinfo=nil)
699
+ @Type = type
700
+ @Url = url
701
+ @BucketInfo = bucketinfo
702
+ end
703
+
704
+ def deserialize(params)
705
+ @Type = params['Type']
706
+ @Url = params['Url']
707
+ unless params['BucketInfo'].nil?
708
+ @BucketInfo = BucketInfo.new
709
+ @BucketInfo.deserialize(params['BucketInfo'])
710
+ end
711
+ end
712
+ end
713
+
714
+ # 媒体类型
715
+ class MediaInfo < TencentCloud::Common::AbstractModel
716
+ # @param Codecs: 该字段用于返回传入的媒体文件的编码格式,如wav、mp3、aac、flac、amr、3gp、 m4a、wma、ogg、ape等。
717
+ # @type Codecs: String
718
+ # @param Duration: 该字段用于返回对传入的流媒体文件进行分片的片段时长,单位为秒。**默认值为15秒**,支持用户自定义配置。
719
+ # @type Duration: Integer
720
+ # @param Width: *内测中,敬请期待*
721
+ # @type Width: Integer
722
+ # @param Height: *内测中,敬请期待*
723
+ # @type Height: Integer
724
+ # @param Thumbnail: *内测中,敬请期待*
725
+ # @type Thumbnail: String
726
+
727
+ attr_accessor :Codecs, :Duration, :Width, :Height, :Thumbnail
728
+
729
+ def initialize(codecs=nil, duration=nil, width=nil, height=nil, thumbnail=nil)
730
+ @Codecs = codecs
731
+ @Duration = duration
732
+ @Width = width
733
+ @Height = height
734
+ @Thumbnail = thumbnail
735
+ end
736
+
737
+ def deserialize(params)
738
+ @Codecs = params['Codecs']
739
+ @Duration = params['Duration']
740
+ @Width = params['Width']
741
+ @Height = params['Height']
742
+ @Thumbnail = params['Thumbnail']
743
+ end
744
+ end
745
+
746
+ # 呻吟低俗检测结果
747
+ class MoanResult < TencentCloud::Common::AbstractModel
748
+ # @param Label: 固定取值为Moan(呻吟/娇喘),如音频中无复杂类型「MoanResult」的返回则代表改音频中无呻吟/娇喘相关违规内容;
749
+ # 注意:此字段可能返回 null,表示取不到有效值。
750
+ # @type Label: String
751
+ # @param Score: 机器判断当前分类的置信度,取值范围:0~100。分数越高,表示越有可能属于当前分类。
752
+ # (如:Moan 99,则该样本属于呻吟/娇喘的置信度非常高。)
753
+ # @type Score: Integer
754
+ # @param Suggestion: 建议您拿到判断结果后的执行操作。
755
+ # 建议值,Block:建议屏蔽,Review:建议复审,Pass:建议通过
756
+ # @type Suggestion: String
757
+ # @param StartTime: 违规事件开始时间,单位为毫秒(ms);
758
+ # @type StartTime: Float
759
+ # @param EndTime: 违规事件结束时间,单位为毫秒(ms);
760
+ # @type EndTime: Float
761
+
762
+ attr_accessor :Label, :Score, :Suggestion, :StartTime, :EndTime
763
+
764
+ def initialize(label=nil, score=nil, suggestion=nil, starttime=nil, endtime=nil)
765
+ @Label = label
766
+ @Score = score
767
+ @Suggestion = suggestion
768
+ @StartTime = starttime
769
+ @EndTime = endtime
770
+ end
771
+
772
+ def deserialize(params)
773
+ @Label = params['Label']
774
+ @Score = params['Score']
775
+ @Suggestion = params['Suggestion']
776
+ @StartTime = params['StartTime']
777
+ @EndTime = params['EndTime']
778
+ end
779
+ end
780
+
781
+ # 用于表示数据存储的相关信息
782
+ class StorageInfo < TencentCloud::Common::AbstractModel
783
+ # @param Type: 该字段表示文件访问类型,取值为**URL**(资源链接)和**COS** (腾讯云对象存储);该字段应当与传入的访问类型相对应,可用于强校验并方便系统快速识别访问地址;若不传入此参数,则默认值为URL,此时系统将自动判定访问地址类型。
784
+ # @type Type: String
785
+ # @param Url: 该字段表示文件访问的链接地址,格式为标准URL格式。<br> 备注:当Type为URL时此字段不为空,该参数与BucketInfo参数须传入其中之一
786
+ # @type Url: String
787
+ # @param BucketInfo: 该字段表示文件访问的腾讯云存储桶信息。<br> 备注:当Type为COS时此字段不为空,该参数与Url参数须传入其中之一。
788
+ # @type BucketInfo: :class:`Tencentcloud::Ams.v20201229.models.BucketInfo`
789
+
790
+ attr_accessor :Type, :Url, :BucketInfo
791
+
792
+ def initialize(type=nil, url=nil, bucketinfo=nil)
793
+ @Type = type
794
+ @Url = url
795
+ @BucketInfo = bucketinfo
796
+ end
797
+
798
+ def deserialize(params)
799
+ @Type = params['Type']
800
+ @Url = params['Url']
801
+ unless params['BucketInfo'].nil?
802
+ @BucketInfo = BucketInfo.new
803
+ @BucketInfo.deserialize(params['BucketInfo'])
804
+ end
805
+ end
806
+ end
807
+
808
+ # 任务数据
809
+ class TaskData < TencentCloud::Common::AbstractModel
810
+ # @param DataId: 该字段用于返回音频审核任务数据所对应的数据ID,方便后续查询和管理审核任务。
811
+ # 注意:此字段可能返回 null,表示取不到有效值。
812
+ # @type DataId: String
813
+ # @param TaskId: 该字段用于返回音频审核任务所生成的任务ID,用于标识具体审核任务,方便后续查询和管理。
814
+ # @type TaskId: String
815
+ # @param Status: 该字段用于返回所查询内容的任务状态。
816
+ # <br>取值:**FINISH**(任务已完成)、**PENDING** (任务等待中)、**RUNNING** (任务进行中)、**ERROR** (任务出错)、**CANCELLED** (任务已取消)。
817
+ # @type Status: String
818
+ # @param Name: 该字段用于返回音频审核任务所对应的任务名称,方便后续查询和管理审核任务。
819
+ # 注意:此字段可能返回 null,表示取不到有效值。
820
+ # @type Name: String
821
+ # @param BizType: 该字段用于返回调用音频审核接口时传入的BizType参数,方便数据的辨别和管理。
822
+ # 注意:此字段可能返回 null,表示取不到有效值。
823
+ # @type BizType: String
824
+ # @param Type: 该字段用于返回调用音频审核接口时输入的音频审核类型,取值为:**AUDIO**(点播音频)和**LIVE_AUDIO**(直播音频),默认值为AUDIO。
825
+ # 注意:此字段可能返回 null,表示取不到有效值。
826
+ # @type Type: String
827
+ # @param Suggestion: 该字段用于返回基于恶意标签的后续操作建议。当您获取到判定结果后,返回值表示系统推荐的后续操作;建议您按照业务所需,对不同违规类型与建议值进行处理。<br>返回值:**Block**:建议屏蔽,**Review** :建议人工复审,**Pass**:建议通过
828
+ # 注意:此字段可能返回 null,表示取不到有效值。
829
+ # @type Suggestion: String
830
+ # @param MediaInfo: 输入信息
831
+ # 注意:此字段可能返回 null,表示取不到有效值。
832
+ # @type MediaInfo: :class:`Tencentcloud::Ams.v20201229.models.MediaInfo`
833
+ # @param Labels: 该字段用于返回检测结果所对应的恶意标签。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad**:广告,**Custom**:自定义违规;以及其他令人反感、不安全或不适宜的内容类型。
834
+ # 注意:此字段可能返回 null,表示取不到有效值。
835
+ # @type Labels: Array
836
+ # @param CreatedAt: 该字段用于返回被查询任务创建的时间,格式采用 ISO 8601标准。
837
+ # @type CreatedAt: String
838
+ # @param UpdatedAt: 该字段用于返回被查询任务最后更新时间,格式采用 ISO 8601标准。
839
+ # 注意:此字段可能返回 null,表示取不到有效值。
840
+ # @type UpdatedAt: String
841
+
842
+ attr_accessor :DataId, :TaskId, :Status, :Name, :BizType, :Type, :Suggestion, :MediaInfo, :Labels, :CreatedAt, :UpdatedAt
843
+
844
+ def initialize(dataid=nil, taskid=nil, status=nil, name=nil, biztype=nil, type=nil, suggestion=nil, mediainfo=nil, labels=nil, createdat=nil, updatedat=nil)
845
+ @DataId = dataid
846
+ @TaskId = taskid
847
+ @Status = status
848
+ @Name = name
849
+ @BizType = biztype
850
+ @Type = type
851
+ @Suggestion = suggestion
852
+ @MediaInfo = mediainfo
853
+ @Labels = labels
854
+ @CreatedAt = createdat
855
+ @UpdatedAt = updatedat
856
+ end
857
+
858
+ def deserialize(params)
859
+ @DataId = params['DataId']
860
+ @TaskId = params['TaskId']
861
+ @Status = params['Status']
862
+ @Name = params['Name']
863
+ @BizType = params['BizType']
864
+ @Type = params['Type']
865
+ @Suggestion = params['Suggestion']
866
+ unless params['MediaInfo'].nil?
867
+ @MediaInfo = MediaInfo.new
868
+ @MediaInfo.deserialize(params['MediaInfo'])
869
+ end
870
+ unless params['Labels'].nil?
871
+ @Labels = []
872
+ params['Labels'].each do |i|
873
+ tasklabel_tmp = TaskLabel.new
874
+ tasklabel_tmp.deserialize(i)
875
+ @Labels << tasklabel_tmp
876
+ end
877
+ end
878
+ @CreatedAt = params['CreatedAt']
879
+ @UpdatedAt = params['UpdatedAt']
880
+ end
881
+ end
882
+
883
+ # 任务筛选器
884
+ class TaskFilter < TencentCloud::Common::AbstractModel
885
+ # @param BizType: 该字段用于传入任务对应的业务类型供筛选器进行筛选。Biztype为策略的具体的编号,用于接口调度,在内容安全控制台中可配置。不同Biztype关联不同的业务场景与审核策略,调用前请确认正确的Biztype。Biztype仅为**数字、字母与下划线的组合**,长度为3-32个字符。<br>备注:在不传入该参数时筛选器默认不筛选业务类型。
886
+ # @type BizType: String
887
+ # @param Type: 该字段用于传入音频审核对应的任务类型供筛选器进行筛选,取值为:**VIDEO**(点播视频审核),**AUDIO**(点播音频审核), **LIVE_VIDEO**(直播视频审核), **LIVE_AUDIO**(直播音频审核)。<br>备注:在不传入该参数时筛选器默认不筛选任务类型。
888
+ # @type Type: String
889
+ # @param Suggestion: 该字段用于传入音频审核对应的建议操作供筛选器进行筛选,取值为:**Block**:建议屏蔽,**Review**:建议人工复审,**Pass**:建议通过。<br>备注:在不传入该参数时筛选器默认不筛选建议操作。
890
+ # @type Suggestion: String
891
+ # @param TaskStatus: 该字段用于传入审核任务的任务状态供筛选器进行筛选,取值为:**FINISH**(任务已完成)、**PENDING** (任务等待中)、**RUNNING** (任务进行中)、**ERROR** (任务出错)、**CANCELLED** (任务已取消)。<br>备注:在不传入该参数时筛选器默认不筛选任务状态。
892
+ # @type TaskStatus: String
893
+
894
+ attr_accessor :BizType, :Type, :Suggestion, :TaskStatus
895
+
896
+ def initialize(biztype=nil, type=nil, suggestion=nil, taskstatus=nil)
897
+ @BizType = biztype
898
+ @Type = type
899
+ @Suggestion = suggestion
900
+ @TaskStatus = taskstatus
901
+ end
902
+
903
+ def deserialize(params)
904
+ @BizType = params['BizType']
905
+ @Type = params['Type']
906
+ @Suggestion = params['Suggestion']
907
+ @TaskStatus = params['TaskStatus']
908
+ end
909
+ end
910
+
911
+ # 音视频任务数据结构
912
+ class TaskInput < TencentCloud::Common::AbstractModel
913
+ # @param DataId: 选填参数,该字段表示您为待检测对象分配的数据ID,传入后可方便您对文件进行标识和管理。<br>取值:由英文字母(大小写均可)、数字及四个特殊符号(_,-,@,#)组成,**长度不超过64个字符**。
914
+ # @type DataId: String
915
+ # @param Name: 选填参数,该字段表示音频审核任务所对应的任务名称,方便后续查询和管理审核任务。
916
+ # @type Name: String
917
+ # @param Input: 必填参数,该字段表示审核文件的访问参数,用于获取审核媒体文件,该参数内包括访问类型和访问地址。
918
+ # @type Input: :class:`Tencentcloud::Ams.v20201229.models.StorageInfo`
919
+
920
+ attr_accessor :DataId, :Name, :Input
921
+
922
+ def initialize(dataid=nil, name=nil, input=nil)
923
+ @DataId = dataid
924
+ @Name = name
925
+ @Input = input
926
+ end
927
+
928
+ def deserialize(params)
929
+ @DataId = params['DataId']
930
+ @Name = params['Name']
931
+ unless params['Input'].nil?
932
+ @Input = StorageInfo.new
933
+ @Input.deserialize(params['Input'])
934
+ end
935
+ end
936
+ end
937
+
938
+ # 用于返回审核任务输出的标签
939
+ class TaskLabel < TencentCloud::Common::AbstractModel
940
+ # @param Label: 该字段用于返回检测结果所对应的恶意标签。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad**:广告,**Custom**:自定义违规;以及其他令人反感、不安全或不适宜的内容类型。
941
+ # 注意:此字段可能返回 null,表示取不到有效值。
942
+ # @type Label: String
943
+ # @param Suggestion: 该字段用于返回当前标签对应的后续操作建议。当您获取到判定结果后,返回值表示系统推荐的后续操作;建议您按照业务所需,对不同违规类型与建议值进行处理。<br>返回值:**Block**:建议屏蔽,**Review** :建议人工复审,**Pass**:建议通过
944
+ # 注意:此字段可能返回 null,表示取不到有效值。
945
+ # @type Suggestion: String
946
+ # @param Score: 该字段用于返回当前标签(Label)下的置信度,取值范围:0(**置信度最低**)-100(**置信度最高** ),越高代表文本越有可能属于当前返回的标签;如:*色情 99*,则表明该文本非常有可能属于色情内容;*色情 0*,则表明该文本不属于色情内容。
947
+ # 注意:此字段可能返回 null,表示取不到有效值。
948
+ # @type Score: Integer
949
+
950
+ attr_accessor :Label, :Suggestion, :Score
951
+
952
+ def initialize(label=nil, suggestion=nil, score=nil)
953
+ @Label = label
954
+ @Suggestion = suggestion
955
+ @Score = score
956
+ end
957
+
958
+ def deserialize(params)
959
+ @Label = params['Label']
960
+ @Suggestion = params['Suggestion']
961
+ @Score = params['Score']
962
+ end
963
+ end
964
+
965
+ # 创建任务时的返回结果
966
+ class TaskResult < TencentCloud::Common::AbstractModel
967
+ # @param DataId: 该字段用于返回创建音频审核任务时在TaskInput结构内传入的DataId,用于标识具体审核任务。
968
+ # 注意:此字段可能返回 null,表示取不到有效值。
969
+ # @type DataId: String
970
+ # @param TaskId: 该字段用于返回音频审核任务所生成的任务ID,用于标识具体审核任务,方便后续查询和管理。
971
+ # 注意:此字段可能返回 null,表示取不到有效值。
972
+ # @type TaskId: String
973
+ # @param Code: 该字段用于返回任务创建的状态,如返回OK则代表任务创建成功,其他返回值可参考公共错误码。
974
+ # 注意:此字段可能返回 null,表示取不到有效值。
975
+ # @type Code: String
976
+ # @param Message: **仅在Code的返回值为错误码时生效**,用于返回错误的详情内容。
977
+ # 注意:此字段可能返回 null,表示取不到有效值。
978
+ # @type Message: String
979
+
980
+ attr_accessor :DataId, :TaskId, :Code, :Message
981
+
982
+ def initialize(dataid=nil, taskid=nil, code=nil, message=nil)
983
+ @DataId = dataid
984
+ @TaskId = taskid
985
+ @Code = code
986
+ @Message = message
987
+ end
988
+
989
+ def deserialize(params)
990
+ @DataId = params['DataId']
991
+ @TaskId = params['TaskId']
992
+ @Code = params['Code']
993
+ @Message = params['Message']
994
+ end
995
+ end
996
+
997
+ # 音频文本内容审核结果
998
+ class TextResult < TencentCloud::Common::AbstractModel
999
+ # @param Label: 恶意标签,Normal:正常,Porn:色情,Abuse:谩骂,Ad:广告,Custom:自定义词库。
1000
+ # 以及其他令人反感、不安全或不适宜的内容类型。
1001
+
1002
+ # 如音频中无复杂类型「TextResults」的返回则代表改音频中无相关违规内容;
1003
+ # 注意:此字段可能返回 null,表示取不到有效值。
1004
+ # @type Label: String
1005
+ # @param Keywords: 命中的关键词,为空则代表该违规内容出自于模型的判断;
1006
+ # 注意:此字段可能返回 null,表示取不到有效值。
1007
+ # @type Keywords: Array
1008
+ # @param LibId: 命中关键词库的库标识;
1009
+ # 注意:此字段可能返回 null,表示取不到有效值。
1010
+ # @type LibId: String
1011
+ # @param LibName: 命中关键词库的名字;
1012
+ # 注意:此字段可能返回 null,表示取不到有效值。
1013
+ # @type LibName: String
1014
+ # @param Score: 机器判断当前分类的置信度,取值范围:0~100。分数越高,表示越有可能属于当前分类。
1015
+ # (如:Porn 99,则该样本属于色情的置信度非常高。)
1016
+ # 注意:此字段可能返回 null,表示取不到有效值。
1017
+ # @type Score: Integer
1018
+ # @param Suggestion: 建议您拿到判断结果后的执行操作。
1019
+ # 建议值,Block:建议屏蔽,Review:建议复审,Pass:建议通过
1020
+ # 注意:此字段可能返回 null,表示取不到有效值。
1021
+ # @type Suggestion: String
1022
+ # @param LibType: 自定义词库的类型,自定义词库相关的信息可登录控制台中查看;
1023
+
1024
+ # 1:自定义黑白库;
1025
+
1026
+ # 2:自定义库;
1027
+ # @type LibType: Integer
1028
+
1029
+ attr_accessor :Label, :Keywords, :LibId, :LibName, :Score, :Suggestion, :LibType
1030
+
1031
+ def initialize(label=nil, keywords=nil, libid=nil, libname=nil, score=nil, suggestion=nil, libtype=nil)
1032
+ @Label = label
1033
+ @Keywords = keywords
1034
+ @LibId = libid
1035
+ @LibName = libname
1036
+ @Score = score
1037
+ @Suggestion = suggestion
1038
+ @LibType = libtype
1039
+ end
1040
+
1041
+ def deserialize(params)
1042
+ @Label = params['Label']
1043
+ @Keywords = params['Keywords']
1044
+ @LibId = params['LibId']
1045
+ @LibName = params['LibName']
1046
+ @Score = params['Score']
1047
+ @Suggestion = params['Suggestion']
1048
+ @LibType = params['LibType']
1049
+ end
1050
+ end
1051
+
1052
+ end
1053
+ end
1054
+ end
1055
+