tencentcloud-sdk-asr 1.0.200
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/VERSION +1 -0
- data/lib/tencentcloud-sdk-asr.rb +11 -0
- data/lib/v20190614/client.rb +519 -0
- data/lib/v20190614/models.rb +1378 -0
- metadata +66 -0
@@ -0,0 +1,1378 @@
|
|
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
|
+
module TencentCloud
|
18
|
+
module Asr
|
19
|
+
module V20190614
|
20
|
+
# 音频流异步识别任务信息
|
21
|
+
class AsyncRecognitionTaskInfo < TencentCloud::Common::AbstractModel
|
22
|
+
# @param TaskId: 任务ID
|
23
|
+
# @type TaskId: Integer
|
24
|
+
# @param Url: 音频流Url
|
25
|
+
# @type Url: String
|
26
|
+
|
27
|
+
attr_accessor :TaskId, :Url
|
28
|
+
|
29
|
+
def initialize(taskid=nil, url=nil)
|
30
|
+
@TaskId = taskid
|
31
|
+
@Url = url
|
32
|
+
end
|
33
|
+
|
34
|
+
def deserialize(params)
|
35
|
+
@TaskId = params['TaskId']
|
36
|
+
@Url = params['Url']
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
# 音频流异步识别任务列表
|
41
|
+
class AsyncRecognitionTasks < TencentCloud::Common::AbstractModel
|
42
|
+
# @param Tasks: 任务列表
|
43
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
44
|
+
# @type Tasks: Array
|
45
|
+
|
46
|
+
attr_accessor :Tasks
|
47
|
+
|
48
|
+
def initialize(tasks=nil)
|
49
|
+
@Tasks = tasks
|
50
|
+
end
|
51
|
+
|
52
|
+
def deserialize(params)
|
53
|
+
unless params['Tasks'].nil?
|
54
|
+
@Tasks = []
|
55
|
+
params['Tasks'].each do |i|
|
56
|
+
asyncrecognitiontaskinfo_tmp = AsyncRecognitionTaskInfo.new
|
57
|
+
asyncrecognitiontaskinfo_tmp.deserialize(i)
|
58
|
+
@Tasks << asyncrecognitiontaskinfo_tmp
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
# CloseAsyncRecognitionTask请求参数结构体
|
65
|
+
class CloseAsyncRecognitionTaskRequest < TencentCloud::Common::AbstractModel
|
66
|
+
# @param TaskId: 语音流异步识别任务的唯一标识,在创建任务时会返回
|
67
|
+
# @type TaskId: Integer
|
68
|
+
|
69
|
+
attr_accessor :TaskId
|
70
|
+
|
71
|
+
def initialize(taskid=nil)
|
72
|
+
@TaskId = taskid
|
73
|
+
end
|
74
|
+
|
75
|
+
def deserialize(params)
|
76
|
+
@TaskId = params['TaskId']
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
# CloseAsyncRecognitionTask返回参数结构体
|
81
|
+
class CloseAsyncRecognitionTaskResponse < TencentCloud::Common::AbstractModel
|
82
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
83
|
+
# @type RequestId: String
|
84
|
+
|
85
|
+
attr_accessor :RequestId
|
86
|
+
|
87
|
+
def initialize(requestid=nil)
|
88
|
+
@RequestId = requestid
|
89
|
+
end
|
90
|
+
|
91
|
+
def deserialize(params)
|
92
|
+
@RequestId = params['RequestId']
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
# CreateAsrVocab请求参数结构体
|
97
|
+
class CreateAsrVocabRequest < TencentCloud::Common::AbstractModel
|
98
|
+
# @param Name: 热词表名称,长度在1-255之间
|
99
|
+
# @type Name: String
|
100
|
+
# @param Description: 热词表描述,长度在0-1000之间
|
101
|
+
# @type Description: String
|
102
|
+
# @param WordWeights: 词权重数组,包含全部的热词和对应的权重。每个热词的长度不大于10,权重为[1,10]之间整数,数组长度不大于128
|
103
|
+
# @type WordWeights: Array
|
104
|
+
# @param WordWeightStr: 词权重文件(纯文本文件)的二进制base64编码,以行分隔,每行的格式为word|weight,即以英文符号|为分割,左边为词,右边为权重,如:你好|5。
|
105
|
+
# 当用户传此参数(参数长度大于0),即以此参数解析词权重,WordWeights会被忽略
|
106
|
+
# @type WordWeightStr: String
|
107
|
+
|
108
|
+
attr_accessor :Name, :Description, :WordWeights, :WordWeightStr
|
109
|
+
|
110
|
+
def initialize(name=nil, description=nil, wordweights=nil, wordweightstr=nil)
|
111
|
+
@Name = name
|
112
|
+
@Description = description
|
113
|
+
@WordWeights = wordweights
|
114
|
+
@WordWeightStr = wordweightstr
|
115
|
+
end
|
116
|
+
|
117
|
+
def deserialize(params)
|
118
|
+
@Name = params['Name']
|
119
|
+
@Description = params['Description']
|
120
|
+
unless params['WordWeights'].nil?
|
121
|
+
@WordWeights = []
|
122
|
+
params['WordWeights'].each do |i|
|
123
|
+
hotword_tmp = HotWord.new
|
124
|
+
hotword_tmp.deserialize(i)
|
125
|
+
@WordWeights << hotword_tmp
|
126
|
+
end
|
127
|
+
end
|
128
|
+
@WordWeightStr = params['WordWeightStr']
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
# CreateAsrVocab返回参数结构体
|
133
|
+
class CreateAsrVocabResponse < TencentCloud::Common::AbstractModel
|
134
|
+
# @param VocabId: 词表ID,可用于获取词表信息
|
135
|
+
# @type VocabId: String
|
136
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
137
|
+
# @type RequestId: String
|
138
|
+
|
139
|
+
attr_accessor :VocabId, :RequestId
|
140
|
+
|
141
|
+
def initialize(vocabid=nil, requestid=nil)
|
142
|
+
@VocabId = vocabid
|
143
|
+
@RequestId = requestid
|
144
|
+
end
|
145
|
+
|
146
|
+
def deserialize(params)
|
147
|
+
@VocabId = params['VocabId']
|
148
|
+
@RequestId = params['RequestId']
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
# CreateAsyncRecognitionTask请求参数结构体
|
153
|
+
class CreateAsyncRecognitionTaskRequest < TencentCloud::Common::AbstractModel
|
154
|
+
# @param EngineType: 引擎模型类型。
|
155
|
+
# • 16k_zh:16k 中文普通话通用;
|
156
|
+
# • 16k_zh_video:16k 音视频领域;
|
157
|
+
# • 16k_en:16k 英语;
|
158
|
+
# • 16k_ca:16k 粤语;
|
159
|
+
# @type EngineType: String
|
160
|
+
# @param Url: 语音流地址,支持rtmp、hls、rtsp等流媒体协议,以及各类基于http协议的直播流
|
161
|
+
# @type Url: String
|
162
|
+
# @param CallbackUrl: 支持HTTP和HTTPS协议,用于接收识别结果,您需要自行搭建公网可调用的服务。回调格式&内容详见:[语音流异步识别回调说明](https://cloud.tencent.com/document/product/1093/52633)
|
163
|
+
# @type CallbackUrl: String
|
164
|
+
# @param SignToken: 用于生成回调通知中的签名
|
165
|
+
# @type SignToken: String
|
166
|
+
# @param FilterDirty: 是否过滤脏词(目前支持中文普通话引擎)。0:不过滤脏词;1:过滤脏词;2:将脏词替换为 * 。默认值为 0
|
167
|
+
# @type FilterDirty: Integer
|
168
|
+
# @param FilterModal: 是否过语气词(目前支持中文普通话引擎)。0:不过滤语气词;1:部分过滤;2:严格过滤 。默认值为 0
|
169
|
+
# @type FilterModal: Integer
|
170
|
+
# @param FilterPunc: 是否过滤标点符号(目前支持中文普通话引擎)。 0:不过滤,1:过滤句末标点,2:过滤所有标点。默认为0
|
171
|
+
# @type FilterPunc: Integer
|
172
|
+
# @param ConvertNumMode: 是否进行阿拉伯数字智能转换。0:不转换,直接输出中文数字,1:根据场景智能转换为阿拉伯数字。默认值为1
|
173
|
+
# @type ConvertNumMode: Integer
|
174
|
+
# @param WordInfo: 是否显示词级别时间戳。0:不显示;1:显示,不包含标点时间戳,2:显示,包含标点时间戳。默认为0
|
175
|
+
# @type WordInfo: Integer
|
176
|
+
# @param HotwordId: 热词id。用于调用对应的热词表,如果在调用语音识别服务时,不进行单独的热词id设置,自动生效默认热词;如果进行了单独的热词id设置,那么将生效单独设置的热词id。
|
177
|
+
# @type HotwordId: String
|
178
|
+
|
179
|
+
attr_accessor :EngineType, :Url, :CallbackUrl, :SignToken, :FilterDirty, :FilterModal, :FilterPunc, :ConvertNumMode, :WordInfo, :HotwordId
|
180
|
+
|
181
|
+
def initialize(enginetype=nil, url=nil, callbackurl=nil, signtoken=nil, filterdirty=nil, filtermodal=nil, filterpunc=nil, convertnummode=nil, wordinfo=nil, hotwordid=nil)
|
182
|
+
@EngineType = enginetype
|
183
|
+
@Url = url
|
184
|
+
@CallbackUrl = callbackurl
|
185
|
+
@SignToken = signtoken
|
186
|
+
@FilterDirty = filterdirty
|
187
|
+
@FilterModal = filtermodal
|
188
|
+
@FilterPunc = filterpunc
|
189
|
+
@ConvertNumMode = convertnummode
|
190
|
+
@WordInfo = wordinfo
|
191
|
+
@HotwordId = hotwordid
|
192
|
+
end
|
193
|
+
|
194
|
+
def deserialize(params)
|
195
|
+
@EngineType = params['EngineType']
|
196
|
+
@Url = params['Url']
|
197
|
+
@CallbackUrl = params['CallbackUrl']
|
198
|
+
@SignToken = params['SignToken']
|
199
|
+
@FilterDirty = params['FilterDirty']
|
200
|
+
@FilterModal = params['FilterModal']
|
201
|
+
@FilterPunc = params['FilterPunc']
|
202
|
+
@ConvertNumMode = params['ConvertNumMode']
|
203
|
+
@WordInfo = params['WordInfo']
|
204
|
+
@HotwordId = params['HotwordId']
|
205
|
+
end
|
206
|
+
end
|
207
|
+
|
208
|
+
# CreateAsyncRecognitionTask返回参数结构体
|
209
|
+
class CreateAsyncRecognitionTaskResponse < TencentCloud::Common::AbstractModel
|
210
|
+
# @param Data: 请求返回结果,包含本次的任务ID(TaskId)
|
211
|
+
# @type Data: :class:`Tencentcloud::Asr.v20190614.models.Task`
|
212
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
213
|
+
# @type RequestId: String
|
214
|
+
|
215
|
+
attr_accessor :Data, :RequestId
|
216
|
+
|
217
|
+
def initialize(data=nil, requestid=nil)
|
218
|
+
@Data = data
|
219
|
+
@RequestId = requestid
|
220
|
+
end
|
221
|
+
|
222
|
+
def deserialize(params)
|
223
|
+
unless params['Data'].nil?
|
224
|
+
@Data = Task.new
|
225
|
+
@Data.deserialize(params['Data'])
|
226
|
+
end
|
227
|
+
@RequestId = params['RequestId']
|
228
|
+
end
|
229
|
+
end
|
230
|
+
|
231
|
+
# CreateCustomization请求参数结构体
|
232
|
+
class CreateCustomizationRequest < TencentCloud::Common::AbstractModel
|
233
|
+
# @param ModelName: 自学习模型名称,需在1-20字符之间
|
234
|
+
# @type ModelName: String
|
235
|
+
# @param TextUrl: 文本文件的下载地址,服务会从该地址下载文件,目前仅支持腾讯云cos
|
236
|
+
# @type TextUrl: String
|
237
|
+
# @param ModelType: 自学习模型类型,填写8k或者16k
|
238
|
+
# @type ModelType: String
|
239
|
+
# @param TagInfos: 标签信息
|
240
|
+
# @type TagInfos: Array
|
241
|
+
|
242
|
+
attr_accessor :ModelName, :TextUrl, :ModelType, :TagInfos
|
243
|
+
|
244
|
+
def initialize(modelname=nil, texturl=nil, modeltype=nil, taginfos=nil)
|
245
|
+
@ModelName = modelname
|
246
|
+
@TextUrl = texturl
|
247
|
+
@ModelType = modeltype
|
248
|
+
@TagInfos = taginfos
|
249
|
+
end
|
250
|
+
|
251
|
+
def deserialize(params)
|
252
|
+
@ModelName = params['ModelName']
|
253
|
+
@TextUrl = params['TextUrl']
|
254
|
+
@ModelType = params['ModelType']
|
255
|
+
@TagInfos = params['TagInfos']
|
256
|
+
end
|
257
|
+
end
|
258
|
+
|
259
|
+
# CreateCustomization返回参数结构体
|
260
|
+
class CreateCustomizationResponse < TencentCloud::Common::AbstractModel
|
261
|
+
# @param ModelId: 模型ID
|
262
|
+
# @type ModelId: String
|
263
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
264
|
+
# @type RequestId: String
|
265
|
+
|
266
|
+
attr_accessor :ModelId, :RequestId
|
267
|
+
|
268
|
+
def initialize(modelid=nil, requestid=nil)
|
269
|
+
@ModelId = modelid
|
270
|
+
@RequestId = requestid
|
271
|
+
end
|
272
|
+
|
273
|
+
def deserialize(params)
|
274
|
+
@ModelId = params['ModelId']
|
275
|
+
@RequestId = params['RequestId']
|
276
|
+
end
|
277
|
+
end
|
278
|
+
|
279
|
+
# CreateRecTask请求参数结构体
|
280
|
+
class CreateRecTaskRequest < TencentCloud::Common::AbstractModel
|
281
|
+
# @param EngineModelType: 引擎模型类型。
|
282
|
+
# 电话场景:
|
283
|
+
# • 8k_en:电话 8k 英语;
|
284
|
+
# • 8k_zh:电话 8k 中文普通话通用;
|
285
|
+
# 非电话场景:
|
286
|
+
# • 16k_zh:16k 中文普通话通用;
|
287
|
+
# • 16k_zh_video:16k 音视频领域;
|
288
|
+
# • 16k_en:16k 英语;
|
289
|
+
# • 16k_ca:16k 粤语;
|
290
|
+
# • 16k_ja:16k 日语;
|
291
|
+
# • 16k_zh_edu 中文教育;
|
292
|
+
# • 16k_en_edu 英文教育;
|
293
|
+
# • 16k_zh_medical 医疗;
|
294
|
+
# • 16k_th 泰语;
|
295
|
+
# • 16k_wuu-SH:16k 上海话方言;
|
296
|
+
# @type EngineModelType: String
|
297
|
+
# @param ChannelNum: 识别声道数。1:单声道;2:双声道(仅支持 8k_zh 引擎模)。注意:录音识别会自动将音频转码为填写的识别声道数
|
298
|
+
# @type ChannelNum: Integer
|
299
|
+
# @param ResTextFormat: 识别结果返回形式。0: 识别结果文本(含分段时间戳); 1:词级别粒度的[详细识别结果](https://cloud.tencent.com/document/api/1093/37824#SentenceDetail)(不含标点,含语速值);2:词级别粒度的详细识别结果(包含标点、语速值)
|
300
|
+
# @type ResTextFormat: Integer
|
301
|
+
# @param SourceType: 语音数据来源。0:语音 URL;1:语音数据(post body)。
|
302
|
+
# @type SourceType: Integer
|
303
|
+
# @param SpeakerDiarization: 是否开启说话人分离,0:不开启,1:开启(仅支持8k_zh,16k_zh,16k_zh_video引擎模型,单声道音频),默认值为 0。
|
304
|
+
# @type SpeakerDiarization: Integer
|
305
|
+
# @param SpeakerNumber: 说话人分离人数(需配合开启说话人分离使用),取值范围:0-10,0代表自动分离(目前仅支持≤6个人),1-10代表指定说话人数分离。默认值为 0。
|
306
|
+
# 注:话者分离目前是beta版本,请根据您的需要谨慎使用
|
307
|
+
# @type SpeakerNumber: Integer
|
308
|
+
# @param CallbackUrl: 回调 URL,用户自行搭建的用于接收识别结果的服务URL。如果用户使用轮询方式获取识别结果,则无需提交该参数。回调格式&内容详见:[录音识别回调说明](https://cloud.tencent.com/document/product/1093/52632)
|
309
|
+
# @type CallbackUrl: String
|
310
|
+
# @param Url: 语音的URL地址,需要公网可下载。长度小于2048字节,当 SourceType 值为 0 时须填写该字段,为 1 时不需要填写。注意:请确保录音文件时长在5个小时之内,否则可能识别失败。请保证文件的下载速度,否则可能下载失败。
|
311
|
+
# @type Url: String
|
312
|
+
# @param Data: 语音数据,当SourceType 值为1时必须填写,为0可不写。要base64编码(采用python语言时注意读取文件应该为string而不是byte,以byte格式读取后要decode()。编码后的数据不可带有回车换行符)。音频数据要小于5MB。
|
313
|
+
# @type Data: String
|
314
|
+
# @param DataLen: 数据长度,非必填(此数据长度为数据未进行base64编码时的数据长度)。
|
315
|
+
# @type DataLen: Integer
|
316
|
+
# @param HotwordId: 热词id。用于调用对应的热词表,如果在调用语音识别服务时,不进行单独的热词id设置,自动生效默认热词;如果进行了单独的热词id设置,那么将生效单独设置的热词id。
|
317
|
+
# @type HotwordId: String
|
318
|
+
# @param FilterDirty: 是否过滤脏词(目前支持中文普通话引擎)。0:不过滤脏词;1:过滤脏词;2:将脏词替换为 * 。默认值为 0。
|
319
|
+
# @type FilterDirty: Integer
|
320
|
+
# @param FilterModal: 是否过滤语气词(目前支持中文普通话引擎)。0:不过滤语气词;1:部分过滤;2:严格过滤 。默认值为 0。
|
321
|
+
# @type FilterModal: Integer
|
322
|
+
# @param ConvertNumMode: 是否进行阿拉伯数字智能转换(目前支持中文普通话引擎)。0:不转换,直接输出中文数字,1:根据场景智能转换为阿拉伯数字,3: 打开数学相关数字转换。默认值为 1。
|
323
|
+
# @type ConvertNumMode: Integer
|
324
|
+
# @param Extra: 附加参数(该参数无意义,忽略即可)
|
325
|
+
# @type Extra: String
|
326
|
+
# @param FilterPunc: 是否过滤标点符号(目前支持中文普通话引擎)。 0:不过滤,1:过滤句末标点,2:过滤所有标点。默认值为 0。
|
327
|
+
# @type FilterPunc: Integer
|
328
|
+
|
329
|
+
attr_accessor :EngineModelType, :ChannelNum, :ResTextFormat, :SourceType, :SpeakerDiarization, :SpeakerNumber, :CallbackUrl, :Url, :Data, :DataLen, :HotwordId, :FilterDirty, :FilterModal, :ConvertNumMode, :Extra, :FilterPunc
|
330
|
+
|
331
|
+
def initialize(enginemodeltype=nil, channelnum=nil, restextformat=nil, sourcetype=nil, speakerdiarization=nil, speakernumber=nil, callbackurl=nil, url=nil, data=nil, datalen=nil, hotwordid=nil, filterdirty=nil, filtermodal=nil, convertnummode=nil, extra=nil, filterpunc=nil)
|
332
|
+
@EngineModelType = enginemodeltype
|
333
|
+
@ChannelNum = channelnum
|
334
|
+
@ResTextFormat = restextformat
|
335
|
+
@SourceType = sourcetype
|
336
|
+
@SpeakerDiarization = speakerdiarization
|
337
|
+
@SpeakerNumber = speakernumber
|
338
|
+
@CallbackUrl = callbackurl
|
339
|
+
@Url = url
|
340
|
+
@Data = data
|
341
|
+
@DataLen = datalen
|
342
|
+
@HotwordId = hotwordid
|
343
|
+
@FilterDirty = filterdirty
|
344
|
+
@FilterModal = filtermodal
|
345
|
+
@ConvertNumMode = convertnummode
|
346
|
+
@Extra = extra
|
347
|
+
@FilterPunc = filterpunc
|
348
|
+
end
|
349
|
+
|
350
|
+
def deserialize(params)
|
351
|
+
@EngineModelType = params['EngineModelType']
|
352
|
+
@ChannelNum = params['ChannelNum']
|
353
|
+
@ResTextFormat = params['ResTextFormat']
|
354
|
+
@SourceType = params['SourceType']
|
355
|
+
@SpeakerDiarization = params['SpeakerDiarization']
|
356
|
+
@SpeakerNumber = params['SpeakerNumber']
|
357
|
+
@CallbackUrl = params['CallbackUrl']
|
358
|
+
@Url = params['Url']
|
359
|
+
@Data = params['Data']
|
360
|
+
@DataLen = params['DataLen']
|
361
|
+
@HotwordId = params['HotwordId']
|
362
|
+
@FilterDirty = params['FilterDirty']
|
363
|
+
@FilterModal = params['FilterModal']
|
364
|
+
@ConvertNumMode = params['ConvertNumMode']
|
365
|
+
@Extra = params['Extra']
|
366
|
+
@FilterPunc = params['FilterPunc']
|
367
|
+
end
|
368
|
+
end
|
369
|
+
|
370
|
+
# CreateRecTask返回参数结构体
|
371
|
+
class CreateRecTaskResponse < TencentCloud::Common::AbstractModel
|
372
|
+
# @param Data: 录音文件识别的请求返回结果,包含结果查询需要的TaskId
|
373
|
+
# @type Data: :class:`Tencentcloud::Asr.v20190614.models.Task`
|
374
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
375
|
+
# @type RequestId: String
|
376
|
+
|
377
|
+
attr_accessor :Data, :RequestId
|
378
|
+
|
379
|
+
def initialize(data=nil, requestid=nil)
|
380
|
+
@Data = data
|
381
|
+
@RequestId = requestid
|
382
|
+
end
|
383
|
+
|
384
|
+
def deserialize(params)
|
385
|
+
unless params['Data'].nil?
|
386
|
+
@Data = Task.new
|
387
|
+
@Data.deserialize(params['Data'])
|
388
|
+
end
|
389
|
+
@RequestId = params['RequestId']
|
390
|
+
end
|
391
|
+
end
|
392
|
+
|
393
|
+
# DeleteAsrVocab请求参数结构体
|
394
|
+
class DeleteAsrVocabRequest < TencentCloud::Common::AbstractModel
|
395
|
+
# @param VocabId: 热词表Id
|
396
|
+
# @type VocabId: String
|
397
|
+
|
398
|
+
attr_accessor :VocabId
|
399
|
+
|
400
|
+
def initialize(vocabid=nil)
|
401
|
+
@VocabId = vocabid
|
402
|
+
end
|
403
|
+
|
404
|
+
def deserialize(params)
|
405
|
+
@VocabId = params['VocabId']
|
406
|
+
end
|
407
|
+
end
|
408
|
+
|
409
|
+
# DeleteAsrVocab返回参数结构体
|
410
|
+
class DeleteAsrVocabResponse < TencentCloud::Common::AbstractModel
|
411
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
412
|
+
# @type RequestId: String
|
413
|
+
|
414
|
+
attr_accessor :RequestId
|
415
|
+
|
416
|
+
def initialize(requestid=nil)
|
417
|
+
@RequestId = requestid
|
418
|
+
end
|
419
|
+
|
420
|
+
def deserialize(params)
|
421
|
+
@RequestId = params['RequestId']
|
422
|
+
end
|
423
|
+
end
|
424
|
+
|
425
|
+
# DeleteCustomization请求参数结构体
|
426
|
+
class DeleteCustomizationRequest < TencentCloud::Common::AbstractModel
|
427
|
+
# @param ModelId: 要删除的模型ID
|
428
|
+
# @type ModelId: String
|
429
|
+
|
430
|
+
attr_accessor :ModelId
|
431
|
+
|
432
|
+
def initialize(modelid=nil)
|
433
|
+
@ModelId = modelid
|
434
|
+
end
|
435
|
+
|
436
|
+
def deserialize(params)
|
437
|
+
@ModelId = params['ModelId']
|
438
|
+
end
|
439
|
+
end
|
440
|
+
|
441
|
+
# DeleteCustomization返回参数结构体
|
442
|
+
class DeleteCustomizationResponse < TencentCloud::Common::AbstractModel
|
443
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
444
|
+
# @type RequestId: String
|
445
|
+
|
446
|
+
attr_accessor :RequestId
|
447
|
+
|
448
|
+
def initialize(requestid=nil)
|
449
|
+
@RequestId = requestid
|
450
|
+
end
|
451
|
+
|
452
|
+
def deserialize(params)
|
453
|
+
@RequestId = params['RequestId']
|
454
|
+
end
|
455
|
+
end
|
456
|
+
|
457
|
+
# DescribeAsyncRecognitionTasks请求参数结构体
|
458
|
+
class DescribeAsyncRecognitionTasksRequest < TencentCloud::Common::AbstractModel
|
459
|
+
|
460
|
+
|
461
|
+
def initialize()
|
462
|
+
end
|
463
|
+
|
464
|
+
def deserialize(params)
|
465
|
+
end
|
466
|
+
end
|
467
|
+
|
468
|
+
# DescribeAsyncRecognitionTasks返回参数结构体
|
469
|
+
class DescribeAsyncRecognitionTasksResponse < TencentCloud::Common::AbstractModel
|
470
|
+
# @param Data: 任务列表
|
471
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
472
|
+
# @type Data: :class:`Tencentcloud::Asr.v20190614.models.AsyncRecognitionTasks`
|
473
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
474
|
+
# @type RequestId: String
|
475
|
+
|
476
|
+
attr_accessor :Data, :RequestId
|
477
|
+
|
478
|
+
def initialize(data=nil, requestid=nil)
|
479
|
+
@Data = data
|
480
|
+
@RequestId = requestid
|
481
|
+
end
|
482
|
+
|
483
|
+
def deserialize(params)
|
484
|
+
unless params['Data'].nil?
|
485
|
+
@Data = AsyncRecognitionTasks.new
|
486
|
+
@Data.deserialize(params['Data'])
|
487
|
+
end
|
488
|
+
@RequestId = params['RequestId']
|
489
|
+
end
|
490
|
+
end
|
491
|
+
|
492
|
+
# DescribeTaskStatus请求参数结构体
|
493
|
+
class DescribeTaskStatusRequest < TencentCloud::Common::AbstractModel
|
494
|
+
# @param TaskId: 从CreateRecTask接口获取的TaskId,用于获取任务状态与结果。
|
495
|
+
# @type TaskId: Integer
|
496
|
+
|
497
|
+
attr_accessor :TaskId
|
498
|
+
|
499
|
+
def initialize(taskid=nil)
|
500
|
+
@TaskId = taskid
|
501
|
+
end
|
502
|
+
|
503
|
+
def deserialize(params)
|
504
|
+
@TaskId = params['TaskId']
|
505
|
+
end
|
506
|
+
end
|
507
|
+
|
508
|
+
# DescribeTaskStatus返回参数结构体
|
509
|
+
class DescribeTaskStatusResponse < TencentCloud::Common::AbstractModel
|
510
|
+
# @param Data: 录音文件识别的请求返回结果。
|
511
|
+
# @type Data: :class:`Tencentcloud::Asr.v20190614.models.TaskStatus`
|
512
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
513
|
+
# @type RequestId: String
|
514
|
+
|
515
|
+
attr_accessor :Data, :RequestId
|
516
|
+
|
517
|
+
def initialize(data=nil, requestid=nil)
|
518
|
+
@Data = data
|
519
|
+
@RequestId = requestid
|
520
|
+
end
|
521
|
+
|
522
|
+
def deserialize(params)
|
523
|
+
unless params['Data'].nil?
|
524
|
+
@Data = TaskStatus.new
|
525
|
+
@Data.deserialize(params['Data'])
|
526
|
+
end
|
527
|
+
@RequestId = params['RequestId']
|
528
|
+
end
|
529
|
+
end
|
530
|
+
|
531
|
+
# DownloadAsrVocab请求参数结构体
|
532
|
+
class DownloadAsrVocabRequest < TencentCloud::Common::AbstractModel
|
533
|
+
# @param VocabId: 词表ID。
|
534
|
+
# @type VocabId: String
|
535
|
+
|
536
|
+
attr_accessor :VocabId
|
537
|
+
|
538
|
+
def initialize(vocabid=nil)
|
539
|
+
@VocabId = vocabid
|
540
|
+
end
|
541
|
+
|
542
|
+
def deserialize(params)
|
543
|
+
@VocabId = params['VocabId']
|
544
|
+
end
|
545
|
+
end
|
546
|
+
|
547
|
+
# DownloadAsrVocab返回参数结构体
|
548
|
+
class DownloadAsrVocabResponse < TencentCloud::Common::AbstractModel
|
549
|
+
# @param VocabId: 词表ID。
|
550
|
+
# @type VocabId: String
|
551
|
+
# @param WordWeightStr: 词表权重文件形式的base64值。
|
552
|
+
# @type WordWeightStr: String
|
553
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
554
|
+
# @type RequestId: String
|
555
|
+
|
556
|
+
attr_accessor :VocabId, :WordWeightStr, :RequestId
|
557
|
+
|
558
|
+
def initialize(vocabid=nil, wordweightstr=nil, requestid=nil)
|
559
|
+
@VocabId = vocabid
|
560
|
+
@WordWeightStr = wordweightstr
|
561
|
+
@RequestId = requestid
|
562
|
+
end
|
563
|
+
|
564
|
+
def deserialize(params)
|
565
|
+
@VocabId = params['VocabId']
|
566
|
+
@WordWeightStr = params['WordWeightStr']
|
567
|
+
@RequestId = params['RequestId']
|
568
|
+
end
|
569
|
+
end
|
570
|
+
|
571
|
+
# DownloadCustomization请求参数结构体
|
572
|
+
class DownloadCustomizationRequest < TencentCloud::Common::AbstractModel
|
573
|
+
# @param ModelId: 自学习模型ID
|
574
|
+
# @type ModelId: String
|
575
|
+
|
576
|
+
attr_accessor :ModelId
|
577
|
+
|
578
|
+
def initialize(modelid=nil)
|
579
|
+
@ModelId = modelid
|
580
|
+
end
|
581
|
+
|
582
|
+
def deserialize(params)
|
583
|
+
@ModelId = params['ModelId']
|
584
|
+
end
|
585
|
+
end
|
586
|
+
|
587
|
+
# DownloadCustomization返回参数结构体
|
588
|
+
class DownloadCustomizationResponse < TencentCloud::Common::AbstractModel
|
589
|
+
# @param DownloadUrl: 下载地址
|
590
|
+
# @type DownloadUrl: String
|
591
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
592
|
+
# @type RequestId: String
|
593
|
+
|
594
|
+
attr_accessor :DownloadUrl, :RequestId
|
595
|
+
|
596
|
+
def initialize(downloadurl=nil, requestid=nil)
|
597
|
+
@DownloadUrl = downloadurl
|
598
|
+
@RequestId = requestid
|
599
|
+
end
|
600
|
+
|
601
|
+
def deserialize(params)
|
602
|
+
@DownloadUrl = params['DownloadUrl']
|
603
|
+
@RequestId = params['RequestId']
|
604
|
+
end
|
605
|
+
end
|
606
|
+
|
607
|
+
# GetAsrVocabList请求参数结构体
|
608
|
+
class GetAsrVocabListRequest < TencentCloud::Common::AbstractModel
|
609
|
+
# @param TagInfos: 标签信息,格式为“$TagKey : $TagValue ”,中间分隔符为“空格”+“:”+“空格”
|
610
|
+
# @type TagInfos: Array
|
611
|
+
# @param Offset: 分页Offset
|
612
|
+
# @type Offset: Integer
|
613
|
+
# @param Limit: 分页Limit
|
614
|
+
# @type Limit: Integer
|
615
|
+
|
616
|
+
attr_accessor :TagInfos, :Offset, :Limit
|
617
|
+
|
618
|
+
def initialize(taginfos=nil, offset=nil, limit=nil)
|
619
|
+
@TagInfos = taginfos
|
620
|
+
@Offset = offset
|
621
|
+
@Limit = limit
|
622
|
+
end
|
623
|
+
|
624
|
+
def deserialize(params)
|
625
|
+
@TagInfos = params['TagInfos']
|
626
|
+
@Offset = params['Offset']
|
627
|
+
@Limit = params['Limit']
|
628
|
+
end
|
629
|
+
end
|
630
|
+
|
631
|
+
# GetAsrVocabList返回参数结构体
|
632
|
+
class GetAsrVocabListResponse < TencentCloud::Common::AbstractModel
|
633
|
+
# @param VocabList: 热词表列表
|
634
|
+
# @type VocabList: Array
|
635
|
+
# @param TotalCount: 热词列表总数
|
636
|
+
# @type TotalCount: Integer
|
637
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
638
|
+
# @type RequestId: String
|
639
|
+
|
640
|
+
attr_accessor :VocabList, :TotalCount, :RequestId
|
641
|
+
|
642
|
+
def initialize(vocablist=nil, totalcount=nil, requestid=nil)
|
643
|
+
@VocabList = vocablist
|
644
|
+
@TotalCount = totalcount
|
645
|
+
@RequestId = requestid
|
646
|
+
end
|
647
|
+
|
648
|
+
def deserialize(params)
|
649
|
+
unless params['VocabList'].nil?
|
650
|
+
@VocabList = []
|
651
|
+
params['VocabList'].each do |i|
|
652
|
+
vocab_tmp = Vocab.new
|
653
|
+
vocab_tmp.deserialize(i)
|
654
|
+
@VocabList << vocab_tmp
|
655
|
+
end
|
656
|
+
end
|
657
|
+
@TotalCount = params['TotalCount']
|
658
|
+
@RequestId = params['RequestId']
|
659
|
+
end
|
660
|
+
end
|
661
|
+
|
662
|
+
# GetAsrVocab请求参数结构体
|
663
|
+
class GetAsrVocabRequest < TencentCloud::Common::AbstractModel
|
664
|
+
# @param VocabId: 热词表ID
|
665
|
+
# @type VocabId: String
|
666
|
+
|
667
|
+
attr_accessor :VocabId
|
668
|
+
|
669
|
+
def initialize(vocabid=nil)
|
670
|
+
@VocabId = vocabid
|
671
|
+
end
|
672
|
+
|
673
|
+
def deserialize(params)
|
674
|
+
@VocabId = params['VocabId']
|
675
|
+
end
|
676
|
+
end
|
677
|
+
|
678
|
+
# GetAsrVocab返回参数结构体
|
679
|
+
class GetAsrVocabResponse < TencentCloud::Common::AbstractModel
|
680
|
+
# @param Name: 热词表名称
|
681
|
+
# @type Name: String
|
682
|
+
# @param Description: 热词表描述
|
683
|
+
# @type Description: String
|
684
|
+
# @param VocabId: 热词表ID
|
685
|
+
# @type VocabId: String
|
686
|
+
# @param WordWeights: 词权重列表
|
687
|
+
# @type WordWeights: Array
|
688
|
+
# @param CreateTime: 词表创建时间
|
689
|
+
# @type CreateTime: String
|
690
|
+
# @param UpdateTime: 词表更新时间
|
691
|
+
# @type UpdateTime: String
|
692
|
+
# @param State: 热词表状态,1为默认状态即在识别时默认加载该热词表进行识别,0为初始状态
|
693
|
+
# @type State: Integer
|
694
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
695
|
+
# @type RequestId: String
|
696
|
+
|
697
|
+
attr_accessor :Name, :Description, :VocabId, :WordWeights, :CreateTime, :UpdateTime, :State, :RequestId
|
698
|
+
|
699
|
+
def initialize(name=nil, description=nil, vocabid=nil, wordweights=nil, createtime=nil, updatetime=nil, state=nil, requestid=nil)
|
700
|
+
@Name = name
|
701
|
+
@Description = description
|
702
|
+
@VocabId = vocabid
|
703
|
+
@WordWeights = wordweights
|
704
|
+
@CreateTime = createtime
|
705
|
+
@UpdateTime = updatetime
|
706
|
+
@State = state
|
707
|
+
@RequestId = requestid
|
708
|
+
end
|
709
|
+
|
710
|
+
def deserialize(params)
|
711
|
+
@Name = params['Name']
|
712
|
+
@Description = params['Description']
|
713
|
+
@VocabId = params['VocabId']
|
714
|
+
unless params['WordWeights'].nil?
|
715
|
+
@WordWeights = []
|
716
|
+
params['WordWeights'].each do |i|
|
717
|
+
hotword_tmp = HotWord.new
|
718
|
+
hotword_tmp.deserialize(i)
|
719
|
+
@WordWeights << hotword_tmp
|
720
|
+
end
|
721
|
+
end
|
722
|
+
@CreateTime = params['CreateTime']
|
723
|
+
@UpdateTime = params['UpdateTime']
|
724
|
+
@State = params['State']
|
725
|
+
@RequestId = params['RequestId']
|
726
|
+
end
|
727
|
+
end
|
728
|
+
|
729
|
+
# GetCustomizationList请求参数结构体
|
730
|
+
class GetCustomizationListRequest < TencentCloud::Common::AbstractModel
|
731
|
+
# @param TagInfos: 标签信息,格式为“$TagKey : $TagValue ”,中间分隔符为“空格”+“:”+“空格”
|
732
|
+
# @type TagInfos: Array
|
733
|
+
# @param Limit: 分页大小,默认1000
|
734
|
+
# @type Limit: Integer
|
735
|
+
# @param Offset: 分页offset,默认0
|
736
|
+
# @type Offset: Integer
|
737
|
+
|
738
|
+
attr_accessor :TagInfos, :Limit, :Offset
|
739
|
+
|
740
|
+
def initialize(taginfos=nil, limit=nil, offset=nil)
|
741
|
+
@TagInfos = taginfos
|
742
|
+
@Limit = limit
|
743
|
+
@Offset = offset
|
744
|
+
end
|
745
|
+
|
746
|
+
def deserialize(params)
|
747
|
+
@TagInfos = params['TagInfos']
|
748
|
+
@Limit = params['Limit']
|
749
|
+
@Offset = params['Offset']
|
750
|
+
end
|
751
|
+
end
|
752
|
+
|
753
|
+
# GetCustomizationList返回参数结构体
|
754
|
+
class GetCustomizationListResponse < TencentCloud::Common::AbstractModel
|
755
|
+
# @param Data: 自学习模型数组
|
756
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
757
|
+
# @type Data: Array
|
758
|
+
# @param TotalCount: 自学习模型总量
|
759
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
760
|
+
# @type TotalCount: Integer
|
761
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
762
|
+
# @type RequestId: String
|
763
|
+
|
764
|
+
attr_accessor :Data, :TotalCount, :RequestId
|
765
|
+
|
766
|
+
def initialize(data=nil, totalcount=nil, requestid=nil)
|
767
|
+
@Data = data
|
768
|
+
@TotalCount = totalcount
|
769
|
+
@RequestId = requestid
|
770
|
+
end
|
771
|
+
|
772
|
+
def deserialize(params)
|
773
|
+
unless params['Data'].nil?
|
774
|
+
@Data = []
|
775
|
+
params['Data'].each do |i|
|
776
|
+
model_tmp = Model.new
|
777
|
+
model_tmp.deserialize(i)
|
778
|
+
@Data << model_tmp
|
779
|
+
end
|
780
|
+
end
|
781
|
+
@TotalCount = params['TotalCount']
|
782
|
+
@RequestId = params['RequestId']
|
783
|
+
end
|
784
|
+
end
|
785
|
+
|
786
|
+
# 热词的词和权重
|
787
|
+
class HotWord < TencentCloud::Common::AbstractModel
|
788
|
+
# @param Word: 热词
|
789
|
+
# @type Word: String
|
790
|
+
# @param Weight: 权重
|
791
|
+
# @type Weight: Integer
|
792
|
+
|
793
|
+
attr_accessor :Word, :Weight
|
794
|
+
|
795
|
+
def initialize(word=nil, weight=nil)
|
796
|
+
@Word = word
|
797
|
+
@Weight = weight
|
798
|
+
end
|
799
|
+
|
800
|
+
def deserialize(params)
|
801
|
+
@Word = params['Word']
|
802
|
+
@Weight = params['Weight']
|
803
|
+
end
|
804
|
+
end
|
805
|
+
|
806
|
+
# 自学习模型信息
|
807
|
+
class Model < TencentCloud::Common::AbstractModel
|
808
|
+
# @param ModelName: 模型名称
|
809
|
+
# @type ModelName: String
|
810
|
+
# @param DictName: 模型文件名称
|
811
|
+
# @type DictName: String
|
812
|
+
# @param ModelId: 模型Id
|
813
|
+
# @type ModelId: String
|
814
|
+
# @param ModelType: 模型类型,“8k”或者”16k“
|
815
|
+
# @type ModelType: String
|
816
|
+
# @param ServiceType: 服务类型
|
817
|
+
# @type ServiceType: String
|
818
|
+
# @param ModelState: 模型状态,-1下线状态,1上线状态, 0训练中, -2 训练失败
|
819
|
+
# @type ModelState: Integer
|
820
|
+
# @param AtUpdated: 最后更新时间
|
821
|
+
# @type AtUpdated: String
|
822
|
+
# @param TagInfos: 标签信息
|
823
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
824
|
+
# @type TagInfos: Array
|
825
|
+
|
826
|
+
attr_accessor :ModelName, :DictName, :ModelId, :ModelType, :ServiceType, :ModelState, :AtUpdated, :TagInfos
|
827
|
+
|
828
|
+
def initialize(modelname=nil, dictname=nil, modelid=nil, modeltype=nil, servicetype=nil, modelstate=nil, atupdated=nil, taginfos=nil)
|
829
|
+
@ModelName = modelname
|
830
|
+
@DictName = dictname
|
831
|
+
@ModelId = modelid
|
832
|
+
@ModelType = modeltype
|
833
|
+
@ServiceType = servicetype
|
834
|
+
@ModelState = modelstate
|
835
|
+
@AtUpdated = atupdated
|
836
|
+
@TagInfos = taginfos
|
837
|
+
end
|
838
|
+
|
839
|
+
def deserialize(params)
|
840
|
+
@ModelName = params['ModelName']
|
841
|
+
@DictName = params['DictName']
|
842
|
+
@ModelId = params['ModelId']
|
843
|
+
@ModelType = params['ModelType']
|
844
|
+
@ServiceType = params['ServiceType']
|
845
|
+
@ModelState = params['ModelState']
|
846
|
+
@AtUpdated = params['AtUpdated']
|
847
|
+
@TagInfos = params['TagInfos']
|
848
|
+
end
|
849
|
+
end
|
850
|
+
|
851
|
+
# ModifyCustomization请求参数结构体
|
852
|
+
class ModifyCustomizationRequest < TencentCloud::Common::AbstractModel
|
853
|
+
# @param ModelId: 要修改的模型ID
|
854
|
+
# @type ModelId: String
|
855
|
+
# @param ModelName: 要修改的模型名称,长度需在1-20个字符之间
|
856
|
+
# @type ModelName: String
|
857
|
+
# @param ModelType: 要修改的模型类型,为8k或者16k
|
858
|
+
# @type ModelType: String
|
859
|
+
# @param TextUrl: 要修改的模型语料的下载地址,目前仅支持腾讯云cos
|
860
|
+
# @type TextUrl: String
|
861
|
+
|
862
|
+
attr_accessor :ModelId, :ModelName, :ModelType, :TextUrl
|
863
|
+
|
864
|
+
def initialize(modelid=nil, modelname=nil, modeltype=nil, texturl=nil)
|
865
|
+
@ModelId = modelid
|
866
|
+
@ModelName = modelname
|
867
|
+
@ModelType = modeltype
|
868
|
+
@TextUrl = texturl
|
869
|
+
end
|
870
|
+
|
871
|
+
def deserialize(params)
|
872
|
+
@ModelId = params['ModelId']
|
873
|
+
@ModelName = params['ModelName']
|
874
|
+
@ModelType = params['ModelType']
|
875
|
+
@TextUrl = params['TextUrl']
|
876
|
+
end
|
877
|
+
end
|
878
|
+
|
879
|
+
# ModifyCustomization返回参数结构体
|
880
|
+
class ModifyCustomizationResponse < TencentCloud::Common::AbstractModel
|
881
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
882
|
+
# @type RequestId: String
|
883
|
+
|
884
|
+
attr_accessor :RequestId
|
885
|
+
|
886
|
+
def initialize(requestid=nil)
|
887
|
+
@RequestId = requestid
|
888
|
+
end
|
889
|
+
|
890
|
+
def deserialize(params)
|
891
|
+
@RequestId = params['RequestId']
|
892
|
+
end
|
893
|
+
end
|
894
|
+
|
895
|
+
# ModifyCustomizationState请求参数结构体
|
896
|
+
class ModifyCustomizationStateRequest < TencentCloud::Common::AbstractModel
|
897
|
+
# @param ModelId: 自学习模型ID
|
898
|
+
# @type ModelId: String
|
899
|
+
# @param ToState: 想要变换的模型状态,-1代表下线,1代表上线
|
900
|
+
# @type ToState: Integer
|
901
|
+
|
902
|
+
attr_accessor :ModelId, :ToState
|
903
|
+
|
904
|
+
def initialize(modelid=nil, tostate=nil)
|
905
|
+
@ModelId = modelid
|
906
|
+
@ToState = tostate
|
907
|
+
end
|
908
|
+
|
909
|
+
def deserialize(params)
|
910
|
+
@ModelId = params['ModelId']
|
911
|
+
@ToState = params['ToState']
|
912
|
+
end
|
913
|
+
end
|
914
|
+
|
915
|
+
# ModifyCustomizationState返回参数结构体
|
916
|
+
class ModifyCustomizationStateResponse < TencentCloud::Common::AbstractModel
|
917
|
+
# @param ModelId: 自学习模型ID
|
918
|
+
# @type ModelId: String
|
919
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
920
|
+
# @type RequestId: String
|
921
|
+
|
922
|
+
attr_accessor :ModelId, :RequestId
|
923
|
+
|
924
|
+
def initialize(modelid=nil, requestid=nil)
|
925
|
+
@ModelId = modelid
|
926
|
+
@RequestId = requestid
|
927
|
+
end
|
928
|
+
|
929
|
+
def deserialize(params)
|
930
|
+
@ModelId = params['ModelId']
|
931
|
+
@RequestId = params['RequestId']
|
932
|
+
end
|
933
|
+
end
|
934
|
+
|
935
|
+
# 单句的详细识别结果,包含单个词的时间偏移,一般用于生成字幕的场景。
|
936
|
+
class SentenceDetail < TencentCloud::Common::AbstractModel
|
937
|
+
# @param FinalSentence: 单句最终识别结果
|
938
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
939
|
+
# @type FinalSentence: String
|
940
|
+
# @param SliceSentence: 单句中间识别结果,使用空格拆分为多个词
|
941
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
942
|
+
# @type SliceSentence: String
|
943
|
+
# @param StartMs: 单句开始时间(毫秒)
|
944
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
945
|
+
# @type StartMs: Integer
|
946
|
+
# @param EndMs: 单句结束时间(毫秒)
|
947
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
948
|
+
# @type EndMs: Integer
|
949
|
+
# @param WordsNum: 单句中词个数
|
950
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
951
|
+
# @type WordsNum: Integer
|
952
|
+
# @param Words: 单句中词详情
|
953
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
954
|
+
# @type Words: Array
|
955
|
+
# @param SpeechSpeed: 单句语速,单位:字数/秒
|
956
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
957
|
+
# @type SpeechSpeed: Float
|
958
|
+
|
959
|
+
attr_accessor :FinalSentence, :SliceSentence, :StartMs, :EndMs, :WordsNum, :Words, :SpeechSpeed
|
960
|
+
|
961
|
+
def initialize(finalsentence=nil, slicesentence=nil, startms=nil, endms=nil, wordsnum=nil, words=nil, speechspeed=nil)
|
962
|
+
@FinalSentence = finalsentence
|
963
|
+
@SliceSentence = slicesentence
|
964
|
+
@StartMs = startms
|
965
|
+
@EndMs = endms
|
966
|
+
@WordsNum = wordsnum
|
967
|
+
@Words = words
|
968
|
+
@SpeechSpeed = speechspeed
|
969
|
+
end
|
970
|
+
|
971
|
+
def deserialize(params)
|
972
|
+
@FinalSentence = params['FinalSentence']
|
973
|
+
@SliceSentence = params['SliceSentence']
|
974
|
+
@StartMs = params['StartMs']
|
975
|
+
@EndMs = params['EndMs']
|
976
|
+
@WordsNum = params['WordsNum']
|
977
|
+
unless params['Words'].nil?
|
978
|
+
@Words = []
|
979
|
+
params['Words'].each do |i|
|
980
|
+
sentencewords_tmp = SentenceWords.new
|
981
|
+
sentencewords_tmp.deserialize(i)
|
982
|
+
@Words << sentencewords_tmp
|
983
|
+
end
|
984
|
+
end
|
985
|
+
@SpeechSpeed = params['SpeechSpeed']
|
986
|
+
end
|
987
|
+
end
|
988
|
+
|
989
|
+
# SentenceRecognition请求参数结构体
|
990
|
+
class SentenceRecognitionRequest < TencentCloud::Common::AbstractModel
|
991
|
+
# @param ProjectId: 腾讯云项目 ID,可填 0,总长度不超过 1024 字节。
|
992
|
+
# @type ProjectId: Integer
|
993
|
+
# @param SubServiceType: 子服务类型。2: 一句话识别。
|
994
|
+
# @type SubServiceType: Integer
|
995
|
+
# @param EngSerViceType: 引擎模型类型。
|
996
|
+
# 电话场景:
|
997
|
+
# • 8k_en:电话 8k 英语;
|
998
|
+
# • 8k_zh:电话 8k 中文普通话通用;
|
999
|
+
# 非电话场景:
|
1000
|
+
# • 16k_zh:16k 中文普通话通用;
|
1001
|
+
# • 16k_en:16k 英语;
|
1002
|
+
# • 16k_ca:16k 粤语;
|
1003
|
+
# • 16k_ja:16k 日语;
|
1004
|
+
# •16k_wuu-SH:16k 上海话方言;
|
1005
|
+
# •16k_zh_medical:16k 医疗。
|
1006
|
+
# @type EngSerViceType: String
|
1007
|
+
# @param SourceType: 语音数据来源。0:语音 URL;1:语音数据(post body)。
|
1008
|
+
# @type SourceType: Integer
|
1009
|
+
# @param VoiceFormat: 识别音频的音频格式。mp3、wav。
|
1010
|
+
# @type VoiceFormat: String
|
1011
|
+
# @param UsrAudioKey: 用户端对此任务的唯一标识,用户自助生成,用于用户查找识别结果。
|
1012
|
+
# @type UsrAudioKey: String
|
1013
|
+
# @param Url: 语音 URL,公网可下载。当 SourceType 值为 0(语音 URL上传) 时须填写该字段,为 1 时不填;URL 的长度大于 0,小于 2048,需进行urlencode编码。音频时长不能超过60s,音频文件大小不能超过3MB。
|
1014
|
+
# @type Url: String
|
1015
|
+
# @param Data: 语音数据,当SourceType 值为1(本地语音数据上传)时必须填写,当SourceType 值为0(语音 URL上传)可不写。要使用base64编码(采用python语言时注意读取文件应该为string而不是byte,以byte格式读取后要decode()。编码后的数据不可带有回车换行符)。音频时长不能超过60s,音频文件大小不能超过3MB(Base64后)。
|
1016
|
+
# @type Data: String
|
1017
|
+
# @param DataLen: 数据长度,单位为字节。当 SourceType 值为1(本地语音数据上传)时必须填写,当 SourceType 值为0(语音 URL上传)可不写(此数据长度为数据未进行base64编码时的数据长度)。
|
1018
|
+
# @type DataLen: Integer
|
1019
|
+
# @param HotwordId: 热词id。用于调用对应的热词表,如果在调用语音识别服务时,不进行单独的热词id设置,自动生效默认热词;如果进行了单独的热词id设置,那么将生效单独设置的热词id。
|
1020
|
+
# @type HotwordId: String
|
1021
|
+
# @param FilterDirty: 是否过滤脏词(目前支持中文普通话引擎)。0:不过滤脏词;1:过滤脏词;2:将脏词替换为 * 。默认值为 0。
|
1022
|
+
# @type FilterDirty: Integer
|
1023
|
+
# @param FilterModal: 是否过语气词(目前支持中文普通话引擎)。0:不过滤语气词;1:部分过滤;2:严格过滤 。默认值为 0。
|
1024
|
+
# @type FilterModal: Integer
|
1025
|
+
# @param FilterPunc: 是否过滤标点符号(目前支持中文普通话引擎)。 0:不过滤,1:过滤句末标点,2:过滤所有标点。默认值为 0。
|
1026
|
+
# @type FilterPunc: Integer
|
1027
|
+
# @param ConvertNumMode: 是否进行阿拉伯数字智能转换。0:不转换,直接输出中文数字,1:根据场景智能转换为阿拉伯数字。默认值为1。
|
1028
|
+
# @type ConvertNumMode: Integer
|
1029
|
+
# @param WordInfo: 是否显示词级别时间戳。0:不显示;1:显示,不包含标点时间戳,2:显示,包含标点时间戳。支持引擎8k_zh,16k_zh,16k_en,16k_ca,16k_ja,16k_wuu-SH。默认值为 0。
|
1030
|
+
# @type WordInfo: Integer
|
1031
|
+
|
1032
|
+
attr_accessor :ProjectId, :SubServiceType, :EngSerViceType, :SourceType, :VoiceFormat, :UsrAudioKey, :Url, :Data, :DataLen, :HotwordId, :FilterDirty, :FilterModal, :FilterPunc, :ConvertNumMode, :WordInfo
|
1033
|
+
|
1034
|
+
def initialize(projectid=nil, subservicetype=nil, engservicetype=nil, sourcetype=nil, voiceformat=nil, usraudiokey=nil, url=nil, data=nil, datalen=nil, hotwordid=nil, filterdirty=nil, filtermodal=nil, filterpunc=nil, convertnummode=nil, wordinfo=nil)
|
1035
|
+
@ProjectId = projectid
|
1036
|
+
@SubServiceType = subservicetype
|
1037
|
+
@EngSerViceType = engservicetype
|
1038
|
+
@SourceType = sourcetype
|
1039
|
+
@VoiceFormat = voiceformat
|
1040
|
+
@UsrAudioKey = usraudiokey
|
1041
|
+
@Url = url
|
1042
|
+
@Data = data
|
1043
|
+
@DataLen = datalen
|
1044
|
+
@HotwordId = hotwordid
|
1045
|
+
@FilterDirty = filterdirty
|
1046
|
+
@FilterModal = filtermodal
|
1047
|
+
@FilterPunc = filterpunc
|
1048
|
+
@ConvertNumMode = convertnummode
|
1049
|
+
@WordInfo = wordinfo
|
1050
|
+
end
|
1051
|
+
|
1052
|
+
def deserialize(params)
|
1053
|
+
@ProjectId = params['ProjectId']
|
1054
|
+
@SubServiceType = params['SubServiceType']
|
1055
|
+
@EngSerViceType = params['EngSerViceType']
|
1056
|
+
@SourceType = params['SourceType']
|
1057
|
+
@VoiceFormat = params['VoiceFormat']
|
1058
|
+
@UsrAudioKey = params['UsrAudioKey']
|
1059
|
+
@Url = params['Url']
|
1060
|
+
@Data = params['Data']
|
1061
|
+
@DataLen = params['DataLen']
|
1062
|
+
@HotwordId = params['HotwordId']
|
1063
|
+
@FilterDirty = params['FilterDirty']
|
1064
|
+
@FilterModal = params['FilterModal']
|
1065
|
+
@FilterPunc = params['FilterPunc']
|
1066
|
+
@ConvertNumMode = params['ConvertNumMode']
|
1067
|
+
@WordInfo = params['WordInfo']
|
1068
|
+
end
|
1069
|
+
end
|
1070
|
+
|
1071
|
+
# SentenceRecognition返回参数结构体
|
1072
|
+
class SentenceRecognitionResponse < TencentCloud::Common::AbstractModel
|
1073
|
+
# @param Result: 识别结果。
|
1074
|
+
# @type Result: String
|
1075
|
+
# @param AudioDuration: 请求的音频时长,单位为ms
|
1076
|
+
# @type AudioDuration: Integer
|
1077
|
+
# @param WordSize: 词时间戳列表的长度
|
1078
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
1079
|
+
# @type WordSize: Integer
|
1080
|
+
# @param WordList: 词时间戳列表
|
1081
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
1082
|
+
# @type WordList: Array
|
1083
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
1084
|
+
# @type RequestId: String
|
1085
|
+
|
1086
|
+
attr_accessor :Result, :AudioDuration, :WordSize, :WordList, :RequestId
|
1087
|
+
|
1088
|
+
def initialize(result=nil, audioduration=nil, wordsize=nil, wordlist=nil, requestid=nil)
|
1089
|
+
@Result = result
|
1090
|
+
@AudioDuration = audioduration
|
1091
|
+
@WordSize = wordsize
|
1092
|
+
@WordList = wordlist
|
1093
|
+
@RequestId = requestid
|
1094
|
+
end
|
1095
|
+
|
1096
|
+
def deserialize(params)
|
1097
|
+
@Result = params['Result']
|
1098
|
+
@AudioDuration = params['AudioDuration']
|
1099
|
+
@WordSize = params['WordSize']
|
1100
|
+
unless params['WordList'].nil?
|
1101
|
+
@WordList = []
|
1102
|
+
params['WordList'].each do |i|
|
1103
|
+
sentenceword_tmp = SentenceWord.new
|
1104
|
+
sentenceword_tmp.deserialize(i)
|
1105
|
+
@WordList << sentenceword_tmp
|
1106
|
+
end
|
1107
|
+
end
|
1108
|
+
@RequestId = params['RequestId']
|
1109
|
+
end
|
1110
|
+
end
|
1111
|
+
|
1112
|
+
# 一句话识别返回的词时间戳
|
1113
|
+
class SentenceWord < TencentCloud::Common::AbstractModel
|
1114
|
+
# @param Word: 词结果
|
1115
|
+
# @type Word: String
|
1116
|
+
# @param StartTime: 词在音频中的开始时间
|
1117
|
+
# @type StartTime: Integer
|
1118
|
+
# @param EndTime: 词在音频中的结束时间
|
1119
|
+
# @type EndTime: Integer
|
1120
|
+
|
1121
|
+
attr_accessor :Word, :StartTime, :EndTime
|
1122
|
+
|
1123
|
+
def initialize(word=nil, starttime=nil, endtime=nil)
|
1124
|
+
@Word = word
|
1125
|
+
@StartTime = starttime
|
1126
|
+
@EndTime = endtime
|
1127
|
+
end
|
1128
|
+
|
1129
|
+
def deserialize(params)
|
1130
|
+
@Word = params['Word']
|
1131
|
+
@StartTime = params['StartTime']
|
1132
|
+
@EndTime = params['EndTime']
|
1133
|
+
end
|
1134
|
+
end
|
1135
|
+
|
1136
|
+
# 识别结果中词文本,以及对应时间偏移
|
1137
|
+
class SentenceWords < TencentCloud::Common::AbstractModel
|
1138
|
+
# @param Word: 词文本
|
1139
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
1140
|
+
# @type Word: String
|
1141
|
+
# @param OffsetStartMs: 在句子中的开始时间偏移量
|
1142
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
1143
|
+
# @type OffsetStartMs: Integer
|
1144
|
+
# @param OffsetEndMs: 在句子中的结束时间偏移量
|
1145
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
1146
|
+
# @type OffsetEndMs: Integer
|
1147
|
+
|
1148
|
+
attr_accessor :Word, :OffsetStartMs, :OffsetEndMs
|
1149
|
+
|
1150
|
+
def initialize(word=nil, offsetstartms=nil, offsetendms=nil)
|
1151
|
+
@Word = word
|
1152
|
+
@OffsetStartMs = offsetstartms
|
1153
|
+
@OffsetEndMs = offsetendms
|
1154
|
+
end
|
1155
|
+
|
1156
|
+
def deserialize(params)
|
1157
|
+
@Word = params['Word']
|
1158
|
+
@OffsetStartMs = params['OffsetStartMs']
|
1159
|
+
@OffsetEndMs = params['OffsetEndMs']
|
1160
|
+
end
|
1161
|
+
end
|
1162
|
+
|
1163
|
+
# SetVocabState请求参数结构体
|
1164
|
+
class SetVocabStateRequest < TencentCloud::Common::AbstractModel
|
1165
|
+
# @param VocabId: 热词表ID。
|
1166
|
+
# @type VocabId: String
|
1167
|
+
# @param State: 热词表状态,1:设为默认状态;0:设为非默认状态。
|
1168
|
+
# @type State: Integer
|
1169
|
+
|
1170
|
+
attr_accessor :VocabId, :State
|
1171
|
+
|
1172
|
+
def initialize(vocabid=nil, state=nil)
|
1173
|
+
@VocabId = vocabid
|
1174
|
+
@State = state
|
1175
|
+
end
|
1176
|
+
|
1177
|
+
def deserialize(params)
|
1178
|
+
@VocabId = params['VocabId']
|
1179
|
+
@State = params['State']
|
1180
|
+
end
|
1181
|
+
end
|
1182
|
+
|
1183
|
+
# SetVocabState返回参数结构体
|
1184
|
+
class SetVocabStateResponse < TencentCloud::Common::AbstractModel
|
1185
|
+
# @param VocabId: 热词表ID
|
1186
|
+
# @type VocabId: String
|
1187
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
1188
|
+
# @type RequestId: String
|
1189
|
+
|
1190
|
+
attr_accessor :VocabId, :RequestId
|
1191
|
+
|
1192
|
+
def initialize(vocabid=nil, requestid=nil)
|
1193
|
+
@VocabId = vocabid
|
1194
|
+
@RequestId = requestid
|
1195
|
+
end
|
1196
|
+
|
1197
|
+
def deserialize(params)
|
1198
|
+
@VocabId = params['VocabId']
|
1199
|
+
@RequestId = params['RequestId']
|
1200
|
+
end
|
1201
|
+
end
|
1202
|
+
|
1203
|
+
# 录音文件识别、实时语音异步识别请求的返回数据
|
1204
|
+
class Task < TencentCloud::Common::AbstractModel
|
1205
|
+
# @param TaskId: 任务ID,可通过此ID在轮询接口获取识别状态与结果。注意:TaskId数据类型为uint64
|
1206
|
+
# @type TaskId: Integer
|
1207
|
+
|
1208
|
+
attr_accessor :TaskId
|
1209
|
+
|
1210
|
+
def initialize(taskid=nil)
|
1211
|
+
@TaskId = taskid
|
1212
|
+
end
|
1213
|
+
|
1214
|
+
def deserialize(params)
|
1215
|
+
@TaskId = params['TaskId']
|
1216
|
+
end
|
1217
|
+
end
|
1218
|
+
|
1219
|
+
# 获取录音识别结果结果的返回参数
|
1220
|
+
class TaskStatus < TencentCloud::Common::AbstractModel
|
1221
|
+
# @param TaskId: 任务标识。
|
1222
|
+
# @type TaskId: Integer
|
1223
|
+
# @param Status: 任务状态码,0:任务等待,1:任务执行中,2:任务成功,3:任务失败。
|
1224
|
+
# @type Status: Integer
|
1225
|
+
# @param StatusStr: 任务状态,waiting:任务等待,doing:任务执行中,success:任务成功,failed:任务失败。
|
1226
|
+
# @type StatusStr: String
|
1227
|
+
# @param Result: 识别结果。
|
1228
|
+
# @type Result: String
|
1229
|
+
# @param ErrorMsg: 失败原因说明。
|
1230
|
+
# @type ErrorMsg: String
|
1231
|
+
# @param ResultDetail: 识别结果详情,包含每个句子中的词时间偏移,一般用于生成字幕的场景。(录音识别请求中ResTextFormat=1时该字段不为空)
|
1232
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
1233
|
+
# @type ResultDetail: Array
|
1234
|
+
|
1235
|
+
attr_accessor :TaskId, :Status, :StatusStr, :Result, :ErrorMsg, :ResultDetail
|
1236
|
+
|
1237
|
+
def initialize(taskid=nil, status=nil, statusstr=nil, result=nil, errormsg=nil, resultdetail=nil)
|
1238
|
+
@TaskId = taskid
|
1239
|
+
@Status = status
|
1240
|
+
@StatusStr = statusstr
|
1241
|
+
@Result = result
|
1242
|
+
@ErrorMsg = errormsg
|
1243
|
+
@ResultDetail = resultdetail
|
1244
|
+
end
|
1245
|
+
|
1246
|
+
def deserialize(params)
|
1247
|
+
@TaskId = params['TaskId']
|
1248
|
+
@Status = params['Status']
|
1249
|
+
@StatusStr = params['StatusStr']
|
1250
|
+
@Result = params['Result']
|
1251
|
+
@ErrorMsg = params['ErrorMsg']
|
1252
|
+
unless params['ResultDetail'].nil?
|
1253
|
+
@ResultDetail = []
|
1254
|
+
params['ResultDetail'].each do |i|
|
1255
|
+
sentencedetail_tmp = SentenceDetail.new
|
1256
|
+
sentencedetail_tmp.deserialize(i)
|
1257
|
+
@ResultDetail << sentencedetail_tmp
|
1258
|
+
end
|
1259
|
+
end
|
1260
|
+
end
|
1261
|
+
end
|
1262
|
+
|
1263
|
+
# UpdateAsrVocab请求参数结构体
|
1264
|
+
class UpdateAsrVocabRequest < TencentCloud::Common::AbstractModel
|
1265
|
+
# @param VocabId: 热词表ID
|
1266
|
+
# @type VocabId: String
|
1267
|
+
# @param Name: 热词表名称,长度在1-255之间
|
1268
|
+
# @type Name: String
|
1269
|
+
# @param WordWeights: 词权重数组,包含全部的热词和对应的权重。每个热词的长度不大于10,权重为[1,10]之间整数,数组长度不大于128
|
1270
|
+
# @type WordWeights: Array
|
1271
|
+
# @param WordWeightStr: 词权重文件(纯文本文件)的二进制base64编码,以行分隔,每行的格式为word|weight,即以英文符号|为分割,左边为词,右边为权重,如:你好|5。
|
1272
|
+
# 当用户传此参数(参数长度大于0),即以此参数解析词权重,WordWeights会被忽略
|
1273
|
+
# @type WordWeightStr: String
|
1274
|
+
# @param Description: 热词表描述,长度在0-1000之间
|
1275
|
+
# @type Description: String
|
1276
|
+
|
1277
|
+
attr_accessor :VocabId, :Name, :WordWeights, :WordWeightStr, :Description
|
1278
|
+
|
1279
|
+
def initialize(vocabid=nil, name=nil, wordweights=nil, wordweightstr=nil, description=nil)
|
1280
|
+
@VocabId = vocabid
|
1281
|
+
@Name = name
|
1282
|
+
@WordWeights = wordweights
|
1283
|
+
@WordWeightStr = wordweightstr
|
1284
|
+
@Description = description
|
1285
|
+
end
|
1286
|
+
|
1287
|
+
def deserialize(params)
|
1288
|
+
@VocabId = params['VocabId']
|
1289
|
+
@Name = params['Name']
|
1290
|
+
unless params['WordWeights'].nil?
|
1291
|
+
@WordWeights = []
|
1292
|
+
params['WordWeights'].each do |i|
|
1293
|
+
hotword_tmp = HotWord.new
|
1294
|
+
hotword_tmp.deserialize(i)
|
1295
|
+
@WordWeights << hotword_tmp
|
1296
|
+
end
|
1297
|
+
end
|
1298
|
+
@WordWeightStr = params['WordWeightStr']
|
1299
|
+
@Description = params['Description']
|
1300
|
+
end
|
1301
|
+
end
|
1302
|
+
|
1303
|
+
# UpdateAsrVocab返回参数结构体
|
1304
|
+
class UpdateAsrVocabResponse < TencentCloud::Common::AbstractModel
|
1305
|
+
# @param VocabId: 热词表ID
|
1306
|
+
# @type VocabId: String
|
1307
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
1308
|
+
# @type RequestId: String
|
1309
|
+
|
1310
|
+
attr_accessor :VocabId, :RequestId
|
1311
|
+
|
1312
|
+
def initialize(vocabid=nil, requestid=nil)
|
1313
|
+
@VocabId = vocabid
|
1314
|
+
@RequestId = requestid
|
1315
|
+
end
|
1316
|
+
|
1317
|
+
def deserialize(params)
|
1318
|
+
@VocabId = params['VocabId']
|
1319
|
+
@RequestId = params['RequestId']
|
1320
|
+
end
|
1321
|
+
end
|
1322
|
+
|
1323
|
+
# 词表内容
|
1324
|
+
class Vocab < TencentCloud::Common::AbstractModel
|
1325
|
+
# @param Name: 热词表名称
|
1326
|
+
# @type Name: String
|
1327
|
+
# @param Description: 热词表描述
|
1328
|
+
# @type Description: String
|
1329
|
+
# @param VocabId: 热词表ID
|
1330
|
+
# @type VocabId: String
|
1331
|
+
# @param WordWeights: 词权重列表
|
1332
|
+
# @type WordWeights: Array
|
1333
|
+
# @param CreateTime: 词表创建时间
|
1334
|
+
# @type CreateTime: String
|
1335
|
+
# @param UpdateTime: 词表更新时间
|
1336
|
+
# @type UpdateTime: String
|
1337
|
+
# @param State: 热词表状态,1为默认状态即在识别时默认加载该热词表进行识别,0为初始状态
|
1338
|
+
# @type State: Integer
|
1339
|
+
# @param TagInfos: 标签数组
|
1340
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
1341
|
+
# @type TagInfos: Array
|
1342
|
+
|
1343
|
+
attr_accessor :Name, :Description, :VocabId, :WordWeights, :CreateTime, :UpdateTime, :State, :TagInfos
|
1344
|
+
|
1345
|
+
def initialize(name=nil, description=nil, vocabid=nil, wordweights=nil, createtime=nil, updatetime=nil, state=nil, taginfos=nil)
|
1346
|
+
@Name = name
|
1347
|
+
@Description = description
|
1348
|
+
@VocabId = vocabid
|
1349
|
+
@WordWeights = wordweights
|
1350
|
+
@CreateTime = createtime
|
1351
|
+
@UpdateTime = updatetime
|
1352
|
+
@State = state
|
1353
|
+
@TagInfos = taginfos
|
1354
|
+
end
|
1355
|
+
|
1356
|
+
def deserialize(params)
|
1357
|
+
@Name = params['Name']
|
1358
|
+
@Description = params['Description']
|
1359
|
+
@VocabId = params['VocabId']
|
1360
|
+
unless params['WordWeights'].nil?
|
1361
|
+
@WordWeights = []
|
1362
|
+
params['WordWeights'].each do |i|
|
1363
|
+
hotword_tmp = HotWord.new
|
1364
|
+
hotword_tmp.deserialize(i)
|
1365
|
+
@WordWeights << hotword_tmp
|
1366
|
+
end
|
1367
|
+
end
|
1368
|
+
@CreateTime = params['CreateTime']
|
1369
|
+
@UpdateTime = params['UpdateTime']
|
1370
|
+
@State = params['State']
|
1371
|
+
@TagInfos = params['TagInfos']
|
1372
|
+
end
|
1373
|
+
end
|
1374
|
+
|
1375
|
+
end
|
1376
|
+
end
|
1377
|
+
end
|
1378
|
+
|