tencentcloud-sdk-python-trtc 3.0.1213__py2.py3-none-any.whl → 3.0.1221__py2.py3-none-any.whl

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.

Potentially problematic release.


This version of tencentcloud-sdk-python-trtc might be problematic. Click here for more details.

tencentcloud/__init__.py CHANGED
@@ -14,4 +14,4 @@
14
14
  # limitations under the License.
15
15
 
16
16
 
17
- __version__ = '3.0.1213'
17
+ __version__ = '3.0.1221'
@@ -11106,6 +11106,124 @@ class TrtcUsage(AbstractModel):
11106
11106
 
11107
11107
 
11108
11108
 
11109
+ class UpdateAIConversationRequest(AbstractModel):
11110
+ """UpdateAIConversation请求参数结构体
11111
+
11112
+ """
11113
+
11114
+ def __init__(self):
11115
+ r"""
11116
+ :param _TaskId: 唯一标识一个任务
11117
+ :type TaskId: str
11118
+ :param _WelcomeMessage: 不填写则不进行更新,机器人的欢迎语
11119
+ :type WelcomeMessage: str
11120
+ :param _InterruptMode: 不填写则不进行更新。智能打断模式,0表示服务端自动打断,1表示服务端不打断,由端上发送打断信令进行打断
11121
+ :type InterruptMode: int
11122
+ :param _InterruptSpeechDuration: 不填写则不进行更新。InterruptMode为0时使用,单位为毫秒,默认为500ms。表示服务端检测到持续InterruptSpeechDuration毫秒的人声则进行打断
11123
+ :type InterruptSpeechDuration: int
11124
+ :param _LLMConfig: 不填写则不进行更新,LLM配置,详情见StartAIConversation接口
11125
+ :type LLMConfig: str
11126
+ :param _TTSConfig: 不填写则不进行更新,TTS配置,详情见StartAIConversation接口
11127
+ :type TTSConfig: str
11128
+ """
11129
+ self._TaskId = None
11130
+ self._WelcomeMessage = None
11131
+ self._InterruptMode = None
11132
+ self._InterruptSpeechDuration = None
11133
+ self._LLMConfig = None
11134
+ self._TTSConfig = None
11135
+
11136
+ @property
11137
+ def TaskId(self):
11138
+ return self._TaskId
11139
+
11140
+ @TaskId.setter
11141
+ def TaskId(self, TaskId):
11142
+ self._TaskId = TaskId
11143
+
11144
+ @property
11145
+ def WelcomeMessage(self):
11146
+ return self._WelcomeMessage
11147
+
11148
+ @WelcomeMessage.setter
11149
+ def WelcomeMessage(self, WelcomeMessage):
11150
+ self._WelcomeMessage = WelcomeMessage
11151
+
11152
+ @property
11153
+ def InterruptMode(self):
11154
+ return self._InterruptMode
11155
+
11156
+ @InterruptMode.setter
11157
+ def InterruptMode(self, InterruptMode):
11158
+ self._InterruptMode = InterruptMode
11159
+
11160
+ @property
11161
+ def InterruptSpeechDuration(self):
11162
+ return self._InterruptSpeechDuration
11163
+
11164
+ @InterruptSpeechDuration.setter
11165
+ def InterruptSpeechDuration(self, InterruptSpeechDuration):
11166
+ self._InterruptSpeechDuration = InterruptSpeechDuration
11167
+
11168
+ @property
11169
+ def LLMConfig(self):
11170
+ return self._LLMConfig
11171
+
11172
+ @LLMConfig.setter
11173
+ def LLMConfig(self, LLMConfig):
11174
+ self._LLMConfig = LLMConfig
11175
+
11176
+ @property
11177
+ def TTSConfig(self):
11178
+ return self._TTSConfig
11179
+
11180
+ @TTSConfig.setter
11181
+ def TTSConfig(self, TTSConfig):
11182
+ self._TTSConfig = TTSConfig
11183
+
11184
+
11185
+ def _deserialize(self, params):
11186
+ self._TaskId = params.get("TaskId")
11187
+ self._WelcomeMessage = params.get("WelcomeMessage")
11188
+ self._InterruptMode = params.get("InterruptMode")
11189
+ self._InterruptSpeechDuration = params.get("InterruptSpeechDuration")
11190
+ self._LLMConfig = params.get("LLMConfig")
11191
+ self._TTSConfig = params.get("TTSConfig")
11192
+ memeber_set = set(params.keys())
11193
+ for name, value in vars(self).items():
11194
+ property_name = name[1:]
11195
+ if property_name in memeber_set:
11196
+ memeber_set.remove(property_name)
11197
+ if len(memeber_set) > 0:
11198
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
11199
+
11200
+
11201
+
11202
+ class UpdateAIConversationResponse(AbstractModel):
11203
+ """UpdateAIConversation返回参数结构体
11204
+
11205
+ """
11206
+
11207
+ def __init__(self):
11208
+ r"""
11209
+ :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
11210
+ :type RequestId: str
11211
+ """
11212
+ self._RequestId = None
11213
+
11214
+ @property
11215
+ def RequestId(self):
11216
+ return self._RequestId
11217
+
11218
+ @RequestId.setter
11219
+ def RequestId(self, RequestId):
11220
+ self._RequestId = RequestId
11221
+
11222
+
11223
+ def _deserialize(self, params):
11224
+ self._RequestId = params.get("RequestId")
11225
+
11226
+
11109
11227
  class UpdatePublishCdnStreamRequest(AbstractModel):
