tencentcloud-sdk-asr 3.0.896 → 3.0.897

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6e4b03938359f3cb867267df0634cf612d8f9c5b
4
- data.tar.gz: a2e5dbc795fd9ca60f788a4edb3460e6eaf60c29
3
+ metadata.gz: 5a1bfb471a310daf07edfacefce246074b7409ee
4
+ data.tar.gz: edec9eadd60ca4179bd55d3f3781267a5ed31687
5
5
  SHA512:
6
- metadata.gz: e88f936b4a886db0bc5783d12200d1349cb10e0f74335ba61aa03e1d443cce59e926d9557ac0da723abcee01b9bcafb627e0a1361f369fe40fa08e3eebbf43e2
7
- data.tar.gz: 7ce7798207facbb933a0feb9cf47278cb65f658bee6fc07d758e93e3949fbcfcc2a1535eaa571f81f2556db7200a837b7ca3e36a81e57db4291e473e2e405a89
6
+ metadata.gz: 8e120ec01d7489dfba97f68054ca53ae4f0da97a847c875baf7b34d1a48229c954cf63be70a1bb6128711a55e4679bd8cd357239b75df3193ec797d3a61e11c0
7
+ data.tar.gz: dbf3dd34c98e3b196ff53cacad55b84d638fe686dc05497e33f5c53fff74281f68ec266b247421052882b0e3c4bb433146081109b721cc9e5764b099220b8034
data/lib/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.896
1
+ 3.0.897
@@ -53,6 +53,34 @@ module TencentCloud
53
53
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
54
54
  end
55
55
 
56
+ # 用户通过本接口进行关键字词表的创建。
57
+ # <br>• 默认每个用户最多可创建30个关键字词表。
58
+ # <br>• 每个关键词词表最多可添加100个词,每个词最多5个汉字或15个字符。
59
+ # <br>• 词表通过本地文件形式上传。
60
+ # <br>• 本地文件必须为UTF-8编码格式,每行仅添加一个词且不能包含标点和特殊字符。
61
+
62
+ # @param request: Request instance for CreateAsrKeyWordLib.
63
+ # @type request: :class:`Tencentcloud::asr::V20190614::CreateAsrKeyWordLibRequest`
64
+ # @rtype: :class:`Tencentcloud::asr::V20190614::CreateAsrKeyWordLibResponse`
65
+ def CreateAsrKeyWordLib(request)
66
+ body = send_request('CreateAsrKeyWordLib', request.serialize)
67
+ response = JSON.parse(body)
68
+ if response['Response'].key?('Error') == false
69
+ model = CreateAsrKeyWordLibResponse.new
70
+ model.deserialize(response['Response'])
71
+ model
72
+ else
73
+ code = response['Response']['Error']['Code']
74
+ message = response['Response']['Error']['Message']
75
+ reqid = response['Response']['RequestId']
76
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
77
+ end
78
+ rescue TencentCloud::Common::TencentCloudSDKException => e
79
+ raise e
80
+ rescue StandardError => e
81
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
82
+ end
83
+
56
84
  # 用户通过本接口进行热词表的创建。
57
85
  # <br>• 默认最多可创建30个热词表。
58
86
  # <br>• 每个热词表最多可添加1000个词,每个词最长10个汉字或30个英文字符,不能超出限制。
@@ -171,6 +199,30 @@ module TencentCloud
171
199
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
172
200
  end
173
201
 
202
+ # 用户通过本接口进行关键词表的删除。
203
+
204
+ # @param request: Request instance for DeleteAsrKeyWordLib.
205
+ # @type request: :class:`Tencentcloud::asr::V20190614::DeleteAsrKeyWordLibRequest`
206
+ # @rtype: :class:`Tencentcloud::asr::V20190614::DeleteAsrKeyWordLibResponse`
207
+ def DeleteAsrKeyWordLib(request)
208
+ body = send_request('DeleteAsrKeyWordLib', request.serialize)
209
+ response = JSON.parse(body)
210
+ if response['Response'].key?('Error') == false
211
+ model = DeleteAsrKeyWordLibResponse.new
212
+ model.deserialize(response['Response'])
213
+ model
214
+ else
215
+ code = response['Response']['Error']['Code']
216
+ message = response['Response']['Error']['Message']
217
+ reqid = response['Response']['RequestId']
218
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
219
+ end
220
+ rescue TencentCloud::Common::TencentCloudSDKException => e
221
+ raise e
222
+ rescue StandardError => e
223
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
224
+ end
225
+
174
226
  # 用户通过本接口进行热词表的删除。
