tencentcloud-sdk-nodejs-vtc 4.0.857
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/LICENSE +201 -0
- package/README.md +154 -0
- package/index.d.ts +2 -0
- package/index.js +6 -0
- package/package.json +47 -0
- package/prettier.config.js +38 -0
- package/products.md +249 -0
- package/src/index.ts +1 -0
- package/src/services/index.ts +1 -0
- package/src/services/vtc/index.ts +5 -0
- package/src/services/vtc/v20240223/index.ts +6 -0
- package/src/services/vtc/v20240223/vtc_client.ts +69 -0
- package/src/services/vtc/v20240223/vtc_models.ts +219 -0
- package/tencentcloud/index.d.ts +1 -0
- package/tencentcloud/index.js +4 -0
- package/tencentcloud/services/index.d.ts +1 -0
- package/tencentcloud/services/index.js +4 -0
- package/tencentcloud/services/vtc/index.d.ts +6 -0
- package/tencentcloud/services/vtc/index.js +7 -0
- package/tencentcloud/services/vtc/v20240223/index.d.ts +6 -0
- package/tencentcloud/services/vtc/v20240223/index.js +9 -0
- package/tencentcloud/services/vtc/v20240223/vtc_client.d.ts +21 -0
- package/tencentcloud/services/vtc/v20240223/vtc_client.js +49 -0
- package/tencentcloud/services/vtc/v20240223/vtc_models.d.ts +194 -0
- package/tencentcloud/services/vtc/v20240223/vtc_models.js +18 -0
- package/tsconfig.json +33 -0
- package/typings/index.d.ts +2 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Client = void 0;
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
5
|
+
/*
|
|
6
|
+
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing,
|
|
15
|
+
* software distributed under the License is distributed on an
|
|
16
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
17
|
+
* KIND, either express or implied. See the License for the
|
|
18
|
+
* specific language governing permissions and limitations
|
|
19
|
+
* under the License.
|
|
20
|
+
*/
|
|
21
|
+
const TencentCloudCommon = require("tencentcloud-sdk-nodejs-common");
|
|
22
|
+
/**
|
|
23
|
+
* vtc client
|
|
24
|
+
* @class
|
|
25
|
+
*/
|
|
26
|
+
class Client extends TencentCloudCommon.AbstractClient {
|
|
27
|
+
constructor(clientConfig) {
|
|
28
|
+
super("vtc.tencentcloudapi.com", "2024-02-23", clientConfig);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* 提交视频转译任务
|
|
32
|
+
*/
|
|
33
|
+
async SubmitVideoTranslateJob(req, cb) {
|
|
34
|
+
return this.request("SubmitVideoTranslateJob", req, cb);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* 查询视频翻译任务
|
|
38
|
+
*/
|
|
39
|
+
async DescribeVideoTranslateJob(req, cb) {
|
|
40
|
+
return this.request("DescribeVideoTranslateJob", req, cb);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* 确认视频翻译结果
|
|
44
|
+
*/
|
|
45
|
+
async ConfirmVideoTranslateJob(req, cb) {
|
|
46
|
+
return this.request("ConfirmVideoTranslateJob", req, cb);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.Client = Client;
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 文本片段及其时间戳
|
|
3
|
+
*/
|
|
4
|
+
export interface AsrTimestamps {
|
|
5
|
+
/**
|
|
6
|
+
* 文本片段
|
|
7
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
|
8
|
+
*/
|
|
9
|
+
Text?: string;
|
|
10
|
+
/**
|
|
11
|
+
* 开始时间
|
|
12
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
|
13
|
+
*/
|
|
14
|
+
StartMs?: number;
|
|
15
|
+
/**
|
|
16
|
+
* 结束时间
|
|
17
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
|
18
|
+
*/
|
|
19
|
+
EndMs?: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* ConfirmVideoTranslateJob请求参数结构体
|
|
23
|
+
*/
|
|
24
|
+
export interface ConfirmVideoTranslateJobRequest {
|
|
25
|
+
/**
|
|
26
|
+
* 视频翻译任务 ID
|
|
27
|
+
*/
|
|
28
|
+
JobId: string;
|
|
29
|
+
/**
|
|
30
|
+
* 待确认文本
|
|
31
|
+
*/
|
|
32
|
+
TranslateResults: Array<AudioTranslateResult>;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* SubmitVideoTranslateJob请求参数结构体
|
|
36
|
+
*/
|
|
37
|
+
export interface SubmitVideoTranslateJobRequest {
|
|
38
|
+
/**
|
|
39
|
+
* 视频地址URL。
|
|
40
|
+
*/
|
|
41
|
+
VideoUrl: string;
|
|
42
|
+
/**
|
|
43
|
+
* 源语言:zh, en
|
|
44
|
+
*/
|
|
45
|
+
SrcLang: string;
|
|
46
|
+
/**
|
|
47
|
+
* 目标语言:zh, en
|
|
48
|
+
*/
|
|
49
|
+
DstLang: string;
|
|
50
|
+
/**
|
|
51
|
+
* 当音频 URL 不为空时,默认以音频驱动视频任务口型
|
|
52
|
+
*/
|
|
53
|
+
AudioUrl?: string;
|
|
54
|
+
/**
|
|
55
|
+
* 是否需要确认翻译结果0:不需要,1:需要
|
|
56
|
+
*/
|
|
57
|
+
Confirm?: number;
|
|
58
|
+
/**
|
|
59
|
+
* 是否开启口型驱动,0:不开启,1:开启。默认开启。
|
|
60
|
+
*/
|
|
61
|
+
LipSync?: number;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* ConfirmVideoTranslateJob返回参数结构体
|
|
65
|
+
*/
|
|
66
|
+
export interface ConfirmVideoTranslateJobResponse {
|
|
67
|
+
/**
|
|
68
|
+
* 视频翻译任务 ID
|
|
69
|
+
*/
|
|
70
|
+
JobId?: string;
|
|
71
|
+
/**
|
|
72
|
+
* 音频转换任务 ID
|
|
73
|
+
*/
|
|
74
|
+
TaskId?: string;
|
|
75
|
+
/**
|
|
76
|
+
* 音频翻译结果确认 session
|
|
77
|
+
*/
|
|
78
|
+
SessionId?: string;
|
|
79
|
+
/**
|
|
80
|
+
* 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
81
|
+
*/
|
|
82
|
+
RequestId?: string;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* DescribeVideoTranslateJob请求参数结构体
|
|
86
|
+
*/
|
|
87
|
+
export interface DescribeVideoTranslateJobRequest {
|
|
88
|
+
/**
|
|
89
|
+
* JobId。
|
|
90
|
+
*/
|
|
91
|
+
JobId: string;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* SubmitVideoTranslateJob返回参数结构体
|
|
95
|
+
*/
|
|
96
|
+
export interface SubmitVideoTranslateJobResponse {
|
|
97
|
+
/**
|
|
98
|
+
* 任务ID。
|
|
99
|
+
*/
|
|
100
|
+
JobId?: string;
|
|
101
|
+
/**
|
|
102
|
+
* 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
103
|
+
*/
|
|
104
|
+
RequestId?: string;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* 音频翻译结果。
|
|
108
|
+
*/
|
|
109
|
+
export interface TranslateResult {
|
|
110
|
+
/**
|
|
111
|
+
* 翻译源文字。
|
|
112
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
|
113
|
+
*/
|
|
114
|
+
SourceText?: string;
|
|
115
|
+
/**
|
|
116
|
+
* 翻译后文字。
|
|
117
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
|
118
|
+
*/
|
|
119
|
+
TargetText?: string;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* 音频翻译结果
|
|
123
|
+
*/
|
|
124
|
+
export interface AudioTranslateResult {
|
|
125
|
+
/**
|
|
126
|
+
* 原文本
|
|
127
|
+
*/
|
|
128
|
+
SourceText: string;
|
|
129
|
+
/**
|
|
130
|
+
* 目标文本
|
|
131
|
+
*/
|
|
132
|
+
TargetText: string;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* DescribeVideoTranslateJob返回参数结构体
|
|
136
|
+
*/
|
|
137
|
+
export interface DescribeVideoTranslateJobResponse {
|
|
138
|
+
/**
|
|
139
|
+
* 任务状态。 1:音频翻译中。 2:音频翻译失败。 3:音频翻译成功。 4:音频结果待确认。 5:音频结果已确认完毕。6:视频翻译中。 7:视频翻译失败。 8:视频翻译成功。
|
|
140
|
+
*/
|
|
141
|
+
JobStatus?: number;
|
|
142
|
+
/**
|
|
143
|
+
* 任务错误码。
|
|
144
|
+
*/
|
|
145
|
+
JobErrorCode?: string;
|
|
146
|
+
/**
|
|
147
|
+
* 任务错误信息。
|
|
148
|
+
*/
|
|
149
|
+
JobErrorMsg?: string;
|
|
150
|
+
/**
|
|
151
|
+
* 视频翻译结果。
|
|
152
|
+
*/
|
|
153
|
+
ResultVideoUrl?: string;
|
|
154
|
+
/**
|
|
155
|
+
* 音频翻译结果。
|
|
156
|
+
*/
|
|
157
|
+
TranslateResults?: Array<TranslateResult>;
|
|
158
|
+
/**
|
|
159
|
+
* 是否需要确认翻译结果。0:不需要,1:需要
|
|
160
|
+
*/
|
|
161
|
+
JobConfirm?: number;
|
|
162
|
+
/**
|
|
163
|
+
* 音频任务 ID
|
|
164
|
+
*/
|
|
165
|
+
JobAudioTaskId?: string;
|
|
166
|
+
/**
|
|
167
|
+
* 视频审核任务ID
|
|
168
|
+
*/
|
|
169
|
+
JobVideoModerationId?: string;
|
|
170
|
+
/**
|
|
171
|
+
* 视频生成任务 ID
|
|
172
|
+
*/
|
|
173
|
+
JobVideoId?: string;
|
|
174
|
+
/**
|
|
175
|
+
* 视频素材原始 URL
|
|
176
|
+
*/
|
|
177
|
+
OriginalVideoUrl?: string;
|
|
178
|
+
/**
|
|
179
|
+
* 文本片段及其时间戳
|
|
180
|
+
*/
|
|
181
|
+
AsrTimestamps?: Array<AsrTimestamps>;
|
|
182
|
+
/**
|
|
183
|
+
* 提交视频翻译任务时的 requestId
|
|
184
|
+
*/
|
|
185
|
+
JobSubmitReqId?: string;
|
|
186
|
+
/**
|
|
187
|
+
* 音频审核任务 ID
|
|
188
|
+
*/
|
|
189
|
+
JobAudioModerationId?: string;
|
|
190
|
+
/**
|
|
191
|
+
* 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
192
|
+
*/
|
|
193
|
+
RequestId?: string;
|
|
194
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 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,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
// "incremental": true, /* 增量编译 提高编译速度*/
|
|
4
|
+
"target": "ES2019" /* 编译目标ES版本*/,
|
|
5
|
+
"module": "commonjs" /* 编译目标模块系统*/,
|
|
6
|
+
// "lib": [], /* 编译过程中需要引入的库文件列表*/
|
|
7
|
+
"declaration": true /* 编译时创建声明文件 */,
|
|
8
|
+
"outDir": "tencentcloud" /* ts编译输出目录 */,
|
|
9
|
+
"rootDir": "src" /* ts编译根目录. */,
|
|
10
|
+
"importHelpers": true /* 从tslib导入辅助工具函数(如__importDefault)*/,
|
|
11
|
+
"strict": true /* 严格模式开关 等价于noImplicitAny、strictNullChecks、strictFunctionTypes、strictBindCallApply等设置true */,
|
|
12
|
+
"strictNullChecks": false,
|
|
13
|
+
"noUnusedLocals": false /* 未使用局部变量报错*/,
|
|
14
|
+
"noUnusedParameters": false /* 未使用参数报错*/,
|
|
15
|
+
"noImplicitReturns": true /* 有代码路径没有返回值时报错*/,
|
|
16
|
+
"noFallthroughCasesInSwitch": true /* 不允许switch的case语句贯穿*/,
|
|
17
|
+
"moduleResolution": "node" /* 模块解析策略 */,
|
|
18
|
+
"typeRoots": [
|
|
19
|
+
/* 要包含的类型声明文件路径列表*/
|
|
20
|
+
"./typings",
|
|
21
|
+
"./node_modules/@types"
|
|
22
|
+
],
|
|
23
|
+
"allowSyntheticDefaultImports": true /* 允许从没有设置默认导出的模块中默认导入,仅用于提示,不影响编译结果*/,
|
|
24
|
+
"esModuleInterop": false /* 允许编译生成文件时,在代码中注入工具类(__importDefault、__importStar)对ESM与commonjs混用情况做兼容处理*/,
|
|
25
|
+
"sourceMap": false
|
|
26
|
+
},
|
|
27
|
+
"include": [
|
|
28
|
+
/* 需要编译的文件 */
|
|
29
|
+
"src/**/*.ts",
|
|
30
|
+
"typings/**/*.ts"
|
|
31
|
+
],
|
|
32
|
+
"exclude": []
|
|
33
|
+
}
|