tencentcloud-sdk-gme 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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 2b427dad44a24f171529dac3992758f93ae8c5ac
4
+ data.tar.gz: 6bc79f11fc5704600d8edb1fcfc41180c10eb027
5
+ SHA512:
6
+ metadata.gz: 0e97245918e8b1befc300156edc2bd3f1b8d5a69b7c339cd8b0b4f2ce3cacaa92590f1f0b3565fc08185e6c41588a6329cc1088529dd2a0df2a21db613a63846
7
+ data.tar.gz: d295d63c2d81ace4cf867da57ec4400b7b24c15975710fc6e359acfe3b4f6b8bb890dba0f7915d550318011ad424b27558b8088c33d6ab50c41ad0b97743dd01
data/lib/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.0.200
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'tencentcloud-sdk-common'
4
+
5
+ require_relative 'v20180711/client'
6
+ require_relative 'v20180711/models'
7
+
8
+ module TencentCloud
9
+ module Gme
10
+ end
11
+ end
@@ -0,0 +1,521 @@
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
+ require 'json'
18
+
19
+ module TencentCloud
20
+ module Gme
21
+ module V20180711
22
+ class Client < TencentCloud::Common::AbstractClient
23
+
24
+ def initialize(credential, region, profile = nil)
25
+ api_version = '2018-07-11'
26
+ api_endpoint = 'gme.tencentcloudapi.com'
27
+ sdk_version = 'GME_' + File.read(File.expand_path('../VERSION', __dir__)).strip
28
+ super(credential, region, api_version, api_endpoint, sdk_version, profile)
29
+ end
30
+
31
+
32
+ # 用于创建年龄语音识别任务的接口,请求频率10次/秒。该接口目前通过白名单开放试用,如有需求,请提交工单申请。
33
+ # </br>
34
+ # <h4><b>接口功能说明:</b></h4>
35
+ # <li>支持对语音文件进行检测,判断是否为未成年人。</li>
36
+ # <li>支持批量提交检测子任务。检测子任务列表最多支持100个。</li>
37
+ # </br>
38
+ # <h4><b>音频文件限制说明:</b></h4>
39
+ # <li>音频文件大小限制:10 M</li>
40
+ # <li>音频文件时长限制:3分钟</li>
41
+ # <li>音频文件格式支持的类型:.wav、.m4a、.amr、.mp3、.aac、.wma、.ogg</li>
42
+ # </br>
43
+
44
+ # @param request: Request instance for CreateAgeDetectTask.
45
+ # @type request: :class:`Tencentcloud::gme::V20180711::CreateAgeDetectTaskRequest`
46
+ # @rtype: :class:`Tencentcloud::gme::V20180711::CreateAgeDetectTaskResponse`
47
+ def CreateAgeDetectTask(request)
48
+ body = send_request('CreateAgeDetectTask', request.serialize)
49
+ response = JSON.parse(body)
50
+ if response['Response'].key?('Error') == false
51
+ model = CreateAgeDetectTaskResponse.new
52
+ model.deserialize(response['Response'])
53
+ model
54
+ else
55
+ code = response['Response']['Error']['Code']
56
+ message = response['Response']['Error']['Message']
57
+ reqid = response['Response']['RequestId']
58
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
59
+ end
60
+ rescue TencentCloud::Common::TencentCloudSDKException => e
61
+ raise e
62
+ rescue StandardError => e
63
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
64
+ end
65
+
66
+ # 本接口(CreateApp)用于创建一个GME应用。
67
+
68
+ # @param request: Request instance for CreateApp.
69
+ # @type request: :class:`Tencentcloud::gme::V20180711::CreateAppRequest`
70
+ # @rtype: :class:`Tencentcloud::gme::V20180711::CreateAppResponse`
71
+ def CreateApp(request)
72
+ body = send_request('CreateApp', request.serialize)
73
+ response = JSON.parse(body)
74
+ if response['Response'].key?('Error') == false
75
+ model = CreateAppResponse.new
76
+ model.deserialize(response['Response'])
77
+ model
78
+ else
79
+ code = response['Response']['Error']['Code']
80
+ message = response['Response']['Error']['Message']
81
+ reqid = response['Response']['RequestId']
82
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
83
+ end
84
+ rescue TencentCloud::Common::TencentCloudSDKException => e
85
+ raise e
86
+ rescue StandardError => e
87
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
88
+ end
89
+
90
+ # 查询年龄语音识别任务结果,请求频率10次/秒。该接口目前通过白名单开放试用,如有需求,请提交工单申请。
91
+
92
+ # @param request: Request instance for DescribeAgeDetectTask.
93
+ # @type request: :class:`Tencentcloud::gme::V20180711::DescribeAgeDetectTaskRequest`
94
+ # @rtype: :class:`Tencentcloud::gme::V20180711::DescribeAgeDetectTaskResponse`
95
+ def DescribeAgeDetectTask(request)
96
+ body = send_request('DescribeAgeDetectTask', request.serialize)
97
+ response = JSON.parse(body)
98
+ if response['Response'].key?('Error') == false
99
+ model = DescribeAgeDetectTaskResponse.new
100
+ model.deserialize(response['Response'])
101
+ model
102
+ else
103
+ code = response['Response']['Error']['Code']
104
+ message = response['Response']['Error']['Message']
105
+ reqid = response['Response']['RequestId']
106
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
107
+ end
108
+ rescue TencentCloud::Common::TencentCloudSDKException => e
109
+ raise e
110
+ rescue StandardError => e
111
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
112
+ end
113
+
114
+ # 本接口(DescribeAppStatistics)用于获取某个GME应用的用量数据。包括实时语音,语音消息及转文本,语音分析等。最长查询周期为最近30天。
115
+
116
+ # @param request: Request instance for DescribeAppStatistics.
117
+ # @type request: :class:`Tencentcloud::gme::V20180711::DescribeAppStatisticsRequest`
118
+ # @rtype: :class:`Tencentcloud::gme::V20180711::DescribeAppStatisticsResponse`
119
+ def DescribeAppStatistics(request)
120
+ body = send_request('DescribeAppStatistics', request.serialize)
121
+ response = JSON.parse(body)
122
+ if response['Response'].key?('Error') == false
123
+ model = DescribeAppStatisticsResponse.new
124
+ model.deserialize(response['Response'])
125
+ model
126
+ else
127
+ code = response['Response']['Error']['Code']
128
+ message = response['Response']['Error']['Message']
129
+ reqid = response['Response']['RequestId']
130
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
131
+ end
132
+ rescue TencentCloud::Common::TencentCloudSDKException => e
133
+ raise e
134
+ rescue StandardError => e
135
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
136
+ end
137
+
138
+ # 本接口(DescribeApplicationData)用于获取数据详情信息,最多可拉取最近90天的数据。
139
+
140
+ # @param request: Request instance for DescribeApplicationData.
141
+ # @type request: :class:`Tencentcloud::gme::V20180711::DescribeApplicationDataRequest`
142
+ # @rtype: :class:`Tencentcloud::gme::V20180711::DescribeApplicationDataResponse`
143
+ def DescribeApplicationData(request)
144
+ body = send_request('DescribeApplicationData', request.serialize)
145
+ response = JSON.parse(body)
146
+ if response['Response'].key?('Error') == false
147
+ model = DescribeApplicationDataResponse.new
148
+ model.deserialize(response['Response'])
149
+ model
150
+ else
151
+ code = response['Response']['Error']['Code']
152
+ message = response['Response']['Error']['Message']
153
+ reqid = response['Response']['RequestId']
154
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
155
+ end
156
+ rescue TencentCloud::Common::TencentCloudSDKException => e
157
+ raise e
158
+ rescue StandardError => e
159
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
160
+ end
161
+
162
+ # 根据应用ID和文件ID查询识别结果
163
+
164
+ # @param request: Request instance for DescribeFilterResult.
165
+ # @type request: :class:`Tencentcloud::gme::V20180711::DescribeFilterResultRequest`
166
+ # @rtype: :class:`Tencentcloud::gme::V20180711::DescribeFilterResultResponse`
167
+ def DescribeFilterResult(request)
168
+ body = send_request('DescribeFilterResult', request.serialize)
169
+ response = JSON.parse(body)
170
+ if response['Response'].key?('Error') == false
171
+ model = DescribeFilterResultResponse.new
172
+ model.deserialize(response['Response'])
173
+ model
174
+ else
175
+ code = response['Response']['Error']['Code']
176
+ message = response['Response']['Error']['Message']
177
+ reqid = response['Response']['RequestId']
178
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
179
+ end
180
+ rescue TencentCloud::Common::TencentCloudSDKException => e
181
+ raise e
182
+ rescue StandardError => e
183
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
184
+ end
185
+
186
+ # 根据日期查询识别结果列表
187
+
188
+ # @param request: Request instance for DescribeFilterResultList.
189
+ # @type request: :class:`Tencentcloud::gme::V20180711::DescribeFilterResultListRequest`
190
+ # @rtype: :class:`Tencentcloud::gme::V20180711::DescribeFilterResultListResponse`
191
+ def DescribeFilterResultList(request)
192
+ body = send_request('DescribeFilterResultList', request.serialize)
193
+ response = JSON.parse(body)
194
+ if response['Response'].key?('Error') == false
195
+ model = DescribeFilterResultListResponse.new
196
+ model.deserialize(response['Response'])
197
+ model
198
+ else
199
+ code = response['Response']['Error']['Code']
200
+ message = response['Response']['Error']['Message']
201
+ reqid = response['Response']['RequestId']
202
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
203
+ end
204
+ rescue TencentCloud::Common::TencentCloudSDKException => e
205
+ raise e
206
+ rescue StandardError => e
207
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
208
+ end
209
+
210
+ # 获取房间内用户信息
211
+
212
+ # @param request: Request instance for DescribeRoomInfo.
213
+ # @type request: :class:`Tencentcloud::gme::V20180711::DescribeRoomInfoRequest`
214
+ # @rtype: :class:`Tencentcloud::gme::V20180711::DescribeRoomInfoResponse`
215
+ def DescribeRoomInfo(request)
216
+ body = send_request('DescribeRoomInfo', request.serialize)
217
+ response = JSON.parse(body)
218
+ if response['Response'].key?('Error') == false
219
+ model = DescribeRoomInfoResponse.new
220
+ model.deserialize(response['Response'])
221
+ model
222
+ else
223
+ code = response['Response']['Error']['Code']
224
+ message = response['Response']['Error']['Message']
225
+ reqid = response['Response']['RequestId']
226
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
227
+ end
228
+ rescue TencentCloud::Common::TencentCloudSDKException => e
229
+ raise e
230
+ rescue StandardError => e
231
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
232
+ end
233
+
234
+ # 本接口(DescribeScanResultList)用于查询语音检测结果,查询任务列表最多支持100个。
235
+ # <p style="color:red">如果在提交语音检测任务时未设置 Callback 字段,则需要通过本接口获取检测结果</p>
236
+
237
+ # @param request: Request instance for DescribeScanResultList.
238
+ # @type request: :class:`Tencentcloud::gme::V20180711::DescribeScanResultListRequest`
239
+ # @rtype: :class:`Tencentcloud::gme::V20180711::DescribeScanResultListResponse`
240
+ def DescribeScanResultList(request)
241
+ body = send_request('DescribeScanResultList', request.serialize)
242
+ response = JSON.parse(body)
243
+ if response['Response'].key?('Error') == false
244
+ model = DescribeScanResultListResponse.new
245
+ model.deserialize(response['Response'])
246
+ model
247
+ else
248
+ code = response['Response']['Error']['Code']
249
+ message = response['Response']['Error']['Message']
250
+ reqid = response['Response']['RequestId']
251
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
252
+ end
253
+ rescue TencentCloud::Common::TencentCloudSDKException => e
254
+ raise e
255
+ rescue StandardError => e
256
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
257
+ end
258
+
259
+ # 拉取用户在房间得进出时间
260
+
261
+ # @param request: Request instance for DescribeUserInAndOutTime.
262
+ # @type request: :class:`Tencentcloud::gme::V20180711::DescribeUserInAndOutTimeRequest`
263
+ # @rtype: :class:`Tencentcloud::gme::V20180711::DescribeUserInAndOutTimeResponse`
264
+ def DescribeUserInAndOutTime(request)
265
+ body = send_request('DescribeUserInAndOutTime', request.serialize)
266
+ response = JSON.parse(body)
267
+ if response['Response'].key?('Error') == false
268
+ model = DescribeUserInAndOutTimeResponse.new
269
+ model.deserialize(response['Response'])
270
+ model
271
+ else
272
+ code = response['Response']['Error']['Code']
273
+ message = response['Response']['Error']['Message']
274
+ reqid = response['Response']['RequestId']
275
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
276
+ end
277
+ rescue TencentCloud::Common::TencentCloudSDKException => e
278
+ raise e
279
+ rescue StandardError => e
280
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
281
+ end
282
+
283
+ # 本接口(ModifyAppStatus)用于修改应用总开关状态。
284
+
285
+ # @param request: Request instance for ModifyAppStatus.
286
+ # @type request: :class:`Tencentcloud::gme::V20180711::ModifyAppStatusRequest`
287
+ # @rtype: :class:`Tencentcloud::gme::V20180711::ModifyAppStatusResponse`
288
+ def ModifyAppStatus(request)
289
+ body = send_request('ModifyAppStatus', request.serialize)
290
+ response = JSON.parse(body)
291
+ if response['Response'].key?('Error') == false
292
+ model = ModifyAppStatusResponse.new
293
+ model.deserialize(response['Response'])
294
+ model
295
+ else
296
+ code = response['Response']['Error']['Code']
297
+ message = response['Response']['Error']['Message']
298
+ reqid = response['Response']['RequestId']
299
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
300
+ end
301
+ rescue TencentCloud::Common::TencentCloudSDKException => e
302
+ raise e
303
+ rescue StandardError => e
304
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
305
+ end
306
+
307
+ # 修改房间信息
308
+
309
+ # @param request: Request instance for ModifyRoomInfo.
310
+ # @type request: :class:`Tencentcloud::gme::V20180711::ModifyRoomInfoRequest`
311
+ # @rtype: :class:`Tencentcloud::gme::V20180711::ModifyRoomInfoResponse`
312
+ def ModifyRoomInfo(request)
313
+ body = send_request('ModifyRoomInfo', request.serialize)
314
+ response = JSON.parse(body)
315
+ if response['Response'].key?('Error') == false
316
+ model = ModifyRoomInfoResponse.new
317
+ model.deserialize(response['Response'])
318
+ model
319
+ else
320
+ code = response['Response']['Error']['Code']
321
+ message = response['Response']['Error']['Message']
322
+ reqid = response['Response']['RequestId']
323
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
324
+ end
325
+ rescue TencentCloud::Common::TencentCloudSDKException => e
326
+ raise e
327
+ rescue StandardError => e
328
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
329
+ end
330
+
331
+ # 本接口(ScanVoice)用于提交语音检测任务,检测任务列表最多支持100个。使用前请您登录[控制台 - 服务配置](https://console.cloud.tencent.com/gamegme/conf)开启语音分析服务。
332
+ # </br></br>
333
+
334
+ # <h4><b>功能试用说明:</b></h4>
335
+ # <li>打开前往<a href="https://console.cloud.tencent.com/gamegme/tryout">控制台 - 产品试用</a>免费试用语音分析服务。</li>
336
+ # </br>
337
+
338
+ # <h4><b>接口功能说明:</b></h4>
339
+ # <li>支持对语音流或语音文件进行检测,判断其中是否包含违规内容。</li>
340
+ # <li>支持设置回调地址 Callback 获取检测结果,同时支持通过接口(查询语音检测结果)主动轮询获取检测结果。</li>
341
+ # <li>支持场景输入,包括:谩骂、色情、涉政等场景</li>
342
+ # <li>支持批量提交检测任务。检测任务列表最多支持100个。</li>
343
+ # </br>
344
+ # <h4><b>音频文件限制说明:</b></h4>
345
+ # <li>音频文件大小限制:100 M</li>
346
+ # <li>音频文件时长限制:30分钟</li>
347
+ # <li>音频文件格式支持的类型:.wav、.m4a、.amr、.mp3、.aac、.wma、.ogg</li>
348
+ # </br>
349
+ # <h4><b>语音流限制说明:</b></h4>
350
+ # <li>语音流格式支持的类型:.m3u8、.flv</li>
351
+ # <li>语音流支持的传输协议:RTMP、HTTP、HTTPS</li>
352
+ # <li>语音流时长限制:4小时</li>
353
+ # <li>支持音视频流分离并对音频流进行分析</li>
354
+ # </br>
355
+ # <h4 id="Label_Value"><b>Scenes 与 Label 参数说明:</b></h4>
356
+ # <p>提交语音检测任务时,需要指定 Scenes 场景参数,<font color="red">目前要求您设置 Scenes 参数值为:["default"]</font>;而在检测结果中,则包含请求时指定的场景,以及对应类型的检测结果。</p>
357
+ # <table>
358
+ # <thread>
359
+ # <tr>
360
+ # <th>场景</th>
361
+ # <th>描述</th>
362
+ # <th>Label</th>
363
+ # </tr>
364
+ # </thread>
365
+ # <tbody>
366
+ # <tr>
367
+ # <td>语音检测</td>
368
+ # <td>语音检测的检测类型</td>
369
+ # <td>
370
+ # <p>normal:正常文本</p>
371
+ # <p>porn:色情</p>
372
+ # <p>politics:涉政</p>
373
+ # <p>abuse:谩骂</p>
374
+ # <p>ad :广告</p>
375
+ # <p>terrorism:暴恐</p>
376
+ # <p>contraband :违禁</p>
377
+ # <p>customized:自定义词库。目前白名单开放,如有需要请<a href="https://cloud.tencent.com/apply/p/8809fjcik56">联系我们</a>。</p>
378
+ # </td>
379
+ # </tr>
380
+ # </tbody>
381
+ # </table>
382
+ # </br>
383
+ # <h4 id="Callback_Declare"><b>回调相关说明:</b></h4>
384
+ # <li>如果在请求参数中指定了回调地址参数 Callback,即一个 HTTP(S) 协议接口的 URL,则需要支持 POST 方法,传输数据编码采用 UTF-8。</li>
385
+ # <li>在推送回调数据后,接收到的 HTTP 状态码为 200 时,表示推送成功。</li>
386
+ # <li>HTTP 头参数说明:</li>
387
+ # <table>
388
+ # <thread>
389
+ # <tr>
390
+ # <th>名称</th>
391
+ # <th>类型</th>
392
+ # <th>是否必需</th>
393
+ # <th>描述</th>
394
+ # </tr>
395
+ # </thread>
396
+ # <tbody>
397
+ # <tr>
398
+ # <td>Signatue</td>
399
+ # <td>string</td>
400
+ # <td>是</td>
401
+ # <td>签名,具体见<a href="#Callback_Signatue">签名生成说明</a></td>
402
+ # </tr>
403
+ # </tbody>
404
+ # </table>
405
+ # <ul id="Callback_Signatue">
406
+ # <li>签名生成说明:</li>
407
+ # <ul>
408
+ # <li>使用 HMAC-SH1 算法, 最终结果做 BASE64 编码;</li>
409
+ # <li>签名原文串为 POST+body 的整个json内容(长度以 Content-Length 为准);</li>
410
+ # <li>签名key为应用的 SecretKey,可以通过控制台查看。</li>
411
+ # </ul>
412
+ # </ul>
413
+
414
+ # <li>回调示例如下<font color="red">(详细字段说明见结构:
415
+ # <a href="https://cloud.tencent.com/document/api/607/35375#DescribeScanResult" target="_blank">DescribeScanResult</a>)</font>:</li>
416
+ # <pre><code>{
417
+ # "Code": 0,
418
+ # "DataId": "1400000000_test_data_id",
419
+ # "ScanFinishTime": 1566720906,
420
+ # "HitFlag": true,
421
+ # "Live": false,
422
+ # "Msg": "",
423
+ # "ScanPiece": [{
424
+ # "DumpUrl": "",
425
+ # "HitFlag": true,
426
+ # "MainType": "abuse",
427
+ # "RoomId": "123",
428
+ # "OpenId": "xxx",
429
+ # "Info":"",
430
+ # "Offset": 0,
431
+ # "Duration": 3400,
432
+ # "PieceStartTime":1574684231,
433
+ # "ScanDetail": [{
434
+ # "EndTime": 1110,
435
+ # "KeyWord": "xxx",
436
+ # "Label": "abuse",
437
+ # "Rate": "90.00",
438
+ # "StartTime": 1110
439
+ # }, {
440
+ # "EndTime": 1380,
441
+ # "KeyWord": "xxx",
442
+ # "Label": "abuse",
443
+ # "Rate": "90.00",
444
+ # "StartTime": 930
445
+ # }, {
446
+ # "EndTime": 1560,
447
+ # "KeyWord": "xxx",
448
+ # "Label": "abuse",
449
+ # "Rate": "90.00",
450
+ # "StartTime": 930
451
+ # }, {
452
+ # "EndTime": 2820,
453
+ # "KeyWord": "xxx",
454
+ # "Label": "abuse",
455
+ # "Rate": "90.00",
456
+ # "StartTime": 2490
457
+ # }]
458
+ # }],
459
+ # "ScanStartTime": 1566720905,
460
+ # "Scenes": [
461
+ # "default"
462
+ # ],
463
+ # "Status": "Success",
464
+ # "TaskId": "xxx",
465
+ # "Url": "https://xxx/xxx.m4a"
466
+ # }
467
+ # </code></pre>
468
+
469
+ # @param request: Request instance for ScanVoice.
470
+ # @type request: :class:`Tencentcloud::gme::V20180711::ScanVoiceRequest`
471
+ # @rtype: :class:`Tencentcloud::gme::V20180711::ScanVoiceResponse`
472
+ def ScanVoice(request)
473
+ body = send_request('ScanVoice', request.serialize)
474
+ response = JSON.parse(body)
475
+ if response['Response'].key?('Error') == false
476
+ model = ScanVoiceResponse.new
477
+ model.deserialize(response['Response'])
478
+ model
479
+ else
480
+ code = response['Response']['Error']['Code']
481
+ message = response['Response']['Error']['Message']
482
+ reqid = response['Response']['RequestId']
483
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
484
+ end
485
+ rescue TencentCloud::Common::TencentCloudSDKException => e
486
+ raise e
487
+ rescue StandardError => e
488
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
489
+ end
490
+
491
+ # 本接口用于识别涉黄、涉政等违规音频,成功会回调配置在应用的回调地址。回调示例如下:
492
+ # {"BizId":0,"FileId":"test_file_id","FileName":"test_file_name","FileUrl":"test_file_url","OpenId":"test_open_id","TimeStamp":"0000-00-00 00:00:00","Data":[{"Type":1,"Word":"xx"}]}
493
+ # Type表示过滤类型,1:政治,2:色情,3:谩骂
494
+
495
+ # @param request: Request instance for VoiceFilter.
496
+ # @type request: :class:`Tencentcloud::gme::V20180711::VoiceFilterRequest`
497
+ # @rtype: :class:`Tencentcloud::gme::V20180711::VoiceFilterResponse`
498
+ def VoiceFilter(request)
499
+ body = send_request('VoiceFilter', request.serialize)
500
+ response = JSON.parse(body)
501
+ if response['Response'].key?('Error') == false
502
+ model = VoiceFilterResponse.new
503
+ model.deserialize(response['Response'])
504
+ model
505
+ else
506
+ code = response['Response']['Error']['Code']
507
+ message = response['Response']['Error']['Message']
508
+ reqid = response['Response']['RequestId']
509
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
510
+ end
511
+ rescue TencentCloud::Common::TencentCloudSDKException => e
512
+ raise e
513
+ rescue StandardError => e
514
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
515
+ end
516
+
517
+
518
+ end
519
+ end
520
+ end
521
+ end