175
227
 
176
228
  # @param request: Request instance for DeleteAsrVocab.
@@ -322,6 +374,30 @@ module TencentCloud
322
374
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
323
375
  end
324
376
 
377
+ # 用户通过该接口,可获得所有的关键词表及其信息。
378
+
379
+ # @param request: Request instance for GetAsrKeyWordLibList.
380
+ # @type request: :class:`Tencentcloud::asr::V20190614::GetAsrKeyWordLibListRequest`
381
+ # @rtype: :class:`Tencentcloud::asr::V20190614::GetAsrKeyWordLibListResponse`
382
+ def GetAsrKeyWordLibList(request)
383
+ body = send_request('GetAsrKeyWordLibList', request.serialize)
384
+ response = JSON.parse(body)
385
+ if response['Response'].key?('Error') == false
386
+ model = GetAsrKeyWordLibListResponse.new
387
+ model.deserialize(response['Response'])
388
+ model
389
+ else
390
+ code = response['Response']['Error']['Code']
391
+ message = response['Response']['Error']['Message']
392
+ reqid = response['Response']['RequestId']
393
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
394
+ end
395
+ rescue TencentCloud::Common::TencentCloudSDKException => e
396
+ raise e
397
+ rescue StandardError => e
398
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
399
+ end
400
+
325
401
  # 用户根据词表的ID可以获取对应的热词表信息
326
402
 
327
403
  # @param request: Request instance for GetAsrVocab.
@@ -520,6 +596,30 @@ module TencentCloud
520
596
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
521
597
  end
522
598
 
599
+ # 用户通过本接口进行对应的关键词表信息更新。
600
+
601
+ # @param request: Request instance for UpdateAsrKeyWordLib.
602
+ # @type request: :class:`Tencentcloud::asr::V20190614::UpdateAsrKeyWordLibRequest`
603
+ # @rtype: :class:`Tencentcloud::asr::V20190614::UpdateAsrKeyWordLibResponse`
604
+ def UpdateAsrKeyWordLib(request)
605
+ body = send_request('UpdateAsrKeyWordLib', request.serialize)
606
+ response = JSON.parse(body)
607
+ if response['Response'].key?('Error') == false
608
+ model = UpdateAsrKeyWordLibResponse.new
609
+ model.deserialize(response['Response'])
610
+ model
611
+ else
612
+ code = response['Response']['Error']['Code']
613
+ message = response['Response']['Error']['Message']
614
+ reqid = response['Response']['RequestId']
615
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
616
+ end
617
+ rescue TencentCloud::Common::TencentCloudSDKException => e
618
+ raise e
619
+ rescue StandardError => e
620
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
621
+ end
622
+
523
623
  # 用户通过本接口进行对应的词表信息更新。
524
624
 
525
625
  # @param request: Request instance for UpdateAsrVocab.
@@ -93,6 +93,54 @@ module TencentCloud
93
93
  end
94
94
  end
95
95
 
