tccli 3.0.1176.1__py2.py3-none-any.whl → 3.0.1177.1__py2.py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/cdwdoris/cdwdoris_client.py +53 -0
  3. tccli/services/cdwdoris/v20211228/api.json +151 -0
  4. tccli/services/cdwdoris/v20211228/examples.json +8 -0
  5. tccli/services/clb/v20180317/api.json +1 -1
  6. tccli/services/dcdb/v20180411/api.json +28 -1
  7. tccli/services/dnspod/v20210323/api.json +1 -0
  8. tccli/services/dsgc/v20190723/api.json +85 -9
  9. tccli/services/dsgc/v20190723/examples.json +4 -4
  10. tccli/services/faceid/v20180301/api.json +29 -1
  11. tccli/services/mrs/v20200910/api.json +3 -0
  12. tccli/services/mrs/v20200910/examples.json +1 -1
  13. tccli/services/organization/v20210331/api.json +23 -23
  14. tccli/services/organization/v20210331/examples.json +4 -4
  15. tccli/services/redis/v20180412/api.json +85 -39
  16. tccli/services/redis/v20180412/examples.json +2 -2
  17. tccli/services/trtc/trtc_client.py +53 -0
  18. tccli/services/trtc/v20190722/api.json +80 -1
  19. tccli/services/trtc/v20190722/examples.json +8 -0
  20. tccli/services/tse/v20201207/api.json +58 -0
  21. tccli/services/tts/v20190823/api.json +2 -2
  22. tccli/services/vclm/v20240523/api.json +9 -0
  23. tccli/services/vod/v20180717/api.json +1 -1
  24. tccli/services/vpc/v20170312/api.json +158 -37
  25. {tccli-3.0.1176.1.dist-info → tccli-3.0.1177.1.dist-info}/METADATA +2 -2
  26. {tccli-3.0.1176.1.dist-info → tccli-3.0.1177.1.dist-info}/RECORD +29 -29
  27. {tccli-3.0.1176.1.dist-info → tccli-3.0.1177.1.dist-info}/WHEEL +0 -0
  28. {tccli-3.0.1176.1.dist-info → tccli-3.0.1177.1.dist-info}/entry_points.txt +0 -0
  29. {tccli-3.0.1176.1.dist-info → tccli-3.0.1177.1.dist-info}/license_files/LICENSE +0 -0
@@ -173,6 +173,58 @@ def doStopAITranscription(args, parsed_globals):
173
173
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
174
174
 
175
175
 
176
+ def doUpdateAIConversation(args, parsed_globals):
177
+ g_param = parse_global_arg(parsed_globals)
178
+
179
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
180
+ cred = credential.CVMRoleCredential()
181
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
182
+ cred = credential.STSAssumeRoleCredential(
183
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
184
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
185
+ )
186
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
187
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
188
+ else:
189
+ cred = credential.Credential(
190
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
191
+ )
192
+ http_profile = HttpProfile(
193
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
194
+ reqMethod="POST",
195
+ endpoint=g_param[OptionsDefine.Endpoint],
196
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
197
+ )
198
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
199
+ if g_param[OptionsDefine.Language]:
200
+ profile.language = g_param[OptionsDefine.Language]
201
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
202
+ client = mod.TrtcClient(cred, g_param[OptionsDefine.Region], profile)
203
+ client._sdkVersion += ("_CLI_" + __version__)
204
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
205
+ model = models.UpdateAIConversationRequest()
206
+ model.from_json_string(json.dumps(args))
207
+ start_time = time.time()
208
+ while True:
209
+ rsp = client.UpdateAIConversation(model)
210
+ result = rsp.to_json_string()
211
+ try:
212
+ json_obj = json.loads(result)
213
+ except TypeError as e:
214
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
215
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
216
+ break
217
+ cur_time = time.time()
218
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
219
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
220
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
221
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
222
+ else:
223
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
224
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
225
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
226
+
227
+
176
228
  def doDescribeTrtcUsage(args, parsed_globals):
177
229
  g_param = parse_global_arg(parsed_globals)
178
230
 
@@ -2891,6 +2943,7 @@ ACTION_MAP = {
2891
2943
  "DescribeTRTCMarketScaleMetricData": doDescribeTRTCMarketScaleMetricData,
2892
2944
  "DescribeRoomInfo": doDescribeRoomInfo,
2893
2945
  "StopAITranscription": doStopAITranscription,
2946
+ "UpdateAIConversation": doUpdateAIConversation,
2894
2947
  "DescribeTrtcUsage": doDescribeTrtcUsage,
2895
2948
  "StopAIConversation": doStopAIConversation,
2896
2949
  "DescribeTRTCMarketQualityMetricData": doDescribeTRTCMarketQualityMetricData,
@@ -274,7 +274,7 @@
274
274
  "status": "online"
275
275
  },
