tencentcloud-sdk-nodejs-vm 4.0.918 → 4.0.1042
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/README.md +55 -28
- package/package.json +1 -1
- package/src/services/vm/v20201229/vm_client.ts +6 -1
- package/src/services/vm/v20201229/vm_models.ts +177 -53
- package/src/services/vm/v20210922/vm_client.ts +6 -1
- package/src/services/vm/v20210922/vm_models.ts +224 -76
- package/tencentcloud/services/vm/v20201229/vm_models.d.ts +172 -53
- package/tencentcloud/services/vm/v20210922/vm_models.d.ts +219 -76
- package/products.md +0 -254
package/README.md
CHANGED
|
@@ -1,36 +1,66 @@
|
|
|
1
1
|
# 简介
|
|
2
2
|
|
|
3
|
-
欢迎使用腾讯云开发者工具套件(SDK),
|
|
4
|
-
为方便
|
|
3
|
+
欢迎使用腾讯云开发者工具套件(SDK),Node.js SDK 4.0 是云 API 3.0 平台的配套工具。
|
|
4
|
+
为方便 Node.js 开发者调试和接入腾讯云产品 API,这里向您介绍适用于 Node.js 的腾讯云开发工具包,并提供首次使用开发工具包的简单示例。让您快速获取腾讯云 Node.js SDK 并开始调用。
|
|
5
5
|
|
|
6
6
|
# 依赖环境
|
|
7
7
|
|
|
8
|
-
1.
|
|
9
|
-
2.
|
|
10
|
-
3. 获取 SecretID、SecretKey 以及调用地址(endpoint),endpoint 一般形式为\*.tencentcloudapi.com,如 CVM 的调用地址为 cvm.tencentcloudapi.com,具体参考各产品说明。
|
|
8
|
+
1. Node.js 10.0.0 版本及以上。
|
|
9
|
+
2. 注意:部分产品需在 [腾讯云控制台](https://console.cloud.tencent.com/) 开通服务后才能使用。
|
|
11
10
|
|
|
12
11
|
# 获取安装
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
使用 SDK 需要 API 密钥,可前往 [腾讯云控制台 - 访问密钥](https://console.cloud.tencent.com/cam/capi) 页面申请,API 密钥包括 SecretID 和 SecretKey,密钥须严格保管,避免泄露。
|
|
15
14
|
|
|
16
|
-
## 通过
|
|
15
|
+
## 通过 npm 安装
|
|
17
16
|
|
|
18
|
-
通过 npm 获取安装是使用
|
|
17
|
+
通过 npm 获取安装是使用 Node.js SDK 的推荐方法,关于 npm 详细可参考 [NPM 官网](https://www.npmjs.com/) 。
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
### 安装指定产品 SDK(推荐)
|
|
20
|
+
|
|
21
|
+
安装 CVM SDK:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
npm install tencentcloud-sdk-nodejs-cvm --save
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
安装 VPC SDK:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
npm install tencentcloud-sdk-nodejs-vpc --save
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
具体产品的缩写表请参考 [products.md](./products.md) 中的包名字段。
|
|
34
|
+
|
|
35
|
+
安装指定产品 SDK 后,注意修改引入的包名:
|
|
36
|
+
|
|
37
|
+
```diff
|
|
38
|
+
- const tencentcloud = require("tencentcloud-sdk-nodejs")
|
|
39
|
+
+ const { cvm } = require("tencentcloud-sdk-nodejs-cvm")
|
|
40
|
+
|
|
41
|
+
- const CvmClient = tencentcloud.cvm.v20170312.Client
|
|
42
|
+
+ const CvmClient = cvm.v20170312.Client
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### 安装全产品 SDK
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
npm install tencentcloud-sdk-nodejs --save
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
全产品 SDK 包含了所有云产品的调用代码,体积偏大,对体积敏感的场景,推荐安装指定产品 SDK。
|
|
24
52
|
|
|
25
53
|
## 通过源码包安装
|
|
26
54
|
|
|
27
|
-
1. 前往 [
|
|
55
|
+
1. 前往 [GitHub 仓库](https://github.com/tencentcloud/tencentcloud-sdk-nodejs) 或者 [Gitee 仓库](https://gitee.com/tencentcloud/tencentcloud-sdk-nodejs) 下载源码压缩包。
|
|
28
56
|
2. 解压源码包到您项目合适的位置,例如 `sdk/tencentcloud-sdk-nodejs`。
|
|
29
57
|
3. 执行 `npm install ./sdk/tencentcloud-sdk-nodejs`。
|
|
30
|
-
4. 使用 `require("tencentcloud-sdk-nodejs")` 的方式引入
|
|
58
|
+
4. 使用 `require("tencentcloud-sdk-nodejs")` 的方式引入 SDK,具体可参考示例。
|
|
31
59
|
|
|
32
60
|
# 示例
|
|
33
61
|
|
|
62
|
+
以云服务器产品查询可用区列表接口为例。
|
|
63
|
+
|
|
34
64
|
```js
|
|
35
65
|
const tencentcloud = require("tencentcloud-sdk-nodejs")
|
|
36
66
|
|
|
@@ -73,7 +103,7 @@ client.DescribeZones().then(
|
|
|
73
103
|
)
|
|
74
104
|
```
|
|
75
105
|
|
|
76
|
-
在支持
|
|
106
|
+
在支持 TypeScript 项目中,采用如下方式调用
|
|
77
107
|
|
|
78
108
|
```js
|
|
79
109
|
import * as tencentcloud from "tencentcloud-sdk-nodejs"
|
|
@@ -83,10 +113,11 @@ const CvmClient = tencentcloud.cvm.v20170312.Client
|
|
|
83
113
|
// ...
|
|
84
114
|
```
|
|
85
115
|
|
|
86
|
-
|
|
116
|
+
实例化 `Client` 的入参支持 `clientConfig`,数据结构和说明详见 [ClientConfig](https://github.com/TencentCloud/tencentcloud-sdk-nodejs/blob/master/src/common/interface.ts)。
|
|
87
117
|
|
|
88
118
|
## Common Client
|
|
89
|
-
|
|
119
|
+
|
|
120
|
+
从 4.0.714 版本开始,腾讯云 Node.js SDK 支持使用泛用性的 API 调用方式(Common Client)进行请求。您只需要安装 tencentcloud-sdk-nodejs-common 包,即可向任何产品发起调用。
|
|
90
121
|
|
|
91
122
|
**注意,您必须明确知道您调用的接口所需参数,否则可能会调用失败。**
|
|
92
123
|
|
|
@@ -94,19 +125,19 @@ const CvmClient = tencentcloud.cvm.v20170312.Client
|
|
|
94
125
|
|
|
95
126
|
## 更多示例
|
|
96
127
|
|
|
97
|
-
|
|
128
|
+
请参考 [examples](https://github.com/TencentCloud/tencentcloud-sdk-nodejs/tree/master/examples) 目录。
|
|
98
129
|
|
|
99
130
|
# 相关配置
|
|
100
131
|
|
|
101
132
|
## 代理
|
|
102
133
|
|
|
103
|
-
如果是有代理的环境下,需要配置代理,请在创建Client时传入 [profile.httpProfile.proxy](https://github.com/TencentCloud/tencentcloud-sdk-nodejs/blob/master/src/common/interface.ts#L78) 参数,或设置系统环境变量 `http_proxy` ,否则可能无法正常调用,抛出连接超时的异常。
|
|
134
|
+
如果是有代理的环境下,需要配置代理,请在创建 Client 时传入 [profile.httpProfile.proxy](https://github.com/TencentCloud/tencentcloud-sdk-nodejs/blob/master/src/common/interface.ts#L78) 参数,或设置系统环境变量 `http_proxy` ,否则可能无法正常调用,抛出连接超时的异常。
|
|
104
135
|
|
|
105
136
|
# 凭证管理
|
|
106
137
|
|
|
107
138
|
除显式传入凭证外,从 `v4.0.506` 起支持 [腾讯云实例角色](https://cloud.tencent.com/document/product/213/47668)
|
|
108
139
|
|
|
109
|
-
在您为实例绑定角色后,您可以在实例中访问相关元数据接口获取临时凭证。用法可参考 [js示例代码](./examples/cvm_role.js) 或 [ts示例代码](./examples/cvm_role.ts)
|
|
140
|
+
在您为实例绑定角色后,您可以在实例中访问相关元数据接口获取临时凭证。用法可参考 [js 示例代码](./examples/cvm_role.js) 或 [ts 示例代码](./examples/cvm_role.ts)
|
|
110
141
|
```javascript
|
|
111
142
|
// ...
|
|
112
143
|
const CvmRoleCredential = require("tencentcloud-sdk-nodejs/tencentcloud/common/cvm_role_credential").default
|
|
@@ -118,20 +149,16 @@ new XxxClient({
|
|
|
118
149
|
})
|
|
119
150
|
```
|
|
120
151
|
|
|
121
|
-
# 旧版 SDK
|
|
122
|
-
|
|
123
|
-
我们推荐使用新版 NODEJS SDK,如果一定要用旧版 SDK,请前往[github 仓库](https://github.com/CFETeam/qcloudapi-sdk)下载。
|
|
124
|
-
|
|
125
152
|
# 常见问题
|
|
126
|
-
- webpack打包出错/浏览器报错
|
|
153
|
+
- webpack 打包出错/浏览器报错
|
|
127
154
|
|
|
128
|
-
请**务必不要**将此
|
|
155
|
+
请**务必不要**将此 SDK 直接用于 Web 前端(包括小程序等),暴露密钥在这些环境非常不安全。
|
|
129
156
|
|
|
130
|
-
正确的做法是在自己的服务端引用此
|
|
157
|
+
正确的做法是在自己的服务端引用此 SDK,并保存好密钥,做好请求鉴权,前端再调用服务端执行业务流程。
|
|
131
158
|
|
|
132
159
|
- `The "original" argument must be of type Function.`
|
|
133
160
|
|
|
134
|
-
通常是因为
|
|
161
|
+
通常是因为 Node.js 版本低于 `v10` ,或处于非 Node.js 环境,请再次确认执行环境。
|
|
135
162
|
|
|
136
163
|
- 请求不通
|
|
137
164
|
|
package/package.json
CHANGED
|
@@ -18,10 +18,14 @@
|
|
|
18
18
|
import * as TencentCloudCommon from "tencentcloud-sdk-nodejs-common"
|
|
19
19
|
import {
|
|
20
20
|
ImageSegments,
|
|
21
|
+
TextPosition,
|
|
22
|
+
AudioLabelResult,
|
|
23
|
+
SpeakerResult,
|
|
21
24
|
ImageResultResult,
|
|
22
25
|
StorageInfo,
|
|
23
|
-
|
|
26
|
+
HitInfo,
|
|
24
27
|
CreateVideoModerationTaskResponse,
|
|
28
|
+
TravelResult,
|
|
25
29
|
TaskResult,
|
|
26
30
|
CancelTaskRequest,
|
|
27
31
|
DescribeTaskDetailResponse,
|
|
@@ -37,6 +41,7 @@ import {
|
|
|
37
41
|
TaskFilter,
|
|
38
42
|
RecognitionResult,
|
|
39
43
|
CancelTaskResponse,
|
|
44
|
+
BucketInfo,
|
|
40
45
|
AudioResultDetailTextResult,
|
|
41
46
|
SegmentCosUrlList,
|
|
42
47
|
RcbAsr,
|
|
@@ -39,6 +39,76 @@ export interface ImageSegments {
|
|
|
39
39
|
OffsetusTime?: string
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
/**
|
|
43
|
+
* 文本关键词命中位置信息
|
|
44
|
+
*/
|
|
45
|
+
export interface TextPosition {
|
|
46
|
+
/**
|
|
47
|
+
* 关键词在文本中的起始位置
|
|
48
|
+
*/
|
|
49
|
+
Start?: number
|
|
50
|
+
/**
|
|
51
|
+
* 关键词在文本中的结束位置
|
|
52
|
+
*/
|
|
53
|
+
End?: number
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* 敏感歌曲
|
|
58
|
+
*/
|
|
59
|
+
export interface AudioLabelResult {
|
|
60
|
+
/**
|
|
61
|
+
* 场景
|
|
62
|
+
*/
|
|
63
|
+
Scene?: string
|
|
64
|
+
/**
|
|
65
|
+
* 建议
|
|
66
|
+
*/
|
|
67
|
+
Suggestion?: number
|
|
68
|
+
/**
|
|
69
|
+
* 标签
|
|
70
|
+
*/
|
|
71
|
+
Label?: string
|
|
72
|
+
/**
|
|
73
|
+
* 歌曲名等
|
|
74
|
+
*/
|
|
75
|
+
Name?: string
|
|
76
|
+
/**
|
|
77
|
+
* 分数
|
|
78
|
+
*/
|
|
79
|
+
Score?: number
|
|
80
|
+
/**
|
|
81
|
+
* 开始时间
|
|
82
|
+
*/
|
|
83
|
+
StartTime?: number
|
|
84
|
+
/**
|
|
85
|
+
* 结束时间
|
|
86
|
+
*/
|
|
87
|
+
EndTime?: number
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* 说话人结果
|
|
92
|
+
*/
|
|
93
|
+
export interface SpeakerResult {
|
|
94
|
+
/**
|
|
95
|
+
* 标签
|
|
96
|
+
*/
|
|
97
|
+
Label?: string
|
|
98
|
+
/**
|
|
99
|
+
* 分数
|
|
100
|
+
*/
|
|
101
|
+
Score?: number
|
|
102
|
+
/**
|
|
103
|
+
* 开始时间
|
|
104
|
+
*/
|
|
105
|
+
StartTime?: number
|
|
106
|
+
/**
|
|
107
|
+
* 结束时间
|
|
108
|
+
*/
|
|
109
|
+
EndTime?: number
|
|
110
|
+
}
|
|
111
|
+
|
|
42
112
|
/**
|
|
43
113
|
* 图片输出结果的子结果
|
|
44
114
|
*/
|
|
@@ -110,22 +180,25 @@ export interface StorageInfo {
|
|
|
110
180
|
}
|
|
111
181
|
|
|
112
182
|
/**
|
|
113
|
-
*
|
|
114
|
-
参考腾讯云存储相关说明 https://cloud.tencent.com/document/product/436/44352
|
|
183
|
+
* 文本关键词命中信息
|
|
115
184
|
*/
|
|
116
|
-
export interface
|
|
185
|
+
export interface HitInfo {
|
|
117
186
|
/**
|
|
118
|
-
*
|
|
187
|
+
* 关键词
|
|
119
188
|
*/
|
|
120
|
-
|
|
189
|
+
Type?: string
|
|
121
190
|
/**
|
|
122
|
-
*
|
|
191
|
+
* 命中关键词
|
|
123
192
|
*/
|
|
124
|
-
|
|
193
|
+
Keyword?: string
|
|
125
194
|
/**
|
|
126
|
-
*
|
|
195
|
+
* 命中的自定义词库名
|
|
127
196
|
*/
|
|
128
|
-
|
|
197
|
+
LibName?: string
|
|
198
|
+
/**
|
|
199
|
+
* 关键词位置信息
|
|
200
|
+
*/
|
|
201
|
+
Positions?: Array<TextPosition>
|
|
129
202
|
}
|
|
130
203
|
|
|
131
204
|
/**
|
|
@@ -143,6 +216,40 @@ export interface CreateVideoModerationTaskResponse {
|
|
|
143
216
|
RequestId?: string
|
|
144
217
|
}
|
|
145
218
|
|
|
219
|
+
/**
|
|
220
|
+
* 出行结果
|
|
221
|
+
*/
|
|
222
|
+
export interface TravelResult {
|
|
223
|
+
/**
|
|
224
|
+
* 一级标签
|
|
225
|
+
*/
|
|
226
|
+
Label?: string
|
|
227
|
+
/**
|
|
228
|
+
* 二级标签
|
|
229
|
+
*/
|
|
230
|
+
SubLabel?: string
|
|
231
|
+
/**
|
|
232
|
+
* 风险等级
|
|
233
|
+
*/
|
|
234
|
+
RiskLevel?: string
|
|
235
|
+
/**
|
|
236
|
+
* 音频角色
|
|
237
|
+
*/
|
|
238
|
+
AudioRole?: string
|
|
239
|
+
/**
|
|
240
|
+
* 音频语音文本
|
|
241
|
+
*/
|
|
242
|
+
AudioText?: string
|
|
243
|
+
/**
|
|
244
|
+
* 开始时间
|
|
245
|
+
*/
|
|
246
|
+
StartTime?: number
|
|
247
|
+
/**
|
|
248
|
+
* 结束时间
|
|
249
|
+
*/
|
|
250
|
+
EndTime?: number
|
|
251
|
+
}
|
|
252
|
+
|
|
146
253
|
/**
|
|
147
254
|
* 创建任务时的返回结果
|
|
148
255
|
*/
|
|
@@ -388,60 +495,53 @@ export interface TaskLabel {
|
|
|
388
495
|
export interface ImageResultsResultDetail {
|
|
389
496
|
/**
|
|
390
497
|
* 该字段用于返回调用视频审核接口时传入的TaskInput参数中的任务名称,方便任务的识别与管理。
|
|
391
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
|
392
498
|
*/
|
|
393
499
|
Name?: string
|
|
394
500
|
/**
|
|
395
501
|
* 该字段用于返回图片OCR文本识别的检测结果,识别**上限在5000字节内**。
|
|
396
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
|
397
502
|
*/
|
|
398
503
|
Text?: string
|
|
399
504
|
/**
|
|
400
505
|
* 该字段用于返回图像审核子结果的详细位置信息,如坐标、大小、旋转角度等。详细返回内容敬请参考ImageResultsResultDetailLocation数据结构的描述。
|
|
401
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
|
402
506
|
*/
|
|
403
507
|
Location?: ImageResultsResultDetailLocation
|
|
404
508
|
/**
|
|
405
509
|
* 该字段用于返回检测结果所对应的恶意标签。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad**:广告,**Custom**:自定义违规;以及其他令人反感、不安全或不适宜的内容类型。
|
|
406
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
|
407
510
|
*/
|
|
408
511
|
Label?: string
|
|
409
512
|
/**
|
|
410
513
|
* 该字段**仅当Label为Custom:自定义关键词时该参数有效**,用于返回自定义库的ID,以方便自定义库管理和配置。
|
|
411
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
|
412
514
|
*/
|
|
413
515
|
LibId?: string
|
|
414
516
|
/**
|
|
415
517
|
* 该字段**仅当Label为Custom:自定义关键词时该参数有效**,用于返回自定义库的名称,以方便自定义库管理和配置。
|
|
416
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
|
417
518
|
*/
|
|
418
519
|
LibName?: string
|
|
419
520
|
/**
|
|
420
521
|
* 该字段用于返回检测文本命中的关键词信息,用于标注文本违规的具体原因(如:*加我微信*)。该参数可能会有多个返回值,代表命中的多个关键词;如返回值为空且Score不为空,则代表识别结果所对应的恶意标签(Label)是来自于语义模型判断的返回值。
|
|
421
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
|
422
522
|
*/
|
|
423
523
|
Keywords?: Array<string>
|
|
424
524
|
/**
|
|
425
525
|
* 该字段用于返回后续操作建议。当您获取到判定结果后,返回值表示具体的后续建议操作。<br>
|
|
426
526
|
返回值:**Block**:建议屏蔽,**Review** :建议人工复审,**Pass**:建议通过
|
|
427
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
|
428
527
|
*/
|
|
429
528
|
Suggestion?: string
|
|
430
529
|
/**
|
|
431
530
|
* 该字段用于返回当前标签下的置信度,取值范围:0(**置信度最低**)-100(**置信度最高** ),越高代表文本越有可能属于当前返回的标签;如:*色情 99*,则表明该文本非常有可能属于色情内容。
|
|
432
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
|
433
531
|
*/
|
|
434
532
|
Score?: number
|
|
435
533
|
/**
|
|
436
534
|
* 该字段用于返回恶意标签下对应的子标签的检测结果,如:*Porn-SexBehavior*等子标签。
|
|
437
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
|
438
535
|
*/
|
|
439
536
|
SubLabelCode?: string
|
|
440
537
|
/**
|
|
441
538
|
* 该字段用于返回恶意标签下对应的子标签的检测结果,如:*Porn-SexBehavior*等子标签。
|
|
442
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
|
443
539
|
*/
|
|
444
540
|
SubLabel?: string
|
|
541
|
+
/**
|
|
542
|
+
* 该字段用于返回OCR命中的关键词信息。
|
|
543
|
+
*/
|
|
544
|
+
OcrHitInfos?: Array<HitInfo>
|
|
445
545
|
}
|
|
446
546
|
|
|
447
547
|
/**
|
|
@@ -599,51 +699,66 @@ export interface CancelTaskResponse {
|
|
|
599
699
|
RequestId?: string
|
|
600
700
|
}
|
|
601
701
|
|
|
702
|
+
/**
|
|
703
|
+
* 文件桶信息
|
|
704
|
+
参考腾讯云存储相关说明 https://cloud.tencent.com/document/product/436/44352
|
|
705
|
+
*/
|
|
706
|
+
export interface BucketInfo {
|
|
707
|
+
/**
|
|
708
|
+
* 该字段用于标识腾讯云对象存储的存储桶名称,关于文件桶的详细信息敬请参考 [腾讯云存储相关说明](https://cloud.tencent.com/document/product/436/44352)。
|
|
709
|
+
*/
|
|
710
|
+
Bucket: string
|
|
711
|
+
/**
|
|
712
|
+
* 该字段用于标识腾讯云对象存储的托管机房的分布地区,对象存储 COS 的数据存放在这些地域的存储桶中。
|
|
713
|
+
*/
|
|
714
|
+
Region: string
|
|
715
|
+
/**
|
|
716
|
+
* 该字段用于标识腾讯云对象存储的对象Key,对象z作为基本单元被存放在存储桶中;用户可以通过腾讯云控制台、API、SDK 等多种方式管理对象。有关对象的详细描述敬请参阅相应 [产品文档](https://cloud.tencent.com/document/product/436/13324)。
|
|
717
|
+
*/
|
|
718
|
+
Object: string
|
|
719
|
+
}
|
|
720
|
+
|
|
602
721
|
/**
|
|
603
722
|
* 音频ASR文本审核结果
|
|
604
723
|
*/
|
|
605
724
|
export interface AudioResultDetailTextResult {
|
|
606
725
|
/**
|
|
607
726
|
* 该字段用于返回检测结果所对应的恶意标签。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad**:广告,**Custom**:自定义违规;以及其他令人反感、不安全或不适宜的内容类型。
|
|
608
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
|
609
727
|
*/
|
|
610
|
-
Label
|
|
728
|
+
Label?: string
|
|
611
729
|
/**
|
|
612
730
|
* 该字段用于返回ASR识别出的文本内容命中的关键词信息,用于标注内容违规的具体原因(如:加我微信)。该参数可能会有多个返回值,代表命中的多个关键词;若返回值为空,Score不为空,则代表识别结果所对应的恶意标签(Label)来自于语义模型判断的返回值。
|
|
613
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
|
614
731
|
*/
|
|
615
|
-
Keywords
|
|
732
|
+
Keywords?: Array<string>
|
|
616
733
|
/**
|
|
617
734
|
* 该字段**仅当Label为Custom:自定义关键词时该参数有效**,用于返回自定义库的ID,以方便自定义库管理和配置。
|
|
618
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
|
619
735
|
*/
|
|
620
|
-
LibId
|
|
736
|
+
LibId?: string
|
|
621
737
|
/**
|
|
622
738
|
* 该字段**仅当Label为Custom:自定义关键词时该参数有效**,用于返回自定义库的名称,以方便自定义库管理和配置。
|
|
623
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
|
624
739
|
*/
|
|
625
|
-
LibName
|
|
740
|
+
LibName?: string
|
|
626
741
|
/**
|
|
627
742
|
* 该字段用于返回当前标签下的置信度,取值范围:0(**置信度最低**)-100(**置信度最高**),越高代表文本越有可能属于当前返回的标签;如:*色情 99*,则表明该文本非常有可能属于色情内容。
|
|
628
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
|
629
743
|
*/
|
|
630
|
-
Score
|
|
744
|
+
Score?: number
|
|
631
745
|
/**
|
|
632
746
|
* 该字段用于返回后续操作建议。当您获取到判定结果后,返回值表示具体的后续建议操作。<br>
|
|
633
747
|
返回值:**Block**:建议屏蔽,**Review** :建议人工复审,**Pass**:建议通过
|
|
634
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
|
635
748
|
*/
|
|
636
|
-
Suggestion
|
|
749
|
+
Suggestion?: string
|
|
637
750
|
/**
|
|
638
751
|
* 该字段用于返回自定义关键词对应的词库类型,取值为**1**(黑白库)和**2**(自定义关键词库),若未配置自定义关键词库,则默认值为1(黑白库匹配)。
|
|
639
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
|
640
752
|
*/
|
|
641
|
-
LibType
|
|
753
|
+
LibType?: number
|
|
642
754
|
/**
|
|
643
755
|
* 该字段用于返回当前标签(Lable)下的二级标签。
|
|
644
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
|
645
756
|
*/
|
|
646
|
-
SubLabel
|
|
757
|
+
SubLabel?: string
|
|
758
|
+
/**
|
|
759
|
+
* 该字段用于返回命中的关键词信息
|
|
760
|
+
*/
|
|
761
|
+
HitInfos?: Array<HitInfo>
|
|
647
762
|
}
|
|
648
763
|
|
|
649
764
|
/**
|
|
@@ -699,70 +814,77 @@ export interface RcbAsr {
|
|
|
699
814
|
export interface AudioResult {
|
|
700
815
|
/**
|
|
701
816
|
* 该字段用于返回审核内容是否命中审核模型;取值:0(**未命中**)、1(**命中**)。
|
|
702
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
|
703
817
|
*/
|
|
704
818
|
HitFlag?: number
|
|
705
819
|
/**
|
|
706
820
|
* 该字段用于返回检测结果所对应的恶意标签。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad**:广告,**Custom**:自定义违规;以及其他令人反感、不安全或不适宜的内容类型。
|
|
707
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
|
708
821
|
*/
|
|
709
822
|
Label?: string
|
|
710
823
|
/**
|
|
711
824
|
* 该字段用于返回后续操作建议。当您获取到判定结果后,返回值表示具体的后续建议操作。<br>
|
|
712
825
|
返回值:**Block**:建议屏蔽,**Review** :建议人工复审,**Pass**:建议通过
|
|
713
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
|
714
826
|
*/
|
|
715
827
|
Suggestion?: string
|
|
716
828
|
/**
|
|
717
829
|
* 该字段用于返回当前标签下的置信度,取值范围:0(**置信度最低**)-100(**置信度最高** ),越高代表文本越有可能属于当前返回的标签;如:*色情 99*,则表明该文本非常有可能属于色情内容。
|
|
718
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
|
719
830
|
*/
|
|
720
831
|
Score?: number
|
|
721
832
|
/**
|
|
722
833
|
* 该字段用于返回音频文件经ASR识别后的文本信息。最长可识别**5小时**的音频文件,若超出时长限制,接口将会报错。
|
|
723
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
|
724
834
|
*/
|
|
725
835
|
Text?: string
|
|
726
836
|
/**
|
|
727
837
|
* 该字段用于返回审核结果的访问链接(URL)。<br>备注:链接默认有效期为12小时。如果您需要更长时效的链接,请使用[COS预签名](https://cloud.tencent.com/document/product/1265/104001)功能更新签名时效。
|
|
728
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
|
729
838
|
*/
|
|
730
839
|
Url?: string
|
|
731
840
|
/**
|
|
732
841
|
* 该字段用于返回音频文件的时长,单位为毫秒。
|
|
733
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
|
734
842
|
*/
|
|
735
843
|
Duration?: string
|
|
736
844
|
/**
|
|
737
845
|
* 该字段用于返回输入参数中的额外附加信息(Extra),如未配置则默认返回值为空。<br>备注:不同客户或Biztype下返回信息不同,如需配置该字段请提交工单咨询或联系售后专员处理。
|
|
738
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
|
739
846
|
*/
|
|
740
847
|
Extra?: string
|
|
741
848
|
/**
|
|
742
849
|
* 该字段用于返回音频文件经ASR识别后产生的文本的详细审核结果。具体结果内容请参见AudioResultDetailLanguageResult数据结构的细节描述。
|
|
743
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
|
744
850
|
*/
|
|
745
851
|
TextResults?: Array<AudioResultDetailTextResult>
|
|
746
852
|
/**
|
|
747
853
|
* 该字段用于返回音频文件呻吟检测的详细审核结果。具体结果内容请参见AudioResultDetailMoanResult数据结构的细节描述。
|
|
748
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
|
749
854
|
*/
|
|
750
855
|
MoanResults?: Array<AudioResultDetailMoanResult>
|
|
751
856
|
/**
|
|
752
857
|
* 该字段用于返回音频小语种检测的详细审核结果。具体结果内容请参见AudioResultDetailLanguageResult数据结构的细节描述。
|
|
753
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
|
754
858
|
*/
|
|
755
859
|
LanguageResults?: Array<AudioResultDetailLanguageResult>
|
|
756
860
|
/**
|
|
757
861
|
* 该字段用于返回当前标签(Lable)下的二级标签。
|
|
758
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
|
759
862
|
*/
|
|
760
863
|
SubLabel?: string
|
|
761
864
|
/**
|
|
762
865
|
* 识别类标签结果信息列表
|
|
763
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
|
764
866
|
*/
|
|
765
867
|
RecognitionResults?: Array<RecognitionResult>
|
|
868
|
+
/**
|
|
869
|
+
* 该字段用于返回音频文件说话人检测的详细审核结果。
|
|
870
|
+
*/
|
|
871
|
+
SpeakerResults?: Array<SpeakerResult>
|
|
872
|
+
/**
|
|
873
|
+
* 该字段用于返回音频文件歌曲检测的详细审核结果。
|
|
874
|
+
*/
|
|
875
|
+
LabelResults?: Array<AudioLabelResult>
|
|
876
|
+
/**
|
|
877
|
+
* 该字段用于返回音频文件出行检测的详细审核结果。
|
|
878
|
+
*/
|
|
879
|
+
TravelResults?: Array<TravelResult>
|
|
880
|
+
/**
|
|
881
|
+
* 三级标签
|
|
882
|
+
*/
|
|
883
|
+
SubTag?: string
|
|
884
|
+
/**
|
|
885
|
+
* 三级标签码
|
|
886
|
+
*/
|
|
887
|
+
SubTagCode?: string
|
|
766
888
|
}
|
|
767
889
|
|
|
768
890
|
/**
|
|
@@ -909,14 +1031,16 @@ export interface Tag {
|
|
|
909
1031
|
export interface AudioSegments {
|
|
910
1032
|
/**
|
|
911
1033
|
* 该字段用于返回音频片段的开始时间,单位为秒。对于点播文件,该参数代表对应音频相对于完整音轨的偏移时间,如0(代表不偏移),5(音轨开始后5秒),10(音轨开始后10秒);对于直播文件,该参数则返回对应音频片段开始时的Unix时间戳,如:1594650717。
|
|
912
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
|
913
1034
|
*/
|
|
914
|
-
OffsetTime
|
|
1035
|
+
OffsetTime?: string
|
|
915
1036
|
/**
|
|
916
1037
|
* 该字段用于返回音频片段的具体审核结果,详细内容敬请参考AudioResult数据结构的描述。
|
|
917
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
|
918
1038
|
*/
|
|
919
|
-
Result
|
|
1039
|
+
Result?: AudioResult
|
|
1040
|
+
/**
|
|
1041
|
+
* 创建时间
|
|
1042
|
+
*/
|
|
1043
|
+
CreatedAt?: string
|
|
920
1044
|
}
|
|
921
1045
|
|
|
922
1046
|
/**
|
|
@@ -18,20 +18,25 @@
|
|
|
18
18
|
import * as TencentCloudCommon from "tencentcloud-sdk-nodejs-common"
|
|
19
19
|
import {
|
|
20
20
|
ImageSegments,
|
|
21
|
+
TextPosition,
|
|
22
|
+
SpeakerResult,
|
|
21
23
|
ImageResultResult,
|
|
22
24
|
StorageInfo,
|
|
23
25
|
BucketInfo,
|
|
24
26
|
CreateVideoModerationTaskResponse,
|
|
27
|
+
TravelResult,
|
|
25
28
|
TaskResult,
|
|
29
|
+
TaskLabel,
|
|
26
30
|
CancelTaskRequest,
|
|
27
31
|
DescribeTaskDetailResponse,
|
|
28
32
|
DescribeTasksRequest,
|
|
29
33
|
TaskInput,
|
|
30
34
|
DescribeTaskDetailRequest,
|
|
31
35
|
User,
|
|
32
|
-
|
|
36
|
+
LabelResult,
|
|
33
37
|
ImageResultsResultDetail,
|
|
34
38
|
InputInfo,
|
|
39
|
+
OcrHitInfo,
|
|
35
40
|
CreateVideoModerationTaskRequest,
|
|
36
41
|
DescribeTasksResponse,
|
|
37
42
|
AudioResultDetailLanguageResult,
|