96
+ # CreateAsrKeyWordLib请求参数结构体
97
+ class CreateAsrKeyWordLibRequest < TencentCloud::Common::AbstractModel
98
+ # @param Name: 词表名称,长度在1-20之间
99
+ # 仅限中英文数字-_
100
+ # @type Name: String
101
+ # @param KeyWordFile: 词文件(纯文本文件)的二进制base64编码,以行分隔
102
+ # 格式要求:TXT
103
+ # 每行只有一个词,不满足格式则报错无法上传
104
+ # 每个词限制**5个汉字,15个字符**,单个词库最多不超过100个词
105
+ # 注意不要有空行,尤其是最后一行
106
+ # @type KeyWordFile: String
107
+
108
+ attr_accessor :Name, :KeyWordFile
109
+
110
+ def initialize(name=nil, keywordfile=nil)
111
+ @Name = name
112
+ @KeyWordFile = keywordfile
113
+ end
114
+
115
+ def deserialize(params)
116
+ @Name = params['Name']
117
+ @KeyWordFile = params['KeyWordFile']
118
+ end
119
+ end
120
+
121
+ # CreateAsrKeyWordLib返回参数结构体
122
+ class CreateAsrKeyWordLibResponse < TencentCloud::Common::AbstractModel
123
+ # @param Data: 词表ID数据
124
+ # @type Data: :class:`Tencentcloud::Asr.v20190614.models.KeyWordLibIdData`
125
+ # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
126
+ # @type RequestId: String
127
+
128
+ attr_accessor :Data, :RequestId
129
+
130
+ def initialize(data=nil, requestid=nil)
131
+ @Data = data
132
+ @RequestId = requestid
133
+ end
134
+
135
+ def deserialize(params)
136
+ unless params['Data'].nil?
137
+ @Data = KeyWordLibIdData.new
138
+ @Data.deserialize(params['Data'])
139
+ end
140
+ @RequestId = params['RequestId']
141
+ end
142
+ end
143
+
96
144
  # CreateAsrVocab请求参数结构体
97
145
  class CreateAsrVocabRequest < TencentCloud::Common::AbstractModel
98
146
  # @param Name: 热词表名称,长度在1-255之间
@@ -257,8 +305,8 @@ module TencentCloud
257
305
 
258
306
  attr_accessor :ModelName, :TextUrl, :ModelType, :TagInfos
259
307
  extend Gem::Deprecate
260
- deprecate :TagInfos, :none, 2024, 8
261
- deprecate :TagInfos=, :none, 2024, 8
308
+ deprecate :TagInfos, :none, 2024, 9
309
+ deprecate :TagInfos=, :none, 2024, 9
262
310
 
263
311
  def initialize(modelname=nil, texturl=nil, modeltype=nil, taginfos=nil)
264
312
  @ModelName = modelname
@@ -479,13 +527,15 @@ module TencentCloud
479
527
 
480
528
  # - 热词权重设置为100时,当前热词开启热词增强同音替换功能(仅支持8k_zh,16k_zh),举例:热词配置“蜜制|100”时,与“蜜制”同拼音(mizhi)的“秘制”的识别结果会被强制替换成“蜜制”。因此建议客户根据自己的实际情况开启该功能。建议仅将重要且必须生效的热词设置到100,设置过多权重为100的热词将影响整体字准率。
481
529
  # @type HotwordList: String
530
+ # @param KeyWordLibIdList: 关键词识别ID列表,默认空为不进行识别,最多10个
531
+ # @type KeyWordLibIdList: Array
482
532
 
483
- attr_accessor :EngineModelType, :ChannelNum, :ResTextFormat, :SourceType, :Data, :DataLen, :Url, :CallbackUrl, :SpeakerDiarization, :SpeakerNumber, :HotwordId, :ReinforceHotword, :CustomizationId, :EmotionRecognition, :EmotionalEnergy, :ConvertNumMode, :FilterDirty, :FilterPunc, :FilterModal, :SentenceMaxLength, :Extra, :HotwordList
533
+ attr_accessor :EngineModelType, :ChannelNum, :ResTextFormat, :SourceType, :Data, :DataLen, :Url, :CallbackUrl, :SpeakerDiarization, :SpeakerNumber, :HotwordId, :ReinforceHotword, :CustomizationId, :EmotionRecognition, :EmotionalEnergy, :ConvertNumMode, :FilterDirty, :FilterPunc, :FilterModal, :SentenceMaxLength, :Extra, :HotwordList, :KeyWordLibIdList
484
534
  extend Gem::Deprecate
