tencentcloud-sdk-nodejs-tmt 4.0.1027 → 4.1.38

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/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- import * as tencentcloud from './tencentcloud';
2
- export default tencentcloud;
package/index.js DELETED
@@ -1,6 +0,0 @@
1
- 'use strict'
2
- Object.defineProperty(exports, '__esModule', { value: true })
3
- const tslib_1 = require('tslib')
4
- const tencentcloud = tslib_1.__importStar(require('./tencentcloud'))
5
- exports.default = tencentcloud
6
- //# sourceMappingURL=index.js.map
@@ -1,38 +0,0 @@
1
- // prettier.config.js
2
- module.exports = {
3
- // 一行最多 100 字符
4
- printWidth: 100,
5
- // 使用 4 个空格缩进
6
- tabWidth: 2,
7
- // 不使用缩进符,而使用空格
8
- useTabs: false,
9
- // 行尾需要有分号
10
- semi: false,
11
- // 使用单引号
12
- singleQuote: false,
13
- // 对象的 key 仅在必要时用引号
14
- quoteProps: "as-needed",
15
- // jsx 不使用单引号,而使用双引号
16
- jsxSingleQuote: false,
17
- // 末尾不需要逗号
18
- trailingComma: "es5",
19
- // 大括号内的首尾需要空格
20
- bracketSpacing: true,
21
- // jsx 标签的反尖括号需要换行
22
- jsxBracketSameLine: false,
23
- // 箭头函数,只有一个参数的时候,也需要括号
24
- arrowParens: "always",
25
- // 每个文件格式化的范围是文件的全部内容
26
- rangeStart: 0,
27
- rangeEnd: Infinity,
28
- // 不需要写文件开头的 @prettier
29
- requirePragma: false,
30
- // 不需要自动在文件开头插入 @prettier
31
- insertPragma: false,
32
- // 使用默认的折行标准
33
- proseWrap: "preserve",
34
- // 根据显示样式决定 html 要不要折行
35
- htmlWhitespaceSensitivity: "css",
36
- // 换行符使用 lf
37
- endOfLine: "lf",
38
- }
package/src/index.ts DELETED
@@ -1 +0,0 @@
1
- export * from "./services"
@@ -1 +0,0 @@
1
- export { tmt } from "./tmt"
@@ -1,5 +0,0 @@
1
- import { v20180321 } from "./v20180321"
2
-
3
- export const tmt = {
4
- v20180321: v20180321,
5
- }
@@ -1,6 +0,0 @@
1
- import * as Models from "./tmt_models"
2
- import { Client } from "./tmt_client"
3
- export const v20180321 = {
4
- Client: Client,
5
- Models: Models,
6
- }
@@ -1,126 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-unused-vars */
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
- import * as TencentCloudCommon from "tencentcloud-sdk-nodejs-common"
19
- import {
20
- TextTranslateResponse,
21
- ImageTranslateRequest,
22
- GetFileTranslateData,
23
- SpeechTranslateResponse,
24
- ImageRecord,
25
- ImageTranslateResponse,
26
- LanguageDetectRequest,
27
- TextTranslateBatchResponse,
28
- TextTranslateBatchRequest,
29
- Task,
30
- LanguageDetectResponse,
31
- GetFileTranslateResponse,
32
- SpeechTranslateRequest,
33
- FileTranslateResponse,
34
- FileTranslateRequest,
35
- TextTranslateRequest,
36
- GetFileTranslateRequest,
37
- ItemValue,
38
- } from "./tmt_models"
39
-
40
- /**
41
- * tmt client
42
- * @class
43
- */
44
- export class Client extends TencentCloudCommon.AbstractClient {
45
- constructor(clientConfig: TencentCloudCommon.ClientConfig) {
46
- super("tmt.tencentcloudapi.com", "2018-03-21", clientConfig)
47
- }
48
-
49
- /**
50
- * 可自动识别文本内容的语言种类,轻量高效,无需额外实现判断方式,使面向客户的服务体验更佳。 <br />
51
- 提示:对于一般开发者,我们建议优先使用SDK接入简化开发。SDK使用介绍请直接查看 5. 开发者资源 部分。
52
- */
53
- async LanguageDetect(
54
- req: LanguageDetectRequest,
55
- cb?: (error: string, rep: LanguageDetectResponse) => void
56
- ): Promise<LanguageDetectResponse> {
57
- return this.request("LanguageDetect", req, cb)
58
- }
59
-
60
- /**
61
- * 批量翻译文本的接口
62
- */
63
- async TextTranslateBatch(
64
- req: TextTranslateBatchRequest,
65
- cb?: (error: string, rep: TextTranslateBatchResponse) => void
66
- ): Promise<TextTranslateBatchResponse> {
67
- return this.request("TextTranslateBatch", req, cb)
68
- }
69
-
70
- /**
71
- * 提供13种语言的图片翻译服务,可自动识别图片中的文本内容并翻译成目标语言,识别后的文本按行翻译,后续会提供可按段落翻译的版本。<br />
72
- 提示:对于一般开发者,我们建议优先使用SDK接入简化开发。SDK使用介绍请直接查看 5. 开发者资源 部分。
73
- */
74
- async ImageTranslate(
75
- req: ImageTranslateRequest,
76
- cb?: (error: string, rep: ImageTranslateResponse) => void
77
- ): Promise<ImageTranslateResponse> {
78
- return this.request("ImageTranslate", req, cb)
79
- }
80
-
81
- /**
82
- * 在调用文档翻译请求接口后,有回调和轮询两种方式获取识别结果。
83
- •当采用回调方式时,翻译完成后会将结果通过 POST 请求的形式通知到用户在请求时填写的回调 URL,具体请参见[文件翻译回调说明](https://cloud.tencent.com/document/product/551/91138)。
84
- • 当采用轮询方式时,需要主动提交任务ID来轮询识别结果,共有任务成功、等待、执行中和失败四种结果,具体信息请参见参数说明。
85
- */
86
- async GetFileTranslate(
87
- req: GetFileTranslateRequest,
88
- cb?: (error: string, rep: GetFileTranslateResponse) => void
89
- ): Promise<GetFileTranslateResponse> {
90
- return this.request("GetFileTranslate", req, cb)
91
- }
92
-
93
- /**
94
- * 腾讯翻译为合作伙伴提供文本翻译、文档翻译、交互翻译、AI同传等多种机器翻译服务,具有toB多行业解决方案。作为WMT世界机器翻译大赛冠军,翻译准确度值得信赖,其中,交互翻译能力是业界领先技术;腾讯同传是AI同传业界标杆。<br />
95
- 提示:对于一般开发者,我们建议优先使用SDK接入简化开发。SDK使用介绍请直接查看 5. 开发者资源 部分。
96
- */
97
- async TextTranslate(
98
- req: TextTranslateRequest,
99
- cb?: (error: string, rep: TextTranslateResponse) => void
100
- ): Promise<TextTranslateResponse> {
101
- return this.request("TextTranslate", req, cb)
102
- }
103
-
104
- /**
105
- * 提交文档原文内容,输出任务ID, 支持原文为单一语种文档(如出现多语言文档,仅支持以选定的源语言相关内容翻译),文件格式有pdf、docx、pptx、xlsx,支持的文本格式有txt、xml、html、markdown、properties。任务翻译数据可保存7天,7天后不再返回任务数据。请注意保存。
106
- */
107
- async FileTranslate(
108
- req: FileTranslateRequest,
109
- cb?: (error: string, rep: FileTranslateResponse) => void
110
- ): Promise<FileTranslateResponse> {
111
- return this.request("FileTranslate", req, cb)
112
- }
113
-
114
- /**
115
- * 本接口提供上传音频,将音频进行语音识别并翻译成文本的服务,目前开放中英互译的语音翻译服务。
116
- 待识别和翻译的音频文件可以是 pcm、mp3和speex 格式,其中支持流式传输的只有pcm格式,pcm采样率要求16kHz、位深16bit、单声道,音频内语音清晰。<br/>
117
- 如果采用流式传输的方式,要求每个分片时长200ms~500ms;如果采用非流式的传输方式,要求音频时长不超过8s。注意最后一个分片的IsEnd参数设置为1。<br />
118
- 提示:对于一般开发者,我们建议优先使用SDK接入简化开发。SDK使用介绍请直接查看 5. 开发者资源部分。
119
- */
120
- async SpeechTranslate(
121
- req: SpeechTranslateRequest,
122
- cb?: (error: string, rep: SpeechTranslateResponse) => void
123
- ): Promise<SpeechTranslateResponse> {
124
- return this.request("SpeechTranslate", req, cb)
125
- }
126
- }