tencentcloud-sdk-nodejs-intl-en 3.0.405 → 3.0.408
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.
- package/package.json +1 -1
- package/tencentcloud/ams/index.js +3 -0
- package/tencentcloud/ams/v20201229/ams_client.js +123 -0
- package/tencentcloud/ams/v20201229/index.js +4 -0
- package/tencentcloud/ams/v20201229/models.js +1442 -0
- package/tencentcloud/common/sdk_version.js +1 -1
- package/tencentcloud/ims/index.js +3 -0
- package/tencentcloud/ims/v20201229/ims_client.js +93 -0
- package/tencentcloud/ims/v20201229/index.js +4 -0
- package/tencentcloud/ims/v20201229/models.js +1072 -0
- package/tencentcloud/index.js +4 -0
- package/tencentcloud/tms/index.js +3 -0
- package/tencentcloud/tms/v20201229/index.js +4 -0
- package/tencentcloud/tms/v20201229/models.js +494 -0
- package/tencentcloud/tms/v20201229/tms_client.js +67 -0
- package/tencentcloud/vm/index.js +3 -0
- package/tencentcloud/vm/v20201229/index.js +4 -0
- package/tencentcloud/vm/v20201229/models.js +1855 -0
- package/tencentcloud/vm/v20201229/vm_client.js +147 -0
package/package.json
CHANGED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing,
|
|
11
|
+
* software distributed under the License is distributed on an
|
|
12
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
13
|
+
* KIND, either express or implied. See the License for the
|
|
14
|
+
* specific language governing permissions and limitations
|
|
15
|
+
* under the License.
|
|
16
|
+
*/
|
|
17
|
+
const models = require("./models");
|
|
18
|
+
const AbstractClient = require('../../common/abstract_client')
|
|
19
|
+
const DescribeTasksRequest = models.DescribeTasksRequest;
|
|
20
|
+
const StorageInfo = models.StorageInfo;
|
|
21
|
+
const BucketInfo = models.BucketInfo;
|
|
22
|
+
const CreateAudioModerationTaskResponse = models.CreateAudioModerationTaskResponse;
|
|
23
|
+
const TaskResult = models.TaskResult;
|
|
24
|
+
const CancelTaskRequest = models.CancelTaskRequest;
|
|
25
|
+
const DescribeTaskDetailResponse = models.DescribeTaskDetailResponse;
|
|
26
|
+
const CreateAudioModerationTaskRequest = models.CreateAudioModerationTaskRequest;
|
|
27
|
+
const TaskInput = models.TaskInput;
|
|
28
|
+
const DescribeTaskDetailRequest = models.DescribeTaskDetailRequest;
|
|
29
|
+
const TaskLabel = models.TaskLabel;
|
|
30
|
+
const TaskFilter = models.TaskFilter;
|
|
31
|
+
const InputInfo = models.InputInfo;
|
|
32
|
+
const DescribeTasksResponse = models.DescribeTasksResponse;
|
|
33
|
+
const AudioResultDetailLanguageResult = models.AudioResultDetailLanguageResult;
|
|
34
|
+
const CancelTaskResponse = models.CancelTaskResponse;
|
|
35
|
+
const AudioResultDetailTextResult = models.AudioResultDetailTextResult;
|
|
36
|
+
const AudioResult = models.AudioResult;
|
|
37
|
+
const AudioResultDetailMoanResult = models.AudioResultDetailMoanResult;
|
|
38
|
+
const TaskData = models.TaskData;
|
|
39
|
+
const MediaInfo = models.MediaInfo;
|
|
40
|
+
const AudioSegments = models.AudioSegments;
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* ams client
|
|
45
|
+
* @class
|
|
46
|
+
*/
|
|
47
|
+
class AmsClient extends AbstractClient {
|
|
48
|
+
|
|
49
|
+
constructor(credential, region, profile) {
|
|
50
|
+
super("ams.tencentcloudapi.com", "2020-12-29", credential, region, profile);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* This API is used to submit audio content (such as an audio file or stream URL) for smart moderation. Before using it, you need to log in to the console with the Tencent Cloud root account [to activate AMS](https://console.cloud.tencent.com/cms/audio/package) and adjust the business configuration.<br>
|
|
55
|
+
|
|
56
|
+
### Feature use instructions
|
|
57
|
+
- Go to the "[CMS console - AMS](https://console.cloud.tencent.com/cms/audio/package)" to activate AMS.
|
|
58
|
+
- Default API request rate limit: **20 requests/sec**. When this limit is exceeded, requests for async moderation tasks (audio on demand) will automatically join the queue of requests pending moderation, while an error will be reported for sync moderation tasks (audio live streaming).
|
|
59
|
+
|
|
60
|
+
### API feature description
|
|
61
|
+
- It can detect audio streams or files for non-compliant content;
|
|
62
|
+
- You can set the callback address (Callback) to get the detection result (for moderation tasks in progress, the maximum callback time is the configured **segment length + 2s). You can also call the API for querying the audio detection result to poll the detection result;
|
|
63
|
+
- It can recognize various types of non-compliant content, including vulgarity, abuse, porn, and advertising;
|
|
64
|
+
- You can submit **up to 10** detection tasks at a time.
|
|
65
|
+
|
|
66
|
+
### Call description for audio file
|
|
67
|
+
- Supported audio file size: **< 500 MB**;
|
|
68
|
+
- Supported audio file duration: **< 1 hour**;
|
|
69
|
+
- Supported audio bitrate: 128–256 Kbps;
|
|
70
|
+
- Supported audio file formats: WAV, MP3, AAC, FLAC, AMR, 3GP, M4A, WMA, OGG, and APE;
|
|
71
|
+
- **When the input is a video file**, the audio track can be extracted from it for audio content moderation.
|
|
72
|
+
|
|
73
|
+
### Call description for audio stream
|
|
74
|
+
- Supported audio stream duration: **< 3 hours**;
|
|
75
|
+
- Supported audio bitrate: 128–256 Kbps;
|
|
76
|
+
- Supported audio stream transfer protocols: RTMP, HTTP, and HTTPS;
|
|
77
|
+
- Supported audio stream formats: RTP, SRTP, RTMP, RTMPS, MMSH, MMST, HLS, HTTP, TCP, HTTPS, and M3U8;
|
|
78
|
+
- **When the input is a video stream**, the audio track can be extracted from it for audio content moderation.
|
|
79
|
+
* @param {CreateAudioModerationTaskRequest} req
|
|
80
|
+
* @param {function(string, CreateAudioModerationTaskResponse):void} cb
|
|
81
|
+
* @public
|
|
82
|
+
*/
|
|
83
|
+
CreateAudioModerationTask(req, cb) {
|
|
84
|
+
let resp = new CreateAudioModerationTaskResponse();
|
|
85
|
+
this.request("CreateAudioModerationTask", req, resp, cb);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* This API is used to view the details of an audio moderation task, including task status, detection result, recognized text content of the audio file, maliciousness tag that corresponds to the detection result, and suggested operation. For the specific output content, see the sample output parameters.<br>Default API request rate limit: **100 requests/sec**.
|
|
90
|
+
* @param {DescribeTaskDetailRequest} req
|
|
91
|
+
* @param {function(string, DescribeTaskDetailResponse):void} cb
|
|
92
|
+
* @public
|
|
93
|
+
*/
|
|
94
|
+
DescribeTaskDetail(req, cb) {
|
|
95
|
+
let resp = new DescribeTaskDetailResponse();
|
|
96
|
+
this.request("DescribeTaskDetail", req, resp, cb);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* This API is used to view the list of moderation tasks. You can also filter moderation tasks by multiple types of business information, such as business type, moderation result, and task status. The output content of the task list includes the total number of queried tasks, task name, task status, audio moderation type, maliciousness tag of the detection result, and suggested operation. For the specific output content, see the sample output parameters.<br>Default API request rate limit: **20 requests/sec**.
|
|
101
|
+
* @param {DescribeTasksRequest} req
|
|
102
|
+
* @param {function(string, DescribeTasksResponse):void} cb
|
|
103
|
+
* @public
|
|
104
|
+
*/
|
|
105
|
+
DescribeTasks(req, cb) {
|
|
106
|
+
let resp = new DescribeTasksResponse();
|
|
107
|
+
this.request("DescribeTasks", req, resp, cb);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* This API is used to cancel a moderation task. If it returns `RequestId`, the task has been canceled successfully.<br>Default API request rate limit: **20 requests/sec**.
|
|
112
|
+
* @param {CancelTaskRequest} req
|
|
113
|
+
* @param {function(string, CancelTaskResponse):void} cb
|
|
114
|
+
* @public
|
|
115
|
+
*/
|
|
116
|
+
CancelTask(req, cb) {
|
|
117
|
+
let resp = new CancelTaskResponse();
|
|
118
|
+
this.request("CancelTask", req, resp, cb);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
}
|
|
123
|
+
module.exports = AmsClient;
|