485
- deprecate :ReinforceHotword, :none, 2024, 8
486
- deprecate :ReinforceHotword=, :none, 2024, 8
535
+ deprecate :ReinforceHotword, :none, 2024, 9
536
+ deprecate :ReinforceHotword=, :none, 2024, 9
487
537
 
488
- def initialize(enginemodeltype=nil, channelnum=nil, restextformat=nil, sourcetype=nil, data=nil, datalen=nil, url=nil, callbackurl=nil, speakerdiarization=nil, speakernumber=nil, hotwordid=nil, reinforcehotword=nil, customizationid=nil, emotionrecognition=nil, emotionalenergy=nil, convertnummode=nil, filterdirty=nil, filterpunc=nil, filtermodal=nil, sentencemaxlength=nil, extra=nil, hotwordlist=nil)
538
+ def initialize(enginemodeltype=nil, channelnum=nil, restextformat=nil, sourcetype=nil, data=nil, datalen=nil, url=nil, callbackurl=nil, speakerdiarization=nil, speakernumber=nil, hotwordid=nil, reinforcehotword=nil, customizationid=nil, emotionrecognition=nil, emotionalenergy=nil, convertnummode=nil, filterdirty=nil, filterpunc=nil, filtermodal=nil, sentencemaxlength=nil, extra=nil, hotwordlist=nil, keywordlibidlist=nil)
489
539
  @EngineModelType = enginemodeltype
490
540
  @ChannelNum = channelnum
491
541
  @ResTextFormat = restextformat
@@ -508,6 +558,7 @@ module TencentCloud
508
558
  @SentenceMaxLength = sentencemaxlength
509
559
  @Extra = extra
510
560
  @HotwordList = hotwordlist
561
+ @KeyWordLibIdList = keywordlibidlist
511
562
  end
512
563
 
513
564
  def deserialize(params)
@@ -533,6 +584,7 @@ module TencentCloud
533
584
  @SentenceMaxLength = params['SentenceMaxLength']
534
585
  @Extra = params['Extra']
535
586
  @HotwordList = params['HotwordList']
587
+ @KeyWordLibIdList = params['KeyWordLibIdList']
536
588
  end
537
589
  end
538
590
 
@@ -560,6 +612,38 @@ module TencentCloud
560
612
  end
561
613
  end
562
614
 
615
+ # DeleteAsrKeyWordLib请求参数结构体
616
+ class DeleteAsrKeyWordLibRequest < TencentCloud::Common::AbstractModel
617
+ # @param KeyWordLibId: 关键词表ID
618
+ # @type KeyWordLibId: String
619
+
620
+ attr_accessor :KeyWordLibId
621
+
622
+ def initialize(keywordlibid=nil)
623
+ @KeyWordLibId = keywordlibid
624
+ end
625
+
626
+ def deserialize(params)
627
+ @KeyWordLibId = params['KeyWordLibId']
628
+ end
629
+ end
630
+
631
+ # DeleteAsrKeyWordLib返回参数结构体
632
+ class DeleteAsrKeyWordLibResponse < TencentCloud::Common::AbstractModel
633
+ # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
634
+ # @type RequestId: String
635
+
636
+ attr_accessor :RequestId
637
+
638
+ def initialize(requestid=nil)
639
+ @RequestId = requestid
640
+ end
641
+
642
+ def deserialize(params)
643
+ @RequestId = params['RequestId']
644
+ end
645
+ end
646
+
563
647
  # DeleteAsrVocab请求参数结构体
564
648
  class DeleteAsrVocabRequest < TencentCloud::Common::AbstractModel
565
649
  # @param VocabId: 热词表Id
@@ -775,6 +859,57 @@ module TencentCloud
775
859
  end
776
860
  end
777
861
 