276
276
  "StartAITranscription": {
277
- "document": "这个接口调用后,后台会启动转录机器人,实时进行语音识别并下发字幕和转录消息。\n转录机器人支持两种拉流方式,通过TranscriptionMode字段控制:\n- 拉取全房间的流。\n- 拉取特定用户的流。\n\n服务端通过TRTC的自定义消息实时下发字幕和会议记录,CmdId固定是1。客户端只需监听自定义消息的回调即可,比如[c++回调](https://cloud.tencent.com/document/product/647/79637#4cd82f4edb24992a15a25187089e1565)。其他客户端比如安卓、Web等同样可在该链接处找到。\n\n服务端实时下发的消息是JSON字符串,实时字幕具体格式如下:\n`{\n \"type\": \"subtitle\",\n \"userid\": \"xxx\",\n \"text\": \"xxx\",\n \"start_time\": \"00:00:02\",\n \"end_time\": \"00:00:05\"\n}`\n字段作用如下:\n- type是subtitle,表示这是实时字幕消息。\n- userid表示是哪个用户说的话。\n- text是语音识别出的文本。\n- start_time和end_time表示该字幕消息从任务开启后的开始和结束时间。\n\n转录消息具体格式如下:\n`{\n \"type\": \"transcription\",\n \"userid\": \"xxx\",\n \"text\": \"xxx\",\n \"start_time\": \"00:00:02\",\n \"end_time\": \"00:00:05\"\n}`\n字段作用如下:\n- type是transcription,表示这是转录消息。\n- 其余字段同实时字幕消息。\n\n转录消息和实时字幕消息的区别是,转录消息是完整的一句话,实时字幕消息则是这一句话的中间阶段。\n假如有一句完整的话,“今天天气怎么样?”,那么服务的下发消息的顺序可能是这样:\n- 字幕消息,“今天”\n- 字幕消息,“今天天气”\n- 字幕消息,“今天天气怎么样”\n- 转录消息,“今天天气怎么样?”",
277
+ "document": "启动转录机器人,后台会通过机器人拉流进行实时进行语音识别并下发字幕和转录消息。\n转录机器人支持两种拉流方式,通过TranscriptionMode字段控制:\n- 拉取全房间的流。\n- 拉取特定用户的流。\n\n服务端通过TRTC的自定义消息实时下发字幕以及转录消息,CmdId固定是1。客户端只需监听自定义消息的回调即可,比如[c++回调](https://cloud.tencent.com/document/product/647/79637#4cd82f4edb24992a15a25187089e1565)。其他客户端比如安卓、Web等同样可在该链接处找到。",
278
278
  "input": "StartAITranscriptionRequest",
279
279
  "name": "开始AI转录任务",
280
280
  "output": "StartAITranscriptionResponse",
@@ -371,6 +371,13 @@
371
371
  "output": "SummarizeTranscriptionResponse",
372
372
  "status": "deprecated"
373
373
  },
374
+ "UpdateAIConversation": {
375
+ "document": "更新AIConversation参数",
376
+ "input": "UpdateAIConversationRequest",
377
+ "name": "更新AI对话",
378
+ "output": "UpdateAIConversationResponse",
379
+ "status": "online"
380
+ },
374
381
  "UpdatePublishCdnStream": {
375
382
  "document": "接口说明:\n成功发起混流转推后,可以使用此接口来更新任务。仅在任务进行时有效,任务退出后更新将会返回错误。更新操作为增量更新模式。\n注意:为了保障推流的稳定性,更新不支持任务在纯音频、音视频、纯视频之间进行切换。",
376
383
  "input": "UpdatePublishCdnStreamRequest",
@@ -7008,6 +7015,78 @@
7008
7015
  ],
7009
7016
  "usage": "out"
7010
7017
  },