11110
11228
  """UpdatePublishCdnStream请求参数结构体
11111
11229
 
@@ -11302,6 +11420,100 @@ class UpdatePublishCdnStreamResponse(AbstractModel):
11302
11420
  self._RequestId = params.get("RequestId")
11303
11421
 
11304
11422
 
11423
+ class UpdateStreamIngestRequest(AbstractModel):
11424
+ """UpdateStreamIngest请求参数结构体
11425
+
11426
+ """
11427
+
11428
+ def __init__(self):
11429
+ r"""
11430
+ :param _SdkAppId: TRTC的SDKAppId,和任务的房间所对应的SDKAppId相同
11431
+ :type SdkAppId: int
11432
+ :param _TaskId: 任务的唯一Id,在启动任务成功后会返回。
11433
+ :type TaskId: str
11434
+ :param _StreamUrl: 源流URL【必填】。
11435
+ :type StreamUrl: str
11436
+ """
11437
+ self._SdkAppId = None
11438
+ self._TaskId = None
11439
+ self._StreamUrl = None
11440
+
11441
+ @property
11442
+ def SdkAppId(self):
11443
+ return self._SdkAppId
11444
+
11445
+ @SdkAppId.setter
11446
+ def SdkAppId(self, SdkAppId):
11447
+ self._SdkAppId = SdkAppId
11448
+
11449
+ @property
11450
+ def TaskId(self):
11451
+ return self._TaskId
11452
+
11453
+ @TaskId.setter
11454
+ def TaskId(self, TaskId):
11455
+ self._TaskId = TaskId
11456
+
11457
+ @property
11458
+ def StreamUrl(self):
11459
+ return self._StreamUrl
11460
+
11461
+ @StreamUrl.setter
11462
+ def StreamUrl(self, StreamUrl):
11463
+ self._StreamUrl = StreamUrl
11464
+
11465
+
11466
+ def _deserialize(self, params):
11467
+ self._SdkAppId = params.get("SdkAppId")
11468
+ self._TaskId = params.get("TaskId")
11469
+ self._StreamUrl = params.get("StreamUrl")
11470
+ memeber_set = set(params.keys())
11471
+ for name, value in vars(self).items():
11472
+ property_name = name[1:]
11473
+ if property_name in memeber_set:
11474
+ memeber_set.remove(property_name)
11475
+ if len(memeber_set) > 0:
11476
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
11477
+
11478
+
11479
+
11480
+ class UpdateStreamIngestResponse(AbstractModel):
11481
+ """UpdateStreamIngest返回参数结构体
11482
+
11483
+ """
11484
+
11485
+ def __init__(self):
11486
+ r"""
11487
+ :param _Status: 任务的状态信息。InProgress:表示当前任务正在进行中。NotExist:表示当前任务不存在。示例值:InProgress
11488
+ :type Status: str
11489
+ :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
11490
+ :type RequestId: str
11491
+ """
11492
+ self._Status = None
11493
+ self._RequestId = None
11494
+
11495
+ @property
11496
+ def Status(self):
11497
+ return self._Status
11498
+
11499
+ @Status.setter
11500
+ def Status(self, Status):
11501
+ self._Status = Status
11502
+
11503
+ @property
11504
+ def RequestId(self):
11505
+ return self._RequestId
11506
+
11507
+ @RequestId.setter
11508
+ def RequestId(self, RequestId):
11509
+ self._RequestId = RequestId
11510
+
11511
+
11512
+ def _deserialize(self, params):
11513
+ self._Status = params.get("Status")
11514
+ self._RequestId = params.get("RequestId")
11515
+
11516
+
11305
11517
  class UserInformation(AbstractModel):
11306
11518
  """用户信息,包括用户进房时间,退房时间等
11307
11519
 
@@ -1040,45 +1040,12 @@ class TrtcClient(AbstractClient):
1040
1040
 
1041
1041
 
1042
1042
  def StartAITranscription(self, request):