862
+ # GetAsrKeyWordLibList请求参数结构体
863
+ class GetAsrKeyWordLibListRequest < TencentCloud::Common::AbstractModel
864
+ # @param Offset: 分页Offset
865
+ # @type Offset: Integer
866
+ # @param Limit: 分页Limit
867
+ # @type Limit: Integer
868
+ # @param SpecifyNames: 词库名称或者UIN检索
869
+ # @type SpecifyNames: Array
870
+ # @param OnlySelf: 只看用户自己创建的
871
+ # @type OnlySelf: Boolean
872
+
873
+ attr_accessor :Offset, :Limit, :SpecifyNames, :OnlySelf
874
+
875
+ def initialize(offset=nil, limit=nil, specifynames=nil, onlyself=nil)
876
+ @Offset = offset
877
+ @Limit = limit
878
+ @SpecifyNames = specifynames
879
+ @OnlySelf = onlyself
880
+ end
881
+
882
+ def deserialize(params)
883
+ @Offset = params['Offset']
884
+ @Limit = params['Limit']
885
+ @SpecifyNames = params['SpecifyNames']
886
+ @OnlySelf = params['OnlySelf']
887
+ end
888
+ end
889
+
890
+ # GetAsrKeyWordLibList返回参数结构体
891
+ class GetAsrKeyWordLibListResponse < TencentCloud::Common::AbstractModel
892
+ # @param Data: 关键词列表返回数据
893
+ # @type Data: :class:`Tencentcloud::Asr.v20190614.models.KeyWordLibListData`
894
+ # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
895
+ # @type RequestId: String
896
+
897
+ attr_accessor :Data, :RequestId
898
+
899
+ def initialize(data=nil, requestid=nil)
900
+ @Data = data
901
+ @RequestId = requestid
902
+ end
903
+
904
+ def deserialize(params)
905
+ unless params['Data'].nil?
906
+ @Data = KeyWordLibListData.new
907
+ @Data.deserialize(params['Data'])
908
+ end
909
+ @RequestId = params['RequestId']
910
+ end
911
+ end
912
+
778
913
  # GetAsrVocabList请求参数结构体
779
914
  class GetAsrVocabListRequest < TencentCloud::Common::AbstractModel
780
915
  # @param TagInfos: 标签信息,格式为“$TagKey : $TagValue ”,中间分隔符为“空格”+“:”+“空格”
@@ -908,8 +1043,8 @@ module TencentCloud
908
1043
 
909
1044
  attr_accessor :TagInfos, :Limit, :Offset
910
1045
  extend Gem::Deprecate
911
- deprecate :TagInfos, :none, 2024, 8
912
- deprecate :TagInfos=, :none, 2024, 8
1046
+ deprecate :TagInfos, :none, 2024, 9
1047
+ deprecate :TagInfos=, :none, 2024, 9
913
1048
 
914
1049
  def initialize(taginfos=nil, limit=nil, offset=nil)
915
1050
  @TagInfos = taginfos
@@ -1018,6 +1153,116 @@ module TencentCloud
1018
1153
  end
1019
1154
  end
1020
1155
 