7018
+ "UpdateAIConversationRequest": {
7019
+ "document": "UpdateAIConversation请求参数结构体",
7020
+ "members": [
7021
+ {
7022
+ "disabled": false,
7023
+ "document": "唯一标识一个任务",
7024
+ "example": "无",
7025
+ "member": "string",
7026
+ "name": "TaskId",
7027
+ "required": true,
7028
+ "type": "string"
7029
+ },
7030
+ {
7031
+ "disabled": false,
7032
+ "document": "不填写则不进行更新,机器人的欢迎语",
7033
+ "example": "无",
7034
+ "member": "string",
7035
+ "name": "WelcomeMessage",
7036
+ "required": false,
7037
+ "type": "string"
7038
+ },
7039
+ {
7040
+ "disabled": false,
7041
+ "document": "不填写则不进行更新。智能打断模式,0表示服务端自动打断,1表示服务端不打断,由端上发送打断信令进行打断",
7042
+ "example": "无",
7043
+ "member": "uint64",
7044
+ "name": "InterruptMode",
7045
+ "required": false,
7046
+ "type": "int"
7047
+ },
7048
+ {
7049
+ "disabled": false,
7050
+ "document": "不填写则不进行更新。InterruptMode为0时使用,单位为毫秒,默认为500ms。表示服务端检测到持续InterruptSpeechDuration毫秒的人声则进行打断",
7051
+ "example": "无",
7052
+ "member": "uint64",
7053
+ "name": "InterruptSpeechDuration",
7054
+ "required": false,
7055
+ "type": "int"
7056
+ },
7057
+ {
7058
+ "disabled": false,
7059
+ "document": "不填写则不进行更新,LLM配置,详情见StartAIConversation接口",
7060
+ "example": "无",
7061
+ "member": "string",
7062
+ "name": "LLMConfig",
7063
+ "required": false,
7064
+ "type": "string"
7065
+ },
7066
+ {
7067
+ "disabled": false,
7068
+ "document": "不填写则不进行更新,TTS配置,详情见StartAIConversation接口",
7069
+ "example": "无",
7070
+ "member": "string",
7071
+ "name": "TTSConfig",
7072
+ "required": false,
7073
+ "type": "string"
7074
+ }
7075
+ ],
7076
+ "type": "object"
7077
+ },
7078
+ "UpdateAIConversationResponse": {
7079
+ "document": "UpdateAIConversation返回参数结构体",
7080
+ "members": [
7081
+ {
7082
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
7083
+ "member": "string",
7084
+ "name": "RequestId",
7085
+ "type": "string"
7086
+ }
7087
+ ],
7088
+ "type": "object"
7089
+ },
7011
7090
  "UpdatePublishCdnStreamRequest": {
7012
7091
  "document": "UpdatePublishCdnStream请求参数结构体",
7013
7092
  "members": [
@@ -454,6 +454,14 @@
454
454
  "title": "样例"
455
455
  }
456
456
  ],
457
+ "UpdateAIConversation": [
458
+ {
459
+ "document": "在对话过程中,想要动态更新tts的音色",
460
+ "input": "POST / HTTP/1.1\nHost: trtc.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpdateAIConversation\n<公共请求参数>\n\n{\n \"TaskId\": \"your-taskid\",\n \"TTSConfig\": \"your-tts-config-json\"\n}",
461
+ "output": "{\n \"Response\": {\n \"RequestId\": \"xxx\"\n }\n}",
462
+ "title": "更新tts音色"
463
+ }
464
+ ],
457
465
  "UpdatePublishCdnStream": [
458
466
  {
459
467
  "document": "无",
@@ -8178,6 +8178,15 @@
8178
8178
  "name": "Limit",
8179
8179
  "required": false,
8180
8180
  "type": "int"
8181
+ },
8182
+ {
8183
+ "disabled": false,
8184
+ "document": "地域",
8185
+ "example": "无",
8186
+ "member": "Location",
8187
+ "name": "Location",
8188
+ "required": false,
8189
+ "type": "object"
8181
8190
  }
8182
8191
  ],
8183
8192
  "type": "object"
@@ -8205,6 +8214,16 @@
8205
8214
  "type": "list",
8206
8215
  "value_allowed_null": false
8207
8216
  },
8217
+ {
8218
+ "disabled": false,
8219
+ "document": "地域",
8220
+ "example": "无",
8221
+ "member": "Location",
8222
+ "name": "Location",
8223
+ "output_required": false,
8224
+ "type": "object",
8225
+ "value_allowed_null": false
8226
+ },
8208
8227
  {
8209
8228
  "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
8210
8229
  "member": "string",
@@ -12850,6 +12869,45 @@
12850
12869
  ],
12851
12870
  "usage": "in"
12852
12871
  },
