tccli 3.0.1110.1__py2.py3-none-any.whl → 3.0.1111.1__py2.py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- tccli/__init__.py +1 -1
- tccli/examples/sms/v20210111/AddSmsTemplate.md +1 -1
- tccli/examples/sms/v20210111/ModifySmsTemplate.md +1 -1
- tccli/examples/trtc/v20190722/DescribeAITranscription.md +22 -0
- tccli/examples/trtc/v20190722/StartAITranscription.md +30 -0
- tccli/examples/trtc/v20190722/StopAITranscription.md +20 -0
- tccli/examples/trtc/v20190722/SummarizeTranscription.md +18 -0
- tccli/services/asr/v20190614/api.json +1 -1
- tccli/services/cdn/v20180606/api.json +12 -0
- tccli/services/dsgc/v20190723/api.json +17 -17
- tccli/services/essbasic/v20210526/examples.json +4 -4
- tccli/services/gme/v20180711/api.json +7 -7
- tccli/services/mps/v20190612/api.json +14 -14
- tccli/services/ocr/v20181119/api.json +50 -0
- tccli/services/sms/v20210111/api.json +4 -4
- tccli/services/sms/v20210111/examples.json +2 -2
- tccli/services/tmt/v20180321/api.json +12 -12
- tccli/services/trtc/trtc_client.py +212 -0
- tccli/services/trtc/v20190722/api.json +285 -0
- tccli/services/trtc/v20190722/examples.json +32 -0
- {tccli-3.0.1110.1.dist-info → tccli-3.0.1111.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1110.1.dist-info → tccli-3.0.1111.1.dist-info}/RECORD +25 -21
- {tccli-3.0.1110.1.dist-info → tccli-3.0.1111.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1110.1.dist-info → tccli-3.0.1111.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1110.1.dist-info → tccli-3.0.1111.1.dist-info}/license_files/LICENSE +0 -0
@@ -29,7 +29,7 @@
|
|
29
29
|
"status": "online"
|
30
30
|
},
|
31
31
|
"SpeechTranslate": {
|
32
|
-
"document": "本接口提供上传音频,将音频进行语音识别并翻译成文本的服务,目前开放中英互译的语音翻译服务。\n待识别和翻译的音频文件可以是 pcm、mp3和speex 格式,pcm采样率要求16kHz、位深16bit、单声道,音频内语音清晰。<br/>\n如果采用流式传输的方式,要求每个分片时长200ms~500ms;如果采用非流式的传输方式,要求音频时长不超过8s。注意最后一个分片的IsEnd参数设置为1。<br />\n提示:对于一般开发者,我们建议优先使用SDK接入简化开发。SDK使用介绍请直接查看 5.
|
32
|
+
"document": "本接口提供上传音频,将音频进行语音识别并翻译成文本的服务,目前开放中英互译的语音翻译服务。\n待识别和翻译的音频文件可以是 pcm、mp3和speex 格式,pcm采样率要求16kHz、位深16bit、单声道,音频内语音清晰。<br/>\n如果采用流式传输的方式,要求每个分片时长200ms~500ms;如果采用非流式的传输方式,要求音频时长不超过8s。注意最后一个分片的IsEnd参数设置为1。<br />\n提示:对于一般开发者,我们建议优先使用SDK接入简化开发。SDK使用介绍请直接查看 5. 开发者资源部分。",
|
33
33
|
"input": "SpeechTranslateRequest",
|
34
34
|
"name": "语音翻译",
|
35
35
|
"output": "SpeechTranslateResponse",
|
@@ -565,16 +565,16 @@
|
|
565
565
|
"type": "int"
|
566
566
|
},
|
567
567
|
{
|
568
|
-
"disabled":
|
568
|
+
"disabled": true,
|
569
569
|
"document": "识别模式,该参数已废弃",
|
570
|
-
"example": "
|
570
|
+
"example": "default",
|
571
571
|
"member": "string",
|
572
572
|
"name": "Mode",
|
573
573
|
"required": false,
|
574
574
|
"type": "string"
|
575
575
|
},
|
576
576
|
{
|
577
|
-
"disabled":
|
577
|
+
"disabled": true,
|
578
578
|
"document": "该参数已废弃",
|
579
579
|
"example": "0",
|
580
580
|
"member": "int64",
|
@@ -594,7 +594,7 @@
|
|
594
594
|
"example": "sid-1516105689129",
|
595
595
|
"member": "string",
|
596
596
|
"name": "SessionUuid",
|
597
|
-
"
|
597
|
+
"output_required": true,
|
598
598
|
"type": "string",
|
599
599
|
"value_allowed_null": false
|
600
600
|
},
|
@@ -604,7 +604,7 @@
|
|
604
604
|
"example": "0",
|
605
605
|
"member": "int64",
|
606
606
|
"name": "RecognizeStatus",
|
607
|
-
"
|
607
|
+
"output_required": true,
|
608
608
|
"type": "int",
|
609
609
|
"value_allowed_null": false
|
610
610
|
},
|
@@ -614,7 +614,7 @@
|
|
614
614
|
"example": "你好。",
|
615
615
|
"member": "string",
|
616
616
|
"name": "SourceText",
|
617
|
-
"
|
617
|
+
"output_required": true,
|
618
618
|
"type": "string",
|
619
619
|
"value_allowed_null": false
|
620
620
|
},
|
@@ -624,7 +624,7 @@
|
|
624
624
|
"example": "Hello.",
|
625
625
|
"member": "string",
|
626
626
|
"name": "TargetText",
|
627
|
-
"
|
627
|
+
"output_required": true,
|
628
628
|
"type": "string",
|
629
629
|
"value_allowed_null": false
|
630
630
|
},
|
@@ -634,7 +634,7 @@
|
|
634
634
|
"example": "0",
|
635
635
|
"member": "int64",
|
636
636
|
"name": "Seq",
|
637
|
-
"
|
637
|
+
"output_required": true,
|
638
638
|
"type": "int",
|
639
639
|
"value_allowed_null": false
|
640
640
|
},
|
@@ -644,7 +644,7 @@
|
|
644
644
|
"example": "zh",
|
645
645
|
"member": "string",
|
646
646
|
"name": "Source",
|
647
|
-
"
|
647
|
+
"output_required": true,
|
648
648
|
"type": "string",
|
649
649
|
"value_allowed_null": false
|
650
650
|
},
|
@@ -654,7 +654,7 @@
|
|
654
654
|
"example": "en",
|
655
655
|
"member": "string",
|
656
656
|
"name": "Target",
|
657
|
-
"
|
657
|
+
"output_required": true,
|
658
658
|
"type": "string",
|
659
659
|
"value_allowed_null": false
|
660
660
|
},
|
@@ -664,7 +664,7 @@
|
|
664
664
|
"example": "0",
|
665
665
|
"member": "int64",
|
666
666
|
"name": "VadSeq",
|
667
|
-
"
|
667
|
+
"output_required": true,
|
668
668
|
"type": "int",
|
669
669
|
"value_allowed_null": false
|
670
670
|
},
|
@@ -121,6 +121,58 @@ def doDescribeRoomInfo(args, parsed_globals):
|
|
121
121
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
122
122
|
|
123
123
|
|
124
|
+
def doStopAITranscription(args, parsed_globals):
|
125
|
+
g_param = parse_global_arg(parsed_globals)
|
126
|
+
|
127
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
128
|
+
cred = credential.CVMRoleCredential()
|
129
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
130
|
+
cred = credential.STSAssumeRoleCredential(
|
131
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
132
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
133
|
+
)
|
134
|
+
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):
|
135
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
136
|
+
else:
|
137
|
+
cred = credential.Credential(
|
138
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
139
|
+
)
|
140
|
+
http_profile = HttpProfile(
|
141
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
142
|
+
reqMethod="POST",
|
143
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
144
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
145
|
+
)
|
146
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
147
|
+
if g_param[OptionsDefine.Language]:
|
148
|
+
profile.language = g_param[OptionsDefine.Language]
|
149
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
150
|
+
client = mod.TrtcClient(cred, g_param[OptionsDefine.Region], profile)
|
151
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
152
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
153
|
+
model = models.StopAITranscriptionRequest()
|
154
|
+
model.from_json_string(json.dumps(args))
|
155
|
+
start_time = time.time()
|
156
|
+
while True:
|
157
|
+
rsp = client.StopAITranscription(model)
|
158
|
+
result = rsp.to_json_string()
|
159
|
+
try:
|
160
|
+
json_obj = json.loads(result)
|
161
|
+
except TypeError as e:
|
162
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
163
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
164
|
+
break
|
165
|
+
cur_time = time.time()
|
166
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
167
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
168
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
169
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
170
|
+
else:
|
171
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
172
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
173
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
174
|
+
|
175
|
+
|
124
176
|
def doDescribeTrtcUsage(args, parsed_globals):
|
125
177
|
g_param = parse_global_arg(parsed_globals)
|
126
178
|
|
@@ -1109,6 +1161,58 @@ def doStartMCUMixTranscode(args, parsed_globals):
|
|
1109
1161
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1110
1162
|
|
1111
1163
|
|
1164
|
+
def doStartAITranscription(args, parsed_globals):
|
1165
|
+
g_param = parse_global_arg(parsed_globals)
|
1166
|
+
|
1167
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1168
|
+
cred = credential.CVMRoleCredential()
|
1169
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1170
|
+
cred = credential.STSAssumeRoleCredential(
|
1171
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1172
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1173
|
+
)
|
1174
|
+
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):
|
1175
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1176
|
+
else:
|
1177
|
+
cred = credential.Credential(
|
1178
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1179
|
+
)
|
1180
|
+
http_profile = HttpProfile(
|
1181
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1182
|
+
reqMethod="POST",
|
1183
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1184
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1185
|
+
)
|
1186
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1187
|
+
if g_param[OptionsDefine.Language]:
|
1188
|
+
profile.language = g_param[OptionsDefine.Language]
|
1189
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1190
|
+
client = mod.TrtcClient(cred, g_param[OptionsDefine.Region], profile)
|
1191
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1192
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1193
|
+
model = models.StartAITranscriptionRequest()
|
1194
|
+
model.from_json_string(json.dumps(args))
|
1195
|
+
start_time = time.time()
|
1196
|
+
while True:
|
1197
|
+
rsp = client.StartAITranscription(model)
|
1198
|
+
result = rsp.to_json_string()
|
1199
|
+
try:
|
1200
|
+
json_obj = json.loads(result)
|
1201
|
+
except TypeError as e:
|
1202
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1203
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1204
|
+
break
|
1205
|
+
cur_time = time.time()
|
1206
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1207
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1208
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1209
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1210
|
+
else:
|
1211
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1212
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1213
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1214
|
+
|
1215
|
+
|
1112
1216
|
def doDescribeTRTCMarketScaleData(args, parsed_globals):
|
1113
1217
|
g_param = parse_global_arg(parsed_globals)
|
1114
1218
|
|
@@ -1525,6 +1629,58 @@ def doStopMCUMixTranscodeByStrRoomId(args, parsed_globals):
|
|
1525
1629
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1526
1630
|
|
1527
1631
|
|
1632
|
+
def doSummarizeTranscription(args, parsed_globals):
|
1633
|
+
g_param = parse_global_arg(parsed_globals)
|
1634
|
+
|
1635
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1636
|
+
cred = credential.CVMRoleCredential()
|
1637
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1638
|
+
cred = credential.STSAssumeRoleCredential(
|
1639
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1640
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1641
|
+
)
|
1642
|
+
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):
|
1643
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1644
|
+
else:
|
1645
|
+
cred = credential.Credential(
|
1646
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1647
|
+
)
|
1648
|
+
http_profile = HttpProfile(
|
1649
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1650
|
+
reqMethod="POST",
|
1651
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1652
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1653
|
+
)
|
1654
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1655
|
+
if g_param[OptionsDefine.Language]:
|
1656
|
+
profile.language = g_param[OptionsDefine.Language]
|
1657
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1658
|
+
client = mod.TrtcClient(cred, g_param[OptionsDefine.Region], profile)
|
1659
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1660
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1661
|
+
model = models.SummarizeTranscriptionRequest()
|
1662
|
+
model.from_json_string(json.dumps(args))
|
1663
|
+
start_time = time.time()
|
1664
|
+
while True:
|
1665
|
+
rsp = client.SummarizeTranscription(model)
|
1666
|
+
result = rsp.to_json_string()
|
1667
|
+
try:
|
1668
|
+
json_obj = json.loads(result)
|
1669
|
+
except TypeError as e:
|
1670
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1671
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1672
|
+
break
|
1673
|
+
cur_time = time.time()
|
1674
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1675
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1676
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1677
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1678
|
+
else:
|
1679
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1680
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1681
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1682
|
+
|
1683
|
+
|
1528
1684
|
def doStartMCUMixTranscodeByStrRoomId(args, parsed_globals):
|
1529
1685
|
g_param = parse_global_arg(parsed_globals)
|
1530
1686
|
|
@@ -1993,6 +2149,58 @@ def doModifyPicture(args, parsed_globals):
|
|
1993
2149
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1994
2150
|
|
1995
2151
|
|
2152
|
+
def doDescribeAITranscription(args, parsed_globals):
|
2153
|
+
g_param = parse_global_arg(parsed_globals)
|
2154
|
+
|
2155
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2156
|
+
cred = credential.CVMRoleCredential()
|
2157
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2158
|
+
cred = credential.STSAssumeRoleCredential(
|
2159
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2160
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2161
|
+
)
|
2162
|
+
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):
|
2163
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2164
|
+
else:
|
2165
|
+
cred = credential.Credential(
|
2166
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2167
|
+
)
|
2168
|
+
http_profile = HttpProfile(
|
2169
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2170
|
+
reqMethod="POST",
|
2171
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2172
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2173
|
+
)
|
2174
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2175
|
+
if g_param[OptionsDefine.Language]:
|
2176
|
+
profile.language = g_param[OptionsDefine.Language]
|
2177
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2178
|
+
client = mod.TrtcClient(cred, g_param[OptionsDefine.Region], profile)
|
2179
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2180
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2181
|
+
model = models.DescribeAITranscriptionRequest()
|
2182
|
+
model.from_json_string(json.dumps(args))
|
2183
|
+
start_time = time.time()
|
2184
|
+
while True:
|
2185
|
+
rsp = client.DescribeAITranscription(model)
|
2186
|
+
result = rsp.to_json_string()
|
2187
|
+
try:
|
2188
|
+
json_obj = json.loads(result)
|
2189
|
+
except TypeError as e:
|
2190
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2191
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2192
|
+
break
|
2193
|
+
cur_time = time.time()
|
2194
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2195
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2196
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2197
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2198
|
+
else:
|
2199
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2200
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2201
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2202
|
+
|
2203
|
+
|
1996
2204
|
def doUpdatePublishCdnStream(args, parsed_globals):
|
1997
2205
|
g_param = parse_global_arg(parsed_globals)
|
1998
2206
|
|
@@ -2422,6 +2630,7 @@ MODELS_MAP = {
|
|
2422
2630
|
ACTION_MAP = {
|
2423
2631
|
"DescribeTRTCMarketScaleMetricData": doDescribeTRTCMarketScaleMetricData,
|
2424
2632
|
"DescribeRoomInfo": doDescribeRoomInfo,
|
2633
|
+
"StopAITranscription": doStopAITranscription,
|
2425
2634
|
"DescribeTrtcUsage": doDescribeTrtcUsage,
|
2426
2635
|
"DescribeTRTCMarketQualityMetricData": doDescribeTRTCMarketQualityMetricData,
|
2427
2636
|
"DeleteCloudRecording": doDeleteCloudRecording,
|
@@ -2441,6 +2650,7 @@ ACTION_MAP = {
|
|
2441
2650
|
"DescribeUserEvent": doDescribeUserEvent,
|
2442
2651
|
"StartWebRecord": doStartWebRecord,
|
2443
2652
|
"StartMCUMixTranscode": doStartMCUMixTranscode,
|
2653
|
+
"StartAITranscription": doStartAITranscription,
|
2444
2654
|
"DescribeTRTCMarketScaleData": doDescribeTRTCMarketScaleData,
|
2445
2655
|
"StopWebRecord": doStopWebRecord,
|
2446
2656
|
"CreateCloudRecording": doCreateCloudRecording,
|
@@ -2449,6 +2659,7 @@ ACTION_MAP = {
|
|
2449
2659
|
"DescribeUserInfo": doDescribeUserInfo,
|
2450
2660
|
"DescribeTrtcMcuTranscodeTime": doDescribeTrtcMcuTranscodeTime,
|
2451
2661
|
"StopMCUMixTranscodeByStrRoomId": doStopMCUMixTranscodeByStrRoomId,
|
2662
|
+
"SummarizeTranscription": doSummarizeTranscription,
|
2452
2663
|
"StartMCUMixTranscodeByStrRoomId": doStartMCUMixTranscodeByStrRoomId,
|
2453
2664
|
"RemoveUserByStrRoomId": doRemoveUserByStrRoomId,
|
2454
2665
|
"DescribeMixTranscodingUsage": doDescribeMixTranscodingUsage,
|
@@ -2458,6 +2669,7 @@ ACTION_MAP = {
|
|
2458
2669
|
"DismissRoomByStrRoomId": doDismissRoomByStrRoomId,
|
2459
2670
|
"DescribeTrtcRoomUsage": doDescribeTrtcRoomUsage,
|
2460
2671
|
"ModifyPicture": doModifyPicture,
|
2672
|
+
"DescribeAITranscription": doDescribeAITranscription,
|
2461
2673
|
"UpdatePublishCdnStream": doUpdatePublishCdnStream,
|
2462
2674
|
"DescribeTRTCRealTimeQualityData": doDescribeTRTCRealTimeQualityData,
|
2463
2675
|
"DescribeWebRecord": doDescribeWebRecord,
|