1156
+ # 关键词表信息
1157
+ class KeyWordLib < TencentCloud::Common::AbstractModel
1158
+ # @param KeyWordLibId: 关键词表ID
1159
+ # 注意:此字段可能返回 null,表示取不到有效值。
1160
+ # @type KeyWordLibId: String
1161
+ # @param Name: 关键词表名称
1162
+ # 注意:此字段可能返回 null,表示取不到有效值。
1163
+ # @type Name: String
1164
+ # @param KeyWordList: 关键词列表
1165
+ # 注意:此字段可能返回 null,表示取不到有效值。
1166
+ # @type KeyWordList: Array
1167
+ # @param CreateTime: 创建时间
1168
+ # 注意:此字段可能返回 null,表示取不到有效值。
1169
+ # @type CreateTime: String
1170
+ # @param UpdateTime: 更新时间
1171
+ # 注意:此字段可能返回 null,表示取不到有效值。
1172
+ # @type UpdateTime: String
1173
+
1174
+ attr_accessor :KeyWordLibId, :Name, :KeyWordList, :CreateTime, :UpdateTime
1175
+
1176
+ def initialize(keywordlibid=nil, name=nil, keywordlist=nil, createtime=nil, updatetime=nil)
1177
+ @KeyWordLibId = keywordlibid
1178
+ @Name = name
1179
+ @KeyWordList = keywordlist
1180
+ @CreateTime = createtime
1181
+ @UpdateTime = updatetime
1182
+ end
1183
+
1184
+ def deserialize(params)
1185
+ @KeyWordLibId = params['KeyWordLibId']
1186
+ @Name = params['Name']
1187
+ @KeyWordList = params['KeyWordList']
1188
+ @CreateTime = params['CreateTime']
1189
+ @UpdateTime = params['UpdateTime']
1190
+ end
1191
+ end
1192
+
1193
+ # 关键词ID
1194
+ class KeyWordLibIdData < TencentCloud::Common::AbstractModel
1195
+ # @param KeyWordLibId: 关键词ID
1196
+ # 注意:此字段可能返回 null,表示取不到有效值。
1197
+ # @type KeyWordLibId: String
1198
+
1199
+ attr_accessor :KeyWordLibId
1200
+
1201
+ def initialize(keywordlibid=nil)
1202
+ @KeyWordLibId = keywordlibid
1203
+ end
1204
+
1205
+ def deserialize(params)
1206
+ @KeyWordLibId = params['KeyWordLibId']
1207
+ end
1208
+ end
1209
+
1210
+ # 查询列表返回数据
1211
+ class KeyWordLibListData < TencentCloud::Common::AbstractModel
1212
+ # @param KeyWordLibList: 关键词表列表
1213
+ # 注意:此字段可能返回 null,表示取不到有效值。
1214
+ # @type KeyWordLibList: Array
1215
+ # @param TotalCount: 关键词列表总数
1216
+ # 注意:此字段可能返回 null,表示取不到有效值。
1217
+ # @type TotalCount: Integer
1218
+
1219
+ attr_accessor :KeyWordLibList, :TotalCount
1220
+
1221
+ def initialize(keywordliblist=nil, totalcount=nil)
1222
+ @KeyWordLibList = keywordliblist
1223
+ @TotalCount = totalcount
1224
+ end
1225
+
1226
+ def deserialize(params)
1227
+ unless params['KeyWordLibList'].nil?
1228
+ @KeyWordLibList = []
1229
+ params['KeyWordLibList'].each do |i|
1230
+ keywordlib_tmp = KeyWordLib.new
1231
+ keywordlib_tmp.deserialize(i)
1232
+ @KeyWordLibList << keywordlib_tmp
1233
+ end
1234
+ end
1235
+ @TotalCount = params['TotalCount']
1236
+ end
1237
+ end
1238
+
1239
+ # 关键字识别结果
1240
+ class KeyWordResult < TencentCloud::Common::AbstractModel
1241
+ # @param KeyWordLibID: 关键词库ID
1242
+ # 注意:此字段可能返回 null,表示取不到有效值。
1243
+ # @type KeyWordLibID: String
1244
+ # @param KeyWordLibName: 关键词库名称
1245
+ # 注意:此字段可能返回 null,表示取不到有效值。
1246
+ # @type KeyWordLibName: String
1247
+ # @param KeyWords: 匹配到的关键词
1248
+ # 注意:此字段可能返回 null,表示取不到有效值。
1249
+ # @type KeyWords: Array
1250
+
1251
+ attr_accessor :KeyWordLibID, :KeyWordLibName, :KeyWords
1252
+
1253
+ def initialize(keywordlibid=nil, keywordlibname=nil, keywords=nil)
1254
+ @KeyWordLibID = keywordlibid
1255
+ @KeyWordLibName = keywordlibname
1256
+ @KeyWords = keywords
1257
+ end
1258
+
1259
+ def deserialize(params)
1260
+ @KeyWordLibID = params['KeyWordLibID']
1261
+ @KeyWordLibName = params['KeyWordLibName']
1262
+ @KeyWords = params['KeyWords']
1263
+ end
1264
+ end
1265
+
1021
1266
  # [自学习模型信息](https://cloud.tencent.com/document/product/1093/90813#3.-.E8.BE.93.E5.87.BA.E5.8F.82.E6.95.B0)