12872
+ "Location": {
12873
+ "document": "新增Location字段,展示zone/region/campus",
12874
+ "members": [
12875
+ {
12876
+ "disabled": false,
12877
+ "document": "大区\n注意:此字段可能返回 null,表示取不到有效值。",
12878
+ "example": "huanan",
12879
+ "member": "string",
12880
+ "name": "Region",
12881
+ "output_required": false,
12882
+ "required": false,
12883
+ "type": "string",
12884
+ "value_allowed_null": true
12885
+ },
12886
+ {
12887
+ "disabled": false,
12888
+ "document": "可用区\n注意:此字段可能返回 null,表示取不到有效值。",
12889
+ "example": "guangzhou",
12890
+ "member": "string",
12891
+ "name": "Zone",
12892
+ "output_required": false,
12893
+ "required": false,
12894
+ "type": "string",
12895
+ "value_allowed_null": true
12896
+ },
12897
+ {
12898
+ "disabled": false,
12899
+ "document": "机房\n注意:此字段可能返回 null,表示取不到有效值。",
12900
+ "example": "guangzhou-1",
12901
+ "member": "string",
12902
+ "name": "Campus",
12903
+ "output_required": false,
12904
+ "required": false,
12905
+ "type": "string",
12906
+ "value_allowed_null": true
12907
+ }
12908
+ ],
12909
+ "usage": "both"
12910
+ },
12853
12911
  "Metadata": {
12854
12912
  "document": "元数据信息",
12855
12913
  "members": [
@@ -142,7 +142,7 @@
142
142
  },
143
143
  {
144
144
  "disabled": false,
145
- "document": "控制合成音频的情感,仅支持多情感音色使用。取值: neutral(中性)、sad(悲伤)、happy(高兴)、angry(生气)、fear(恐惧)、news(新闻)、story(故事)、radio(广播)、poetry(诗歌)、call(客服)、撒娇(sajiao)、厌恶(disgusted)、震惊(amaze)、平静(peaceful)、兴奋(exciting)、傲娇(aojiao)、解说(jieshuo)",
145
+ "document": "控制合成音频的情感,仅支持多情感音色使用。取值: neutral(中性)、sad(悲伤)、happy(高兴)、angry(生气)、fear(恐惧)、news(新闻)、story(故事)、radio(广播)、poetry(诗歌)、call(客服)、sajiao(撒娇)、disgusted(厌恶)、amaze(震惊)、peaceful(平静)、exciting(兴奋)、aojiao(傲娇)、jieshuo(解说)",
146
146
  "example": "neutral",
147
147
  "member": "string",
148
148
  "name": "EmotionCategory",
@@ -481,7 +481,7 @@
481
481
  },
482
482
  {
483
483
  "disabled": false,
484
- "document": "控制合成音频的情感,仅支持多情感音色使用。取值: neutral(中性)、sad(悲伤)、happy(高兴)、angry(生气)、fear(恐惧)、news(新闻)、story(故事)、radio(广播)、poetry(诗歌)、call(客服)、撒娇(sajiao)、厌恶(disgusted)、震惊(amaze)、平静(peaceful)、兴奋(exciting)、傲娇(aojiao)、解说(jieshuo)\n示例值:neutral",
484
+ "document": "控制合成音频的情感,仅支持多情感音色使用。取值: neutral(中性)、sad(悲伤)、happy(高兴)、angry(生气)、fear(恐惧)、news(新闻)、story(故事)、radio(广播)、poetry(诗歌)、call(客服)、sajiao(撒娇)、disgusted(厌恶)、amaze(震惊)、peaceful(平静)、exciting(兴奋)、aojiao(傲娇)、jieshuo(解说)\n示例值:neutral",
485
485
  "example": "无",
486
486
  "member": "string",
487
487
  "name": "EmotionCategory",
@@ -589,6 +589,15 @@
589
589
  "name": "EnableAudio",
590
590
  "required": false,
591
591
  "type": "bool"
592
+ },
593
+ {
594
+ "disabled": false,
595
+ "document": "是否检测输入图人体12个身体部位(头部、颈部、右肩、右肘、右腕、左肩、左肘、左腕、右髋、左髋,、左膝、右膝)。默认不检测。",
596
+ "example": "true",
597
+ "member": "bool",
598
+ "name": "EnableBodyJoins",
599
+ "required": false,
600
+ "type": "bool"
592
601
  }
593
602
  ],
594
603
  "type": "object"
@@ -33250,7 +33250,7 @@
33250
33250
  },
33251
33251
  {
33252
33252
  "disabled": false,
33253
- "document": "播放进度,单位为妙。\n注意:此字段可能返回 null,表示取不到有效值。",
33253
+ "document": "播放进度,单位为秒。\n注意:此字段可能返回 null,表示取不到有效值。",
33254
33254
  "example": "50",
33255
33255
  "member": "float",
33256
33256
  "name": "Progress",