tencentcloud-sdk-python-trtc 3.0.1205__py2.py3-none-any.whl → 3.0.1242__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 +1 -1
- tencentcloud/trtc/v20190722/errorcodes.py +3 -0
- tencentcloud/trtc/v20190722/models.py +356 -52
- tencentcloud/trtc/v20190722/trtc_client.py +51 -39
- {tencentcloud_sdk_python_trtc-3.0.1205.dist-info → tencentcloud_sdk_python_trtc-3.0.1242.dist-info}/METADATA +2 -2
- tencentcloud_sdk_python_trtc-3.0.1242.dist-info/RECORD +10 -0
- tencentcloud_sdk_python_trtc-3.0.1205.dist-info/RECORD +0 -10
- {tencentcloud_sdk_python_trtc-3.0.1205.dist-info → tencentcloud_sdk_python_trtc-3.0.1242.dist-info}/WHEEL +0 -0
- {tencentcloud_sdk_python_trtc-3.0.1205.dist-info → tencentcloud_sdk_python_trtc-3.0.1242.dist-info}/top_level.txt +0 -0
tencentcloud/__init__.py
CHANGED
|
@@ -206,6 +206,9 @@ INVALIDPARAMETER_STRROOMID = 'InvalidParameter.StrRoomId'
|
|
|
206
206
|
# StreamId参数错误。
|
|
207
207
|
INVALIDPARAMETER_STREAMID = 'InvalidParameter.StreamId'
|
|
208
208
|
|
|
209
|
+
# StreamUrl参数校验失败
|
|
210
|
+
INVALIDPARAMETER_STREAMURL = 'InvalidParameter.StreamUrl'
|
|
211
|
+
|
|
209
212
|
# TaskId 参数错误。
|
|
210
213
|
INVALIDPARAMETER_TASKID = 'InvalidParameter.TaskId'
|
|
211
214
|
|
|
@@ -166,14 +166,26 @@ class AgentConfig(AbstractModel):
|
|
|
166
166
|
:param _TargetUserId: 机器人拉流的UserId, 填写后,机器人会拉取该UserId的流进行实时处理
|
|
167
167
|
注意:此字段可能返回 null,表示取不到有效值。
|
|
168
168
|
:type TargetUserId: str
|
|
169
|
-
:param _MaxIdleTime:
|
|
169
|
+
:param _MaxIdleTime: 房间内超过MaxIdleTime 没有推流,后台自动关闭任务,默认值是60s。
|
|
170
170
|
注意:此字段可能返回 null,表示取不到有效值。
|
|
171
171
|
:type MaxIdleTime: int
|
|
172
|
+
:param _WelcomeMessage: 机器人的欢迎语
|
|
173
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
|
174
|
+
:type WelcomeMessage: str
|
|
175
|
+
:param _InterruptMode: 智能打断模式,默认为0,0表示服务端自动打断,1表示服务端不打断,由端上发送打断信令进行打断
|
|
176
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
|
177
|
+
:type InterruptMode: int
|
|
178
|
+
:param _InterruptSpeechDuration: InterruptMode为0时使用,单位为毫秒,默认为500ms。表示服务端检测到持续InterruptSpeechDuration毫秒的人声则进行打断。
|
|
179
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
|
180
|
+
:type InterruptSpeechDuration: int
|
|
172
181
|
"""
|
|
173
182
|
self._UserId = None
|
|
174
183
|
self._UserSig = None
|
|
175
184
|
self._TargetUserId = None
|
|
176
185
|
self._MaxIdleTime = None
|
|
186
|
+
self._WelcomeMessage = None
|
|
187
|
+
self._InterruptMode = None
|
|
188
|
+
self._InterruptSpeechDuration = None
|
|
177
189
|
|
|
178
190
|
@property
|
|
179
191
|
def UserId(self):
|
|
@@ -207,12 +219,39 @@ class AgentConfig(AbstractModel):
|
|
|
207
219
|
def MaxIdleTime(self, MaxIdleTime):
|
|
208
220
|
self._MaxIdleTime = MaxIdleTime
|
|
209
221
|
|
|
222
|
+
@property
|
|
223
|
+
def WelcomeMessage(self):
|
|
224
|
+
return self._WelcomeMessage
|
|
225
|
+
|
|
226
|
+
@WelcomeMessage.setter
|
|
227
|
+
def WelcomeMessage(self, WelcomeMessage):
|
|
228
|
+
self._WelcomeMessage = WelcomeMessage
|
|
229
|
+
|
|
230
|
+
@property
|
|
231
|
+
def InterruptMode(self):
|
|
232
|
+
return self._InterruptMode
|
|
233
|
+
|
|
234
|
+
@InterruptMode.setter
|
|
235
|
+
def InterruptMode(self, InterruptMode):
|
|
236
|
+
self._InterruptMode = InterruptMode
|
|
237
|
+
|
|
238
|
+
@property
|
|
239
|
+
def InterruptSpeechDuration(self):
|
|
240
|
+
return self._InterruptSpeechDuration
|
|
241
|
+
|
|
242
|
+
@InterruptSpeechDuration.setter
|
|
243
|
+
def InterruptSpeechDuration(self, InterruptSpeechDuration):
|
|
244
|
+
self._InterruptSpeechDuration = InterruptSpeechDuration
|
|
245
|
+
|
|
210
246
|
|
|
211
247
|
def _deserialize(self, params):
|
|
212
248
|
self._UserId = params.get("UserId")
|
|
213
249
|
self._UserSig = params.get("UserSig")
|
|
214
250
|
self._TargetUserId = params.get("TargetUserId")
|
|
215
251
|
self._MaxIdleTime = params.get("MaxIdleTime")
|
|
252
|
+
self._WelcomeMessage = params.get("WelcomeMessage")
|
|
253
|
+
self._InterruptMode = params.get("InterruptMode")
|
|
254
|
+
self._InterruptSpeechDuration = params.get("InterruptSpeechDuration")
|
|
216
255
|
memeber_set = set(params.keys())
|
|
217
256
|
for name, value in vars(self).items():
|
|
218
257
|
property_name = name[1:]
|
|
@@ -1273,7 +1312,7 @@ class DescribeAIConversationResponse(AbstractModel):
|
|
|
1273
1312
|
:type StartTime: str
|
|
1274
1313
|
:param _Status: 任务状态。有4个值:1、Idle表示任务未开始2、Preparing表示任务准备中3、InProgress表示任务正在运行4、Stopped表示任务已停止,正在清理资源中
|
|
1275
1314
|
:type Status: str
|
|
1276
|
-
:param _TaskId:
|
|
1315
|
+
:param _TaskId: 任务的唯一标识,在启动任务时生成
|
|
1277
1316
|
:type TaskId: str
|
|
1278
1317
|
:param _SessionId: 开启对话任务时填写的SessionId,如果没写则不返回。
|
|
1279
1318
|
:type SessionId: str
|
|
@@ -7553,59 +7592,43 @@ class RecognizeConfig(AbstractModel):
|
|
|
7553
7592
|
|
|
7554
7593
|
def __init__(self):
|
|
7555
7594
|
r"""
|
|
7556
|
-
:param _Language:
|
|
7557
|
-
|
|
7558
|
-
|
|
7559
|
-
|
|
7560
|
-
|
|
7561
|
-
|
|
7562
|
-
|
|
7563
|
-
|
|
7564
|
-
|
|
7565
|
-
|
|
7566
|
-
|
|
7567
|
-
|
|
7568
|
-
|
|
7569
|
-
|
|
7570
|
-
|
|
7571
|
-
|
|
7572
|
-
|
|
7573
|
-
|
|
7574
|
-
|
|
7575
|
-
|
|
7576
|
-
|
|
7595
|
+
:param _Language: 语音转文字支持识别的语言,默认是"zh" 中文
|
|
7596
|
+
目前全量支持的语言如下,等号左面是语言英文名,右面是Language字段需要填写的值,该值遵循[ISO639](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes):
|
|
7597
|
+
可通过购买「语音转文本时长包」解锁或领取包月套餐体验版解锁此功能。
|
|
7598
|
+
|
|
7599
|
+
语音转文本支持语言类型如下:
|
|
7600
|
+
- Chinese = "zh" # 中文
|
|
7601
|
+
- Chinese_TW = "zh-TW" # 中国台湾
|
|
7602
|
+
- English = "en" # 英语
|
|
7603
|
+
- Chinese_YUE = "zh-yue" # 中国粤语
|
|
7604
|
+
- Chinese_DIALECT = "zh-dialect" # 中国方言
|
|
7605
|
+
- English = "en" # 英语
|
|
7606
|
+
- Vietnamese = "vi" # 越南语
|
|
7607
|
+
- Japanese = "ja" # 日语
|
|
7608
|
+
- Korean = "ko" # 韩语
|
|
7609
|
+
- Indonesia = "id" # 印度尼西亚语
|
|
7610
|
+
- Thai = "th" # 泰语
|
|
7611
|
+
- Portuguese = "pt" # 葡萄牙语
|
|
7612
|
+
- Turkish = "tr" # 土耳其语
|
|
7613
|
+
- Arabic = "ar" # 阿拉伯语
|
|
7614
|
+
- Spanish = "es" # 西班牙语
|
|
7615
|
+
- Hindi = "hi" # 印地语
|
|
7616
|
+
- French = "fr" # 法语
|
|
7617
|
+
- Malay = "ms" # 马来语
|
|
7618
|
+
- Filipino = "fil" # 菲律宾语
|
|
7619
|
+
- German = "de" # 德语
|
|
7620
|
+
- Italian = "it" # 意大利语
|
|
7621
|
+
- Russian = "ru" # 俄语
|
|
7577
7622
|
|
|
7578
7623
|
注意:
|
|
7579
7624
|
如果缺少满足您需求的语言,请联系我们技术人员。
|
|
7580
7625
|
:type Language: str
|
|
7581
|
-
:param _AlternativeLanguage:
|
|
7626
|
+
:param _AlternativeLanguage: 发起模糊识别额外可能替代语言类型,最多填写3种语言类型。
|
|
7627
|
+
注:Language指定为"zh-dialect" # 中国方言 时,不支持模糊识别,该字段无效
|
|
7582
7628
|
:type AlternativeLanguage: list of str
|
|
7583
|
-
:param _Model:
|
|
7629
|
+
:param _Model: 目前已不支持
|
|
7584
7630
|
:type Model: str
|
|
7585
|
-
:param _TranslationLanguage:
|
|
7586
|
-
目前全量支持的语言如下,等号左面是语言英文名,右面是Language字段需要填写的值,该值遵循[ISO639](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes):
|
|
7587
|
-
Chinese = "zh"
|
|
7588
|
-
Chinese_TW = "zh-TW"
|
|
7589
|
-
English = "en"
|
|
7590
|
-
Vietnamese = "vi"
|
|
7591
|
-
Japanese = "ja"
|
|
7592
|
-
Korean = "ko"
|
|
7593
|
-
Indonesia = "id"
|
|
7594
|
-
Thai = "th"
|
|
7595
|
-
Portuguese = "pt"
|
|
7596
|
-
Turkish = "tr"
|
|
7597
|
-
Arabic = "ar"
|
|
7598
|
-
Spanish = "es"
|
|
7599
|
-
Hindi = "hi"
|
|
7600
|
-
French = "fr"
|
|
7601
|
-
Malay = "ms"
|
|
7602
|
-
Filipino = "fil"
|
|
7603
|
-
German = "de"
|
|
7604
|
-
Italian = "it"
|
|
7605
|
-
Russian = "ru"
|
|
7606
|
-
|
|
7607
|
-
注意:
|
|
7608
|
-
如果缺少满足您需求的语言,请联系我们技术人员。
|
|
7631
|
+
:param _TranslationLanguage: 目前已不支持
|
|
7609
7632
|
:type TranslationLanguage: str
|
|
7610
7633
|
"""
|
|
7611
7634
|
self._Language = None
|
|
@@ -7643,10 +7666,14 @@ Russian = "ru"
|
|
|
7643
7666
|
|
|
7644
7667
|
@property
|
|
7645
7668
|
def TranslationLanguage(self):
|
|
7669
|
+
warnings.warn("parameter `TranslationLanguage` is deprecated", DeprecationWarning)
|
|
7670
|
+
|
|
7646
7671
|
return self._TranslationLanguage
|
|
7647
7672
|
|
|
7648
7673
|
@TranslationLanguage.setter
|
|
7649
7674
|
def TranslationLanguage(self, TranslationLanguage):
|
|
7675
|
+
warnings.warn("parameter `TranslationLanguage` is deprecated", DeprecationWarning)
|
|
7676
|
+
|
|
7650
7677
|
self._TranslationLanguage = TranslationLanguage
|
|
7651
7678
|
|
|
7652
7679
|
|
|
@@ -8191,7 +8218,7 @@ class STTConfig(AbstractModel):
|
|
|
8191
8218
|
4. English = "en" # 英语
|
|
8192
8219
|
5. Vietnamese = "vi" # 越南语
|
|
8193
8220
|
6. Japanese = "ja" # 日语
|
|
8194
|
-
7. Korean = "ko" #
|
|
8221
|
+
7. Korean = "ko" # 韩语
|
|
8195
8222
|
8. Indonesia = "id" # 印度尼西亚语
|
|
8196
8223
|
9. Thai = "th" # 泰语
|
|
8197
8224
|
10. Portuguese = "pt" # 葡萄牙语
|
|
@@ -8210,13 +8237,18 @@ class STTConfig(AbstractModel):
|
|
|
8210
8237
|
如果缺少满足您需求的语言,请联系我们技术人员。
|
|
8211
8238
|
注意:此字段可能返回 null,表示取不到有效值。
|
|
8212
8239
|
:type Language: str
|
|
8213
|
-
:param _AlternativeLanguage:
|
|
8240
|
+
:param _AlternativeLanguage: 发起模糊识别额外可能替代语言类型,最多填写3种语言类型,
|
|
8241
|
+
注:Language指定为"zh-dialect" # 中国方言 时,不支持模糊识别,该字段无效
|
|
8214
8242
|
|
|
8215
8243
|
注意:此字段可能返回 null,表示取不到有效值。
|
|
8216
8244
|
:type AlternativeLanguage: list of str
|
|
8245
|
+
:param _VadSilenceTime: 语音识别vad的时间,范围为240-2000,默认为1000,单位为ms。更小的值会让语音识别分句更快。
|
|
8246
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
|
8247
|
+
:type VadSilenceTime: int
|
|
8217
8248
|
"""
|
|
8218
8249
|
self._Language = None
|
|
8219
8250
|
self._AlternativeLanguage = None
|
|
8251
|
+
self._VadSilenceTime = None
|
|
8220
8252
|
|
|
8221
8253
|
@property
|
|
8222
8254
|
def Language(self):
|
|
@@ -8234,10 +8266,19 @@ class STTConfig(AbstractModel):
|
|
|
8234
8266
|
def AlternativeLanguage(self, AlternativeLanguage):
|
|
8235
8267
|
self._AlternativeLanguage = AlternativeLanguage
|
|
8236
8268
|
|
|
8269
|
+
@property
|
|
8270
|
+
def VadSilenceTime(self):
|
|
8271
|
+
return self._VadSilenceTime
|
|
8272
|
+
|
|
8273
|
+
@VadSilenceTime.setter
|
|
8274
|
+
def VadSilenceTime(self, VadSilenceTime):
|
|
8275
|
+
self._VadSilenceTime = VadSilenceTime
|
|
8276
|
+
|
|
8237
8277
|
|
|
8238
8278
|
def _deserialize(self, params):
|
|
8239
8279
|
self._Language = params.get("Language")
|
|
8240
8280
|
self._AlternativeLanguage = params.get("AlternativeLanguage")
|
|
8281
|
+
self._VadSilenceTime = params.get("VadSilenceTime")
|
|
8241
8282
|
memeber_set = set(params.keys())
|
|
8242
8283
|
for name, value in vars(self).items():
|
|
8243
8284
|
property_name = name[1:]
|
|
@@ -8574,9 +8615,12 @@ class ServerPushText(AbstractModel):
|
|
|
8574
8615
|
:type Text: str
|
|
8575
8616
|
:param _Interrupt: 是否允许该文本打断机器人说话
|
|
8576
8617
|
:type Interrupt: bool
|
|
8618
|
+
:param _StopAfterPlay: 播报完文本后,是否自动关闭对话任务
|
|
8619
|
+
:type StopAfterPlay: bool
|
|
8577
8620
|
"""
|
|
8578
8621
|
self._Text = None
|
|
8579
8622
|
self._Interrupt = None
|
|
8623
|
+
self._StopAfterPlay = None
|
|
8580
8624
|
|
|
8581
8625
|
@property
|
|
8582
8626
|
def Text(self):
|
|
@@ -8594,10 +8638,19 @@ class ServerPushText(AbstractModel):
|
|
|
8594
8638
|
def Interrupt(self, Interrupt):
|
|
8595
8639
|
self._Interrupt = Interrupt
|
|
8596
8640
|
|
|
8641
|
+
@property
|
|
8642
|
+
def StopAfterPlay(self):
|
|
8643
|
+
return self._StopAfterPlay
|
|
8644
|
+
|
|
8645
|
+
@StopAfterPlay.setter
|
|
8646
|
+
def StopAfterPlay(self, StopAfterPlay):
|
|
8647
|
+
self._StopAfterPlay = StopAfterPlay
|
|
8648
|
+
|
|
8597
8649
|
|
|
8598
8650
|
def _deserialize(self, params):
|
|
8599
8651
|
self._Text = params.get("Text")
|
|
8600
8652
|
self._Interrupt = params.get("Interrupt")
|
|
8653
|
+
self._StopAfterPlay = params.get("StopAfterPlay")
|
|
8601
8654
|
memeber_set = set(params.keys())
|
|
8602
8655
|
for name, value in vars(self).items():
|
|
8603
8656
|
property_name = name[1:]
|
|
@@ -8749,7 +8802,7 @@ class StartAIConversationRequest(AbstractModel):
|
|
|
8749
8802
|
:type RoomId: str
|
|
8750
8803
|
:param _AgentConfig: 机器人参数
|
|
8751
8804
|
:type AgentConfig: :class:`tencentcloud.trtc.v20190722.models.AgentConfig`
|
|
8752
|
-
:param _SessionId: 调用方传入的唯一Id
|
|
8805
|
+
:param _SessionId: 调用方传入的唯一Id,可用于客户侧防止重复发起任务以及可以通过该字段查询任务状态。
|
|
8753
8806
|
:type SessionId: str
|
|
8754
8807
|
:param _RoomIdType: TRTC房间号的类型,0代表数字房间号,1代表字符串房间号。不填默认是数字房间号。
|
|
8755
8808
|
:type RoomIdType: int
|
|
@@ -9530,6 +9583,15 @@ class StartStreamIngestRequest(AbstractModel):
|
|
|
9530
9583
|
:type SourceUrl: list of str
|
|
9531
9584
|
:param _SeekSecond: 指定视频从某个秒时间戳播放
|
|
9532
9585
|
:type SeekSecond: int
|
|
9586
|
+
:param _AutoPush: 开启自动旁路推流,请确认控制台已经开启该功能。
|
|
9587
|
+
:type AutoPush: bool
|
|
9588
|
+
:param _RepeatNum: 循环播放次数, 取值范围[-1, 1000], 默认1次。
|
|
9589
|
+
- 0 无效值
|
|
9590
|
+
- -1 循环播放, 需要主动调用停止接口或设置MaxDuration
|
|
9591
|
+
|
|
9592
|
+
:type RepeatNum: int
|
|
9593
|
+
:param _MaxDuration: 循环播放最大时长,仅支持RepeatNum设置-1时生效,取值范围[1, 10080],单位分钟。
|
|
9594
|
+
:type MaxDuration: int
|
|
9533
9595
|
"""
|
|
9534
9596
|
self._SdkAppId = None
|
|
9535
9597
|
self._RoomId = None
|
|
@@ -9542,6 +9604,9 @@ class StartStreamIngestRequest(AbstractModel):
|
|
|
9542
9604
|
self._AudioEncodeParams = None
|
|
9543
9605
|
self._SourceUrl = None
|
|
9544
9606
|
self._SeekSecond = None
|
|
9607
|
+
self._AutoPush = None
|
|
9608
|
+
self._RepeatNum = None
|
|
9609
|
+
self._MaxDuration = None
|
|
9545
9610
|
|
|
9546
9611
|
@property
|
|
9547
9612
|
def SdkAppId(self):
|
|
@@ -9643,6 +9708,30 @@ class StartStreamIngestRequest(AbstractModel):
|
|
|
9643
9708
|
def SeekSecond(self, SeekSecond):
|
|
9644
9709
|
self._SeekSecond = SeekSecond
|
|
9645
9710
|
|
|
9711
|
+
@property
|
|
9712
|
+
def AutoPush(self):
|
|
9713
|
+
return self._AutoPush
|
|
9714
|
+
|
|
9715
|
+
@AutoPush.setter
|
|
9716
|
+
def AutoPush(self, AutoPush):
|
|
9717
|
+
self._AutoPush = AutoPush
|
|
9718
|
+
|
|
9719
|
+
@property
|
|
9720
|
+
def RepeatNum(self):
|
|
9721
|
+
return self._RepeatNum
|
|
9722
|
+
|
|
9723
|
+
@RepeatNum.setter
|
|
9724
|
+
def RepeatNum(self, RepeatNum):
|
|
9725
|
+
self._RepeatNum = RepeatNum
|
|
9726
|
+
|
|
9727
|
+
@property
|
|
9728
|
+
def MaxDuration(self):
|
|
9729
|
+
return self._MaxDuration
|
|
9730
|
+
|
|
9731
|
+
@MaxDuration.setter
|
|
9732
|
+
def MaxDuration(self, MaxDuration):
|
|
9733
|
+
self._MaxDuration = MaxDuration
|
|
9734
|
+
|
|
9646
9735
|
|
|
9647
9736
|
def _deserialize(self, params):
|
|
9648
9737
|
self._SdkAppId = params.get("SdkAppId")
|
|
@@ -9660,6 +9749,9 @@ class StartStreamIngestRequest(AbstractModel):
|
|
|
9660
9749
|
self._AudioEncodeParams._deserialize(params.get("AudioEncodeParams"))
|
|
9661
9750
|
self._SourceUrl = params.get("SourceUrl")
|
|
9662
9751
|
self._SeekSecond = params.get("SeekSecond")
|
|
9752
|
+
self._AutoPush = params.get("AutoPush")
|
|
9753
|
+
self._RepeatNum = params.get("RepeatNum")
|
|
9754
|
+
self._MaxDuration = params.get("MaxDuration")
|
|
9663
9755
|
memeber_set = set(params.keys())
|
|
9664
9756
|
for name, value in vars(self).items():
|
|
9665
9757
|
property_name = name[1:]
|
|
@@ -11027,6 +11119,124 @@ class TrtcUsage(AbstractModel):
|
|
|
11027
11119
|
|
|
11028
11120
|
|
|
11029
11121
|
|
|
11122
|
+
class UpdateAIConversationRequest(AbstractModel):
|
|
11123
|
+
"""UpdateAIConversation请求参数结构体
|
|
11124
|
+
|
|
11125
|
+
"""
|
|
11126
|
+
|
|
11127
|
+
def __init__(self):
|
|
11128
|
+
r"""
|
|
11129
|
+
:param _TaskId: 唯一标识一个任务
|
|
11130
|
+
:type TaskId: str
|
|
11131
|
+
:param _WelcomeMessage: 不填写则不进行更新,机器人的欢迎语
|
|
11132
|
+
:type WelcomeMessage: str
|
|
11133
|
+
:param _InterruptMode: 不填写则不进行更新。智能打断模式,0表示服务端自动打断,1表示服务端不打断,由端上发送打断信令进行打断
|
|
11134
|
+
:type InterruptMode: int
|
|
11135
|
+
:param _InterruptSpeechDuration: 不填写则不进行更新。InterruptMode为0时使用,单位为毫秒,默认为500ms。表示服务端检测到持续InterruptSpeechDuration毫秒的人声则进行打断
|
|
11136
|
+
:type InterruptSpeechDuration: int
|
|
11137
|
+
:param _LLMConfig: 不填写则不进行更新,LLM配置,详情见StartAIConversation接口
|
|
11138
|
+
:type LLMConfig: str
|
|
11139
|
+
:param _TTSConfig: 不填写则不进行更新,TTS配置,详情见StartAIConversation接口
|
|
11140
|
+
:type TTSConfig: str
|
|
11141
|
+
"""
|
|
11142
|
+
self._TaskId = None
|
|
11143
|
+
self._WelcomeMessage = None
|
|
11144
|
+
self._InterruptMode = None
|
|
11145
|
+
self._InterruptSpeechDuration = None
|
|
11146
|
+
self._LLMConfig = None
|
|
11147
|
+
self._TTSConfig = None
|
|
11148
|
+
|
|
11149
|
+
@property
|
|
11150
|
+
def TaskId(self):
|
|
11151
|
+
return self._TaskId
|
|
11152
|
+
|
|
11153
|
+
@TaskId.setter
|
|
11154
|
+
def TaskId(self, TaskId):
|
|
11155
|
+
self._TaskId = TaskId
|
|
11156
|
+
|
|
11157
|
+
@property
|
|
11158
|
+
def WelcomeMessage(self):
|
|
11159
|
+
return self._WelcomeMessage
|
|
11160
|
+
|
|
11161
|
+
@WelcomeMessage.setter
|
|
11162
|
+
def WelcomeMessage(self, WelcomeMessage):
|
|
11163
|
+
self._WelcomeMessage = WelcomeMessage
|
|
11164
|
+
|
|
11165
|
+
@property
|
|
11166
|
+
def InterruptMode(self):
|
|
11167
|
+
return self._InterruptMode
|
|
11168
|
+
|
|
11169
|
+
@InterruptMode.setter
|
|
11170
|
+
def InterruptMode(self, InterruptMode):
|
|
11171
|
+
self._InterruptMode = InterruptMode
|
|
11172
|
+
|
|
11173
|
+
@property
|
|
11174
|
+
def InterruptSpeechDuration(self):
|
|
11175
|
+
return self._InterruptSpeechDuration
|
|
11176
|
+
|
|
11177
|
+
@InterruptSpeechDuration.setter
|
|
11178
|
+
def InterruptSpeechDuration(self, InterruptSpeechDuration):
|
|
11179
|
+
self._InterruptSpeechDuration = InterruptSpeechDuration
|
|
11180
|
+
|
|
11181
|
+
@property
|
|
11182
|
+
def LLMConfig(self):
|
|
11183
|
+
return self._LLMConfig
|
|
11184
|
+
|
|
11185
|
+
@LLMConfig.setter
|
|
11186
|
+
def LLMConfig(self, LLMConfig):
|
|
11187
|
+
self._LLMConfig = LLMConfig
|
|
11188
|
+
|
|
11189
|
+
@property
|
|
11190
|
+
def TTSConfig(self):
|
|
11191
|
+
return self._TTSConfig
|
|
11192
|
+
|
|
11193
|
+
@TTSConfig.setter
|
|
11194
|
+
def TTSConfig(self, TTSConfig):
|
|
11195
|
+
self._TTSConfig = TTSConfig
|
|
11196
|
+
|
|
11197
|
+
|
|
11198
|
+
def _deserialize(self, params):
|
|
11199
|
+
self._TaskId = params.get("TaskId")
|
|
11200
|
+
self._WelcomeMessage = params.get("WelcomeMessage")
|
|
11201
|
+
self._InterruptMode = params.get("InterruptMode")
|
|
11202
|
+
self._InterruptSpeechDuration = params.get("InterruptSpeechDuration")
|
|
11203
|
+
self._LLMConfig = params.get("LLMConfig")
|
|
11204
|
+
self._TTSConfig = params.get("TTSConfig")
|
|
11205
|
+
memeber_set = set(params.keys())
|
|
11206
|
+
for name, value in vars(self).items():
|
|
11207
|
+
property_name = name[1:]
|
|
11208
|
+
if property_name in memeber_set:
|
|
11209
|
+
memeber_set.remove(property_name)
|
|
11210
|
+
if len(memeber_set) > 0:
|
|
11211
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
|
11212
|
+
|
|
11213
|
+
|
|
11214
|
+
|
|
11215
|
+
class UpdateAIConversationResponse(AbstractModel):
|
|
11216
|
+
"""UpdateAIConversation返回参数结构体
|
|
11217
|
+
|
|
11218
|
+
"""
|
|
11219
|
+
|
|
11220
|
+
def __init__(self):
|
|
11221
|
+
r"""
|
|
11222
|
+
:param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
11223
|
+
:type RequestId: str
|
|
11224
|
+
"""
|
|
11225
|
+
self._RequestId = None
|
|
11226
|
+
|
|
11227
|
+
@property
|
|
11228
|
+
def RequestId(self):
|
|
11229
|
+
return self._RequestId
|
|
11230
|
+
|
|
11231
|
+
@RequestId.setter
|
|
11232
|
+
def RequestId(self, RequestId):
|
|
11233
|
+
self._RequestId = RequestId
|
|
11234
|
+
|
|
11235
|
+
|
|
11236
|
+
def _deserialize(self, params):
|
|
11237
|
+
self._RequestId = params.get("RequestId")
|
|
11238
|
+
|
|
11239
|
+
|
|
11030
11240
|
class UpdatePublishCdnStreamRequest(AbstractModel):
|
|
11031
11241
|
"""UpdatePublishCdnStream请求参数结构体
|
|
11032
11242
|
|
|
@@ -11223,6 +11433,100 @@ class UpdatePublishCdnStreamResponse(AbstractModel):
|
|
|
11223
11433
|
self._RequestId = params.get("RequestId")
|
|
11224
11434
|
|
|
11225
11435
|
|
|
11436
|
+
class UpdateStreamIngestRequest(AbstractModel):
|
|
11437
|
+
"""UpdateStreamIngest请求参数结构体
|
|
11438
|
+
|
|
11439
|
+
"""
|
|
11440
|
+
|
|
11441
|
+
def __init__(self):
|
|
11442
|
+
r"""
|
|
11443
|
+
:param _SdkAppId: TRTC的SDKAppId,和任务的房间所对应的SDKAppId相同
|
|
11444
|
+
:type SdkAppId: int
|
|
11445
|
+
:param _TaskId: 任务的唯一Id,在启动任务成功后会返回。
|
|
11446
|
+
:type TaskId: str
|
|
11447
|
+
:param _StreamUrl: 源流URL【必填】。
|
|
11448
|
+
:type StreamUrl: str
|
|
11449
|
+
"""
|
|
11450
|
+
self._SdkAppId = None
|
|
11451
|
+
self._TaskId = None
|
|
11452
|
+
self._StreamUrl = None
|
|
11453
|
+
|
|
11454
|
+
@property
|
|
11455
|
+
def SdkAppId(self):
|
|
11456
|
+
return self._SdkAppId
|
|
11457
|
+
|
|
11458
|
+
@SdkAppId.setter
|
|
11459
|
+
def SdkAppId(self, SdkAppId):
|
|
11460
|
+
self._SdkAppId = SdkAppId
|
|
11461
|
+
|
|
11462
|
+
@property
|
|
11463
|
+
def TaskId(self):
|
|
11464
|
+
return self._TaskId
|
|
11465
|
+
|
|
11466
|
+
@TaskId.setter
|
|
11467
|
+
def TaskId(self, TaskId):
|
|
11468
|
+
self._TaskId = TaskId
|
|
11469
|
+
|
|
11470
|
+
@property
|
|
11471
|
+
def StreamUrl(self):
|
|
11472
|
+
return self._StreamUrl
|
|
11473
|
+
|
|
11474
|
+
@StreamUrl.setter
|
|
11475
|
+
def StreamUrl(self, StreamUrl):
|
|
11476
|
+
self._StreamUrl = StreamUrl
|
|
11477
|
+
|
|
11478
|
+
|
|
11479
|
+
def _deserialize(self, params):
|
|
11480
|
+
self._SdkAppId = params.get("SdkAppId")
|
|
11481
|
+
self._TaskId = params.get("TaskId")
|
|
11482
|
+
self._StreamUrl = params.get("StreamUrl")
|
|
11483
|
+
memeber_set = set(params.keys())
|
|
11484
|
+
for name, value in vars(self).items():
|
|
11485
|
+
property_name = name[1:]
|
|
11486
|
+
if property_name in memeber_set:
|
|
11487
|
+
memeber_set.remove(property_name)
|
|
11488
|
+
if len(memeber_set) > 0:
|
|
11489
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
|
11490
|
+
|
|
11491
|
+
|
|
11492
|
+
|
|
11493
|
+
class UpdateStreamIngestResponse(AbstractModel):
|
|
11494
|
+
"""UpdateStreamIngest返回参数结构体
|
|
11495
|
+
|
|
11496
|
+
"""
|
|
11497
|
+
|
|
11498
|
+
def __init__(self):
|
|
11499
|
+
r"""
|
|
11500
|
+
:param _Status: 任务的状态信息。InProgress:表示当前任务正在进行中。NotExist:表示当前任务不存在。示例值:InProgress
|
|
11501
|
+
:type Status: str
|
|
11502
|
+
:param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
11503
|
+
:type RequestId: str
|
|
11504
|
+
"""
|
|
11505
|
+
self._Status = None
|
|
11506
|
+
self._RequestId = None
|
|
11507
|
+
|
|
11508
|
+
@property
|
|
11509
|
+
def Status(self):
|
|
11510
|
+
return self._Status
|
|
11511
|
+
|
|
11512
|
+
@Status.setter
|
|
11513
|
+
def Status(self, Status):
|
|
11514
|
+
self._Status = Status
|
|
11515
|
+
|
|
11516
|
+
@property
|
|
11517
|
+
def RequestId(self):
|
|
11518
|
+
return self._RequestId
|
|
11519
|
+
|
|
11520
|
+
@RequestId.setter
|
|
11521
|
+
def RequestId(self, RequestId):
|
|
11522
|
+
self._RequestId = RequestId
|
|
11523
|
+
|
|
11524
|
+
|
|
11525
|
+
def _deserialize(self, params):
|
|
11526
|
+
self._Status = params.get("Status")
|
|
11527
|
+
self._RequestId = params.get("RequestId")
|
|
11528
|
+
|
|
11529
|
+
|
|
11226
11530
|
class UserInformation(AbstractModel):
|
|
11227
11531
|
"""用户信息,包括用户进房时间,退房时间等
|
|
11228
11532
|
|
|
@@ -1015,7 +1015,9 @@ class TrtcClient(AbstractClient):
|
|
|
1015
1015
|
|
|
1016
1016
|
|
|
1017
1017
|
def StartAIConversation(self, request):
|
|
1018
|
-
"""
|
|
1018
|
+
"""启动AI对话任务,AI通道机器人进入TRTC房间,与房间内指定的成员进行AI对话,适用于智能客服,AI口语教师等场景
|
|
1019
|
+
|
|
1020
|
+
TRTC AI对话功能内置语音转文本能力,同时提供通道服务,即客户可灵活指定第三方AI模型(LLM)服务和文本转音频(TTS)服务,更多[功能说明](https://cloud.tencent.com/document/product/647/108901)。
|
|
1019
1021
|
|
|
1020
1022
|
:param request: Request instance for StartAIConversation.
|
|
1021
1023
|
:type request: :class:`tencentcloud.trtc.v20190722.models.StartAIConversationRequest`
|
|
@@ -1038,48 +1040,12 @@ class TrtcClient(AbstractClient):
|
|
|
1038
1040
|
|
|
1039
1041
|
|
|
1040
1042
|
def StartAITranscription(self, request):
|
|
1041
|
-
"""
|
|
1043
|
+
"""启动转录机器人,后台会通过机器人拉流进行实时进行语音识别并下发字幕和转录消息。
|
|
1042
1044
|
转录机器人支持两种拉流方式,通过TranscriptionMode字段控制:
|
|
1043
1045
|
- 拉取全房间的流。
|
|
1044
1046
|
- 拉取特定用户的流。
|
|
1045
1047
|
|
|
1046
|
-
服务端通过TRTC
|
|
1047
|
-
|
|
1048
|
-
服务端实时下发的消息是JSON字符串,实时字幕具体格式如下:
|
|
1049
|
-
`{
|
|
1050
|
-
"type": "subtitle",
|
|
1051
|
-
"userid": "xxx",
|
|
1052
|
-
"text": "xxx",
|
|
1053
|
-
"translation_text": "xxx",
|
|
1054
|
-
"start_time": "00:00:02",
|
|
1055
|
-
"end_time": "00:00:05"
|
|
1056
|
-
}`
|
|
1057
|
-
字段作用如下:
|
|
1058
|
-
- type是subtitle,表示这是实时字幕消息。
|
|
1059
|
-
- userid表示是哪个用户说的话。
|
|
1060
|
-
- text是语音识别出的文本。
|
|
1061
|
-
- translation_text是text翻译后的文本,如果不启用翻译,则是空字符串。
|
|
1062
|
-
- start_time和end_time表示该字幕消息从任务开启后的开始和结束时间。
|
|
1063
|
-
|
|
1064
|
-
转录消息具体格式如下:
|
|
1065
|
-
`{
|
|
1066
|
-
"type": "transcription",
|
|
1067
|
-
"userid": "xxx",
|
|
1068
|
-
"text": "xxx",
|
|
1069
|
-
"translation_text": "xx",
|
|
1070
|
-
"start_time": "00:00:02",
|
|
1071
|
-
"end_time": "00:00:05"
|
|
1072
|
-
}`
|
|
1073
|
-
字段作用如下:
|
|
1074
|
-
- type是transcription,表示这是转录消息。
|
|
1075
|
-
- 其余字段同实时字幕消息。
|
|
1076
|
-
|
|
1077
|
-
转录消息和实时字幕消息的区别是,转录消息是完整的一句话,实时字幕消息则是这一句话的中间阶段。
|
|
1078
|
-
假如有一句完整的话,“今天天气怎么样?”,那么服务的下发消息的顺序可能是这样:
|
|
1079
|
-
- 字幕消息,“今天”
|
|
1080
|
-
- 字幕消息,“今天天气”
|
|
1081
|
-
- 字幕消息,“今天天气怎么样”
|
|
1082
|
-
- 转录消息,“今天天气怎么样?”
|
|
1048
|
+
服务端通过TRTC的自定义消息实时下发字幕以及转录消息,CmdId固定是1。客户端只需监听自定义消息的回调即可,比如[c++回调](https://cloud.tencent.com/document/product/647/79637#4cd82f4edb24992a15a25187089e1565)。其他客户端比如安卓、Web等同样可在该链接处找到。
|
|
1083
1049
|
|
|
1084
1050
|
:param request: Request instance for StartAITranscription.
|
|
1085
1051
|
:type request: :class:`tencentcloud.trtc.v20190722.models.StartAITranscriptionRequest`
|
|
@@ -1452,6 +1418,29 @@ class TrtcClient(AbstractClient):
|
|
|
1452
1418
|
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1453
1419
|
|
|
1454
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
|
+
|
|
1455
1444
|
def UpdatePublishCdnStream(self, request):
|
|
1456
1445
|
"""接口说明:
|
|
1457
1446
|
成功发起混流转推后,可以使用此接口来更新任务。仅在任务进行时有效,任务退出后更新将会返回错误。更新操作为增量更新模式。
|
|
@@ -1470,6 +1459,29 @@ class TrtcClient(AbstractClient):
|
|
|
1470
1459
|
model = models.UpdatePublishCdnStreamResponse()
|
|
1471
1460
|
model._deserialize(response["Response"])
|
|
1472
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
|
|
1473
1485
|
except Exception as e:
|
|
1474
1486
|
if isinstance(e, TencentCloudSDKException):
|
|
1475
1487
|
raise
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tencentcloud-sdk-python-trtc
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.1242
|
|
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.
|
|
18
|
+
Requires-Dist: tencentcloud-sdk-python-common (==3.0.1242)
|
|
19
19
|
|
|
20
20
|
============================
|
|
21
21
|
Tencent Cloud SDK for Python
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
tencentcloud/__init__.py,sha256=CwGwZgWv79G6t5Vn7BZ8wCgM9pK0u1Rf99thjOLkbCs,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=izGCPCS09gxLizUTIEXXgtUOU32fFtwXVRLU3zqwoa8,400324
|
|
6
|
+
tencentcloud/trtc/v20190722/trtc_client.py,sha256=sTzamtT7sp-ul08Ekv4xEa9sWm03AEDqQMcioZX4LtE,78132
|
|
7
|
+
tencentcloud_sdk_python_trtc-3.0.1242.dist-info/METADATA,sha256=t530BgWg5um8IJ4icNV12Opdt1dnwJggwzY1saFPcrQ,1497
|
|
8
|
+
tencentcloud_sdk_python_trtc-3.0.1242.dist-info/WHEEL,sha256=z9j0xAa_JmUKMpmz72K0ZGALSM_n-wQVmGbleXx2VHg,110
|
|
9
|
+
tencentcloud_sdk_python_trtc-3.0.1242.dist-info/top_level.txt,sha256=g-8OyzoqI6O6LiS85zkeNzhB-osEnRIPZMdyRd_0eL0,13
|
|
10
|
+
tencentcloud_sdk_python_trtc-3.0.1242.dist-info/RECORD,,
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
tencentcloud/__init__.py,sha256=-HtbpAT0egGec_Hik3_9w-XBb0Fag_PVMXquzcBJ3sg,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=K4q7UWQkdedEyrQJFz67cH3xzyKo78PS0EseWry0JXo,10898
|
|
5
|
-
tencentcloud/trtc/v20190722/models.py,sha256=bOQEJpsJAymnQuLfA762Da8sNPue3RjQIX4wcXwM14U,389766
|
|
6
|
-
tencentcloud/trtc/v20190722/trtc_client.py,sha256=7LEm9-06cMUwXOEpm-ueDS7tx9hln3zcZxexC1Fc6Ak,77573
|
|
7
|
-
tencentcloud_sdk_python_trtc-3.0.1205.dist-info/METADATA,sha256=ljNkMscJq9J34f-5lgjSvS7l-maQ5NvhAVnDSMHGqMs,1497
|
|
8
|
-
tencentcloud_sdk_python_trtc-3.0.1205.dist-info/WHEEL,sha256=z9j0xAa_JmUKMpmz72K0ZGALSM_n-wQVmGbleXx2VHg,110
|
|
9
|
-
tencentcloud_sdk_python_trtc-3.0.1205.dist-info/top_level.txt,sha256=g-8OyzoqI6O6LiS85zkeNzhB-osEnRIPZMdyRd_0eL0,13
|
|
10
|
-
tencentcloud_sdk_python_trtc-3.0.1205.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|