1022
1267
  class Model < TencentCloud::Common::AbstractModel
1023
1268
  # @param ModelName: 模型名称
@@ -1191,10 +1436,13 @@ module TencentCloud
1191
1436
  # @param EmotionType: 情绪类型(可能为空)
1192
1437
  # 注意:此字段可能返回 null,表示取不到有效值。
1193
1438
  # @type EmotionType: Array
1439
+ # @param KeyWordResults: 关键词识别结果列表
1440
+ # 注意:此字段可能返回 null,表示取不到有效值。
1441
+ # @type KeyWordResults: Array
1194
1442
 
1195
- attr_accessor :FinalSentence, :SliceSentence, :WrittenText, :StartMs, :EndMs, :WordsNum, :Words, :SpeechSpeed, :SpeakerId, :EmotionalEnergy, :SilenceTime, :EmotionType
1443
+ attr_accessor :FinalSentence, :SliceSentence, :WrittenText, :StartMs, :EndMs, :WordsNum, :Words, :SpeechSpeed, :SpeakerId, :EmotionalEnergy, :SilenceTime, :EmotionType, :KeyWordResults
1196
1444
 
1197
- def initialize(finalsentence=nil, slicesentence=nil, writtentext=nil, startms=nil, endms=nil, wordsnum=nil, words=nil, speechspeed=nil, speakerid=nil, emotionalenergy=nil, silencetime=nil, emotiontype=nil)
1445
+ def initialize(finalsentence=nil, slicesentence=nil, writtentext=nil, startms=nil, endms=nil, wordsnum=nil, words=nil, speechspeed=nil, speakerid=nil, emotionalenergy=nil, silencetime=nil, emotiontype=nil, keywordresults=nil)
1198
1446
  @FinalSentence = finalsentence
1199
1447
  @SliceSentence = slicesentence
1200
1448
  @WrittenText = writtentext
@@ -1207,6 +1455,7 @@ module TencentCloud
1207
1455
  @EmotionalEnergy = emotionalenergy
1208
1456
  @SilenceTime = silencetime
1209
1457
  @EmotionType = emotiontype
1458
+ @KeyWordResults = keywordresults
1210
1459
  end
1211
1460
 
1212
1461
  def deserialize(params)
@@ -1229,6 +1478,14 @@ module TencentCloud
1229
1478
  @EmotionalEnergy = params['EmotionalEnergy']
1230
1479
  @SilenceTime = params['SilenceTime']
1231
1480
  @EmotionType = params['EmotionType']
1481
+ unless params['KeyWordResults'].nil?
1482
+ @KeyWordResults = []
1483
+ params['KeyWordResults'].each do |i|
1484
+ keywordresult_tmp = KeyWordResult.new
1485
+ keywordresult_tmp.deserialize(i)
1486
+ @KeyWordResults << keywordresult_tmp
1487
+ end
1488
+ end
1232
1489
  end
1233
1490
  end
1234
1491
 
@@ -1311,14 +1568,14 @@ module TencentCloud
1311
1568
 
1312
1569
  attr_accessor :EngSerViceType, :SourceType, :VoiceFormat, :ProjectId, :SubServiceType, :Url, :UsrAudioKey, :Data, :DataLen, :WordInfo, :FilterDirty, :FilterModal, :FilterPunc, :ConvertNumMode, :HotwordId, :CustomizationId, :ReinforceHotword, :HotwordList, :InputSampleRate
1313
1570
  extend Gem::Deprecate