1043
- """这个接口调用后,后台会启动转录机器人,实时进行语音识别并下发字幕和转录消息。
1043
+ """启动转录机器人,后台会通过机器人拉流进行实时进行语音识别并下发字幕和转录消息。
1044
1044
  转录机器人支持两种拉流方式,通过TranscriptionMode字段控制:
1045
1045
  - 拉取全房间的流。
1046
1046
  - 拉取特定用户的流。
1047
1047
 
1048
- 服务端通过TRTC的自定义消息实时下发字幕和会议记录,CmdId固定是1。客户端只需监听自定义消息的回调即可,比如[c++回调](https://cloud.tencent.com/document/product/647/79637#4cd82f4edb24992a15a25187089e1565)。其他客户端比如安卓、Web等同样可在该链接处找到。
1049
-
1050
- 服务端实时下发的消息是JSON字符串,实时字幕具体格式如下:
1051
- `{
1052
- "type": "subtitle",
1053
- "userid": "xxx",
1054
- "text": "xxx",
1055
- "start_time": "00:00:02",
1056
- "end_time": "00:00:05"
1057
- }`
1058
- 字段作用如下:
1059
- - type是subtitle,表示这是实时字幕消息。
1060
- - userid表示是哪个用户说的话。
1061
- - text是语音识别出的文本。
1062
- - start_time和end_time表示该字幕消息从任务开启后的开始和结束时间。
1063
-
1064
- 转录消息具体格式如下:
1065
- `{
1066
- "type": "transcription",
1067
- "userid": "xxx",
1068
- "text": "xxx",
1069
- "start_time": "00:00:02",
1070
- "end_time": "00:00:05"
1071
- }`
1072
- 字段作用如下:
1073
- - type是transcription,表示这是转录消息。
1074
- - 其余字段同实时字幕消息。
1075
-
1076
- 转录消息和实时字幕消息的区别是,转录消息是完整的一句话,实时字幕消息则是这一句话的中间阶段。
1077
- 假如有一句完整的话,“今天天气怎么样?”,那么服务的下发消息的顺序可能是这样:
1078
- - 字幕消息,“今天”
1079
- - 字幕消息,“今天天气”
1080
- - 字幕消息,“今天天气怎么样”
1081
- - 转录消息,“今天天气怎么样?”
1048
+ 服务端通过TRTC的自定义消息实时下发字幕以及转录消息,CmdId固定是1。客户端只需监听自定义消息的回调即可,比如[c++回调](https://cloud.tencent.com/document/product/647/79637#4cd82f4edb24992a15a25187089e1565)。其他客户端比如安卓、Web等同样可在该链接处找到。
1082
1049
 
1083
1050
  :param request: Request instance for StartAITranscription.
1084
1051
  :type request: :class:`tencentcloud.trtc.v20190722.models.StartAITranscriptionRequest`
@@ -1451,6 +1418,29 @@ class TrtcClient(AbstractClient):
1451
1418
  raise TencentCloudSDKException(type(e).__name__, str(e))
1452
1419
 
1453
1420
 
1421
+ def UpdateAIConversation(self, request):
1422
+ """更新AIConversation参数
1423
+
1424
+ :param request: Request instance for UpdateAIConversation.
1425
+ :type request: :class:`tencentcloud.trtc.v20190722.models.UpdateAIConversationRequest`
1426
+ :rtype: :class:`tencentcloud.trtc.v20190722.models.UpdateAIConversationResponse`
1427
+
1428
+ """
1429
+ try:
1430
+ params = request._serialize()
1431
+ headers = request.headers
1432
+ body = self.call("UpdateAIConversation", params, headers=headers)
1433
+ response = json.loads(body)
1434
+ model = models.UpdateAIConversationResponse()
1435
+ model._deserialize(response["Response"])
1436
+ return model
1437
+ except Exception as e:
1438
+ if isinstance(e, TencentCloudSDKException):
1439
+ raise
1440
+ else:
1441
+ raise TencentCloudSDKException(type(e).__name__, str(e))
1442
+
1443
+
1454
1444
  def UpdatePublishCdnStream(self, request):
1455
1445
  """接口说明:
1456
1446
  成功发起混流转推后,可以使用此接口来更新任务。仅在任务进行时有效,任务退出后更新将会返回错误。更新操作为增量更新模式。
@@ -1469,6 +1459,29 @@ class TrtcClient(AbstractClient):
1469
1459
  model = models.UpdatePublishCdnStreamResponse()
1470
1460
  model._deserialize(response["Response"])
1471
1461
  return model
1462
+ except Exception as e:
1463
+ if isinstance(e, TencentCloudSDKException):
1464
+ raise
1465
+ else:
1466
+ raise TencentCloudSDKException(type(e).__name__, str(e))
1467
+
1468
+
1469
+ def UpdateStreamIngest(self, request):
1470
+ """更新输入在线媒体流任务的StreamUrl
1471
+
1472
+ :param request: Request instance for UpdateStreamIngest.
1473
+ :type request: :class:`tencentcloud.trtc.v20190722.models.UpdateStreamIngestRequest`
1474
+ :rtype: :class:`tencentcloud.trtc.v20190722.models.UpdateStreamIngestResponse`
1475
+
1476
+ """
1477
+ try:
1478
+ params = request._serialize()
1479
+ headers = request.headers
1480
+ body = self.call("UpdateStreamIngest", params, headers=headers)
1481
+ response = json.loads(body)
1482
+ model = models.UpdateStreamIngestResponse()
1483
+ model._deserialize(response["Response"])
1484
+ return model
1472
1485
  except Exception as e:
1473
1486
  if isinstance(e, TencentCloudSDKException):
1474
1487
  raise
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tencentcloud-sdk-python-trtc
3
- Version: 3.0.1213
3
+ Version: 3.0.1221
4
4
  Summary: Tencent Cloud Trtc SDK for Python
5
5
  Home-page: https://github.com/TencentCloud/tencentcloud-sdk-python
6
6
  Author: Tencent Cloud
@@ -15,7 +15,7 @@ Classifier: Programming Language :: Python :: 2.7
15
15
  Classifier: Programming Language :: Python :: 3
16
16
  Classifier: Programming Language :: Python :: 3.6
17
17
  Classifier: Programming Language :: Python :: 3.7
18
- Requires-Dist: tencentcloud-sdk-python-common (==3.0.1213)
18
+ Requires-Dist: tencentcloud-sdk-python-common (==3.0.1221)
19
19
 
20
20
  ============================
21
21
  Tencent Cloud SDK for Python
@@ -0,0 +1,10 @@
1
+ tencentcloud/__init__.py,sha256=3kmUZqaWoks9o3bp-2aLReDZK4k_KkpvqHjkGXFLLG8,631
2
+ tencentcloud/trtc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ tencentcloud/trtc/v20190722/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ tencentcloud/trtc/v20190722/errorcodes.py,sha256=WNu9Hx8kn4lpbc342xXM1lw4uTQIx2JCvZchRlUXBL8,10987
5
+ tencentcloud/trtc/v20190722/models.py,sha256=u0n5Wjl8Ax2vvKoCG1TsSAbJccaBfY1SB4zBNI-TbfI,399772
6
+ tencentcloud/trtc/v20190722/trtc_client.py,sha256=sTzamtT7sp-ul08Ekv4xEa9sWm03AEDqQMcioZX4LtE,78132
7
+ tencentcloud_sdk_python_trtc-3.0.1221.dist-info/METADATA,sha256=X2zJYI8FyUa1d2jCSsxUME33damisuc6Nxa6uX3VBwQ,1497
8
+ tencentcloud_sdk_python_trtc-3.0.1221.dist-info/WHEEL,sha256=z9j0xAa_JmUKMpmz72K0ZGALSM_n-wQVmGbleXx2VHg,110
9
+ tencentcloud_sdk_python_trtc-3.0.1221.dist-info/top_level.txt,sha256=g-8OyzoqI6O6LiS85zkeNzhB-osEnRIPZMdyRd_0eL0,13
10
+ tencentcloud_sdk_python_trtc-3.0.1221.dist-info/RECORD,,
@@ -1,10 +0,0 @@
1
- tencentcloud/__init__.py,sha256=2AYFqbDXej17bBm-_8WUpS2F0epsBVKk36zeEZLLdF0,631
2
- tencentcloud/trtc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- tencentcloud/trtc/v20190722/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- tencentcloud/trtc/v20190722/errorcodes.py,sha256=WNu9Hx8kn4lpbc342xXM1lw4uTQIx2JCvZchRlUXBL8,10987
5
- tencentcloud/trtc/v20190722/models.py,sha256=BxRhIt6tCdG7EVXwMydSHviPu_M85CZtWDZY-r-sAe0,393251
6
- tencentcloud/trtc/v20190722/trtc_client.py,sha256=1qXvD_oecbj3wr_LRHO9yscDsRFAnuB85TV0hbMFFTo,77719
7
- tencentcloud_sdk_python_trtc-3.0.1213.dist-info/METADATA,sha256=1KOAnZhs3UUZyaEcL_2lLWCt98lNx4xEIgH0c74kq1s,1497
8
- tencentcloud_sdk_python_trtc-3.0.1213.dist-info/WHEEL,sha256=z9j0xAa_JmUKMpmz72K0ZGALSM_n-wQVmGbleXx2VHg,110
9
- tencentcloud_sdk_python_trtc-3.0.1213.dist-info/top_level.txt,sha256=g-8OyzoqI6O6LiS85zkeNzhB-osEnRIPZMdyRd_0eL0,13
10
- tencentcloud_sdk_python_trtc-3.0.1213.dist-info/RECORD,,