1314
- deprecate :ProjectId, :none, 2024, 8
1315
- deprecate :ProjectId=, :none, 2024, 8
1316
- deprecate :SubServiceType, :none, 2024, 8
1317
- deprecate :SubServiceType=, :none, 2024, 8
1318
- deprecate :UsrAudioKey, :none, 2024, 8
1319
- deprecate :UsrAudioKey=, :none, 2024, 8
1320
- deprecate :ReinforceHotword, :none, 2024, 8
1321
- deprecate :ReinforceHotword=, :none, 2024, 8
1571
+ deprecate :ProjectId, :none, 2024, 9
1572
+ deprecate :ProjectId=, :none, 2024, 9
1573
+ deprecate :SubServiceType, :none, 2024, 9
1574
+ deprecate :SubServiceType=, :none, 2024, 9
1575
+ deprecate :UsrAudioKey, :none, 2024, 9
1576
+ deprecate :UsrAudioKey=, :none, 2024, 9
1577
+ deprecate :ReinforceHotword, :none, 2024, 9
1578
+ deprecate :ReinforceHotword=, :none, 2024, 9
1322
1579
 
1323
1580
  def initialize(engservicetype=nil, sourcetype=nil, voiceformat=nil, projectid=nil, subservicetype=nil, url=nil, usraudiokey=nil, data=nil, datalen=nil, wordinfo=nil, filterdirty=nil, filtermodal=nil, filterpunc=nil, convertnummode=nil, hotwordid=nil, customizationid=nil, reinforcehotword=nil, hotwordlist=nil, inputsamplerate=nil)
1324
1581
  @EngSerViceType = engservicetype
@@ -1563,6 +1820,57 @@ module TencentCloud
1563
1820
  end
1564
1821
  end
1565
1822
 
1823
+ # UpdateAsrKeyWordLib请求参数结构体
1824
+ class UpdateAsrKeyWordLibRequest < TencentCloud::Common::AbstractModel
1825
+ # @param KeyWordLibId: 关键词表ID
1826
+ # @type KeyWordLibId: String
1827
+ # @param Name: 词表名称,长度在1-20之间
1828
+ # 仅限中英文数字-_
1829
+ # @type Name: String
1830
+ # @param KeyWordFile: - 词文件(纯文本文件)以行分隔 ,进行二进制base64编码
1831
+ # - 格式要求:TXT 每行只有一个词,不满足格式则报错无法上传
1832
+ # - 每个词最多5个汉字或15个字符,单个词库最多不超过100个词
1833
+ # - 此参数为空则只更新词表名称
1834
+ # @type KeyWordFile: String
1835
+
1836
+ attr_accessor :KeyWordLibId, :Name, :KeyWordFile
1837
+
1838
+ def initialize(keywordlibid=nil, name=nil, keywordfile=nil)
1839
+ @KeyWordLibId = keywordlibid
1840
+ @Name = name
1841
+ @KeyWordFile = keywordfile
1842
+ end
1843
+
1844
+ def deserialize(params)
1845
+ @KeyWordLibId = params['KeyWordLibId']
1846
+ @Name = params['Name']
1847
+ @KeyWordFile = params['KeyWordFile']
1848
+ end
1849
+ end
1850
+
1851
+ # UpdateAsrKeyWordLib返回参数结构体
1852
+ class UpdateAsrKeyWordLibResponse < TencentCloud::Common::AbstractModel
1853
+ # @param Data: 关键词表ID数据
1854
+ # @type Data: :class:`Tencentcloud::Asr.v20190614.models.KeyWordLibIdData`
1855
+ # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
1856
+ # @type RequestId: String
1857
+
1858
+ attr_accessor :Data, :RequestId
1859
+
1860
+ def initialize(data=nil, requestid=nil)
1861
+ @Data = data
1862
+ @RequestId = requestid
1863
+ end
1864
+
1865
+ def deserialize(params)
1866
+ unless params['Data'].nil?
1867
+ @Data = KeyWordLibIdData.new
1868
+ @Data.deserialize(params['Data'])
1869
+ end
1870
+ @RequestId = params['RequestId']
1871
+ end
1872
+ end
1873
+
1566
1874
  # UpdateAsrVocab请求参数结构体
1567
1875
  class UpdateAsrVocabRequest < TencentCloud::Common::AbstractModel
1568
1876
  # @param VocabId: 热词表ID
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tencentcloud-sdk-asr
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.896
4
+ version: 3.0.897
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tencent Cloud
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-28 00:00:00.000000000 Z
11
+ date: 2024-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tencentcloud-sdk-common