tencentcloud-sdk-python-trtc 3.1.53__tar.gz → 3.1.80__tar.gz

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.
Files changed (17) hide show
  1. {tencentcloud_sdk_python_trtc-3.1.53 → tencentcloud_sdk_python_trtc-3.1.80}/PKG-INFO +2 -2
  2. {tencentcloud_sdk_python_trtc-3.1.53 → tencentcloud_sdk_python_trtc-3.1.80}/setup.py +1 -1
  3. {tencentcloud_sdk_python_trtc-3.1.53 → tencentcloud_sdk_python_trtc-3.1.80}/tencentcloud/__init__.py +1 -1
  4. {tencentcloud_sdk_python_trtc-3.1.53 → tencentcloud_sdk_python_trtc-3.1.80}/tencentcloud/trtc/v20190722/errorcodes.py +6 -0
  5. {tencentcloud_sdk_python_trtc-3.1.53 → tencentcloud_sdk_python_trtc-3.1.80}/tencentcloud/trtc/v20190722/models.py +559 -6
  6. {tencentcloud_sdk_python_trtc-3.1.53 → tencentcloud_sdk_python_trtc-3.1.80}/tencentcloud/trtc/v20190722/trtc_client.py +46 -0
  7. {tencentcloud_sdk_python_trtc-3.1.53 → tencentcloud_sdk_python_trtc-3.1.80}/tencentcloud/trtc/v20190722/trtc_client_async.py +36 -0
  8. {tencentcloud_sdk_python_trtc-3.1.53 → tencentcloud_sdk_python_trtc-3.1.80}/tencentcloud_sdk_python_trtc.egg-info/PKG-INFO +2 -2
  9. tencentcloud_sdk_python_trtc-3.1.80/tencentcloud_sdk_python_trtc.egg-info/requires.txt +1 -0
  10. tencentcloud_sdk_python_trtc-3.1.53/tencentcloud_sdk_python_trtc.egg-info/requires.txt +0 -1
  11. {tencentcloud_sdk_python_trtc-3.1.53 → tencentcloud_sdk_python_trtc-3.1.80}/README.rst +0 -0
  12. {tencentcloud_sdk_python_trtc-3.1.53 → tencentcloud_sdk_python_trtc-3.1.80}/setup.cfg +0 -0
  13. {tencentcloud_sdk_python_trtc-3.1.53 → tencentcloud_sdk_python_trtc-3.1.80}/tencentcloud/trtc/__init__.py +0 -0
  14. {tencentcloud_sdk_python_trtc-3.1.53 → tencentcloud_sdk_python_trtc-3.1.80}/tencentcloud/trtc/v20190722/__init__.py +0 -0
  15. {tencentcloud_sdk_python_trtc-3.1.53 → tencentcloud_sdk_python_trtc-3.1.80}/tencentcloud_sdk_python_trtc.egg-info/SOURCES.txt +0 -0
  16. {tencentcloud_sdk_python_trtc-3.1.53 → tencentcloud_sdk_python_trtc-3.1.80}/tencentcloud_sdk_python_trtc.egg-info/dependency_links.txt +0 -0
  17. {tencentcloud_sdk_python_trtc-3.1.53 → tencentcloud_sdk_python_trtc-3.1.80}/tencentcloud_sdk_python_trtc.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tencentcloud-sdk-python-trtc
3
- Version: 3.1.53
3
+ Version: 3.1.80
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<4.0.0,>=3.1.53
18
+ Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.80
19
19
 
20
20
  ============================
21
21
  Tencent Cloud SDK for Python
@@ -8,7 +8,7 @@ ROOT = os.path.dirname(__file__)
8
8
 
9
9
  setup(
10
10
  name='tencentcloud-sdk-python-trtc',
11
- install_requires=["tencentcloud-sdk-python-common>=3.1.53,<4.0.0"],
11
+ install_requires=["tencentcloud-sdk-python-common>=3.1.80,<4.0.0"],
12
12
 
13
13
  version=tencentcloud.__version__,
14
14
  description='Tencent Cloud Trtc SDK for Python',
@@ -14,4 +14,4 @@
14
14
  # limitations under the License.
15
15
 
16
16
 
17
- __version__ = '3.1.53'
17
+ __version__ = '3.1.80'
@@ -209,6 +209,9 @@ INVALIDPARAMETER_PITCH = 'InvalidParameter.Pitch'
209
209
  # 自定义布局参数错误。
210
210
  INVALIDPARAMETER_PRESETLAYOUTCONFIG = 'InvalidParameter.PresetLayoutConfig'
211
211
 
212
+ # 发音纠正词典条目参数错误
213
+ INVALIDPARAMETER_PRONUNCIATIONDICT = 'InvalidParameter.PronunciationDict'
214
+
212
215
  # PublishCdnUrls参数校验失败。
213
216
  INVALIDPARAMETER_PUBLISHCDNURLS = 'InvalidParameter.PublishCdnUrls'
214
217
 
@@ -449,5 +452,8 @@ UNSUPPORTEDOPERATION_INTERNALERROR = 'UnsupportedOperation.InternalError'
449
452
  # 不允许使用,请联系技术人员
450
453
  UNSUPPORTEDOPERATION_NOTALLOWED = 'UnsupportedOperation.NotAllowed'
451
454
 
455
+ # 任务并发限制
456
+ UNSUPPORTEDOPERATION_TASKLIMIT = 'UnsupportedOperation.TaskLimit'
457
+
452
458
  # 声音克隆错误
453
459
  UNSUPPORTEDOPERATION_VOICECLONEERROR = 'UnsupportedOperation.VoiceCloneError'
@@ -525,6 +525,87 @@ class AgentParams(AbstractModel):
525
525
 
526
526
 
527
527
 
528
+ class AlignmentItem(AbstractModel):
529
+ r"""字幕对齐
530
+
531
+ """
532
+
533
+ def __init__(self):
534
+ r"""
535
+ :param _TimeBeginMs: 字幕对应的时间起点
536
+ :type TimeBeginMs: int
537
+ :param _TimeEndMs: 字幕对应的时间尾点
538
+ :type TimeEndMs: int
539
+ :param _TextBegin: 字幕对应的文本索引起点
540
+ :type TextBegin: int
541
+ :param _TextEnd: 字幕对应的文本索引尾点
542
+ :type TextEnd: int
543
+ """
544
+ self._TimeBeginMs = None
545
+ self._TimeEndMs = None
546
+ self._TextBegin = None
547
+ self._TextEnd = None
548
+
549
+ @property
550
+ def TimeBeginMs(self):
551
+ r"""字幕对应的时间起点
552
+ :rtype: int
553
+ """
554
+ return self._TimeBeginMs
555
+
556
+ @TimeBeginMs.setter
557
+ def TimeBeginMs(self, TimeBeginMs):
558
+ self._TimeBeginMs = TimeBeginMs
559
+
560
+ @property
561
+ def TimeEndMs(self):
562
+ r"""字幕对应的时间尾点
563
+ :rtype: int
564
+ """
565
+ return self._TimeEndMs
566
+
567
+ @TimeEndMs.setter
568
+ def TimeEndMs(self, TimeEndMs):
569
+ self._TimeEndMs = TimeEndMs
570
+
571
+ @property
572
+ def TextBegin(self):
573
+ r"""字幕对应的文本索引起点
574
+ :rtype: int
575
+ """
576
+ return self._TextBegin
577
+
578
+ @TextBegin.setter
579
+ def TextBegin(self, TextBegin):
580
+ self._TextBegin = TextBegin
581
+
582
+ @property
583
+ def TextEnd(self):
584
+ r"""字幕对应的文本索引尾点
585
+ :rtype: int
586
+ """
587
+ return self._TextEnd
588
+
589
+ @TextEnd.setter
590
+ def TextEnd(self, TextEnd):
591
+ self._TextEnd = TextEnd
592
+
593
+
594
+ def _deserialize(self, params):
595
+ self._TimeBeginMs = params.get("TimeBeginMs")
596
+ self._TimeEndMs = params.get("TimeEndMs")
597
+ self._TextBegin = params.get("TextBegin")
598
+ self._TextEnd = params.get("TextEnd")
599
+ memeber_set = set(params.keys())
600
+ for name, value in vars(self).items():
601
+ property_name = name[1:]
602
+ if property_name in memeber_set:
603
+ memeber_set.remove(property_name)
604
+ if len(memeber_set) > 0:
605
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
606
+
607
+
608
+
528
609
  class AmbientSound(AbstractModel):
529
610
  r"""背景音设置,将在通话中添加环境音效,使体验更加逼真。目前支持以下选项:
530
611
  coffee_shops: 咖啡店氛围,背景中有人聊天。
@@ -760,6 +841,199 @@ class AsrParam(AbstractModel):
760
841
 
761
842
 
762
843
 
844
+ class AsyncTextToSpeechRequest(AbstractModel):
845
+ r"""AsyncTextToSpeech请求参数结构体
846
+
847
+ """
848
+
849
+ def __init__(self):
850
+ r"""
851
+ :param _Text: 需要转语音的文字内容,最大允许50000字符,注意 1汉字=2字符
852
+ :type Text: str
853
+ :param _Voice: 文本转语音的声音配置
854
+ :type Voice: :class:`tencentcloud.trtc.v20190722.models.Voice`
855
+ :param _SdkAppId: TRTC的SdkAppId
856
+ :type SdkAppId: int
857
+ :param _AudioFormat: 文本转语音的输出音频的格式
858
+ :type AudioFormat: :class:`tencentcloud.trtc.v20190722.models.AudioFormat`
859
+ :param _Model: TTS的模型,当前固定为:flow_01_turbo
860
+ :type Model: str
861
+ :param _PronunciationDict: 多音字/生僻字发音纠正词典条目。指定特定词语在本次请求中使用的发音。
862
+ :type PronunciationDict: list of PronunciationDict
863
+ :param _AlignmentMode: 默认为0,0表示不生成字幕,1表示生成字幕
864
+ :type AlignmentMode: int
865
+ :param _LanguageCode: 需要合成的语言(ISO 639-1),默认自动识别,支持的语言如下: zh(中文) en(英文) yue(粤语) ja(日语) ko(韩语) ar(阿拉伯语) id(印尼语) th(泰语)
866
+ :type LanguageCode: str
867
+ """
868
+ self._Text = None
869
+ self._Voice = None
870
+ self._SdkAppId = None
871
+ self._AudioFormat = None
872
+ self._Model = None
873
+ self._PronunciationDict = None
874
+ self._AlignmentMode = None
875
+ self._LanguageCode = None
876
+
877
+ @property
878
+ def Text(self):
879
+ r"""需要转语音的文字内容,最大允许50000字符,注意 1汉字=2字符
880
+ :rtype: str
881
+ """
882
+ return self._Text
883
+
884
+ @Text.setter
885
+ def Text(self, Text):
886
+ self._Text = Text
887
+
888
+ @property
889
+ def Voice(self):
890
+ r"""文本转语音的声音配置
891
+ :rtype: :class:`tencentcloud.trtc.v20190722.models.Voice`
892
+ """
893
+ return self._Voice
894
+
895
+ @Voice.setter
896
+ def Voice(self, Voice):
897
+ self._Voice = Voice
898
+
899
+ @property
900
+ def SdkAppId(self):
901
+ r"""TRTC的SdkAppId
902
+ :rtype: int
903
+ """
904
+ return self._SdkAppId
905
+
906
+ @SdkAppId.setter
907
+ def SdkAppId(self, SdkAppId):
908
+ self._SdkAppId = SdkAppId
909
+
910
+ @property
911
+ def AudioFormat(self):
912
+ r"""文本转语音的输出音频的格式
913
+ :rtype: :class:`tencentcloud.trtc.v20190722.models.AudioFormat`
914
+ """
915
+ return self._AudioFormat
916
+
917
+ @AudioFormat.setter
918
+ def AudioFormat(self, AudioFormat):
919
+ self._AudioFormat = AudioFormat
920
+
921
+ @property
922
+ def Model(self):
923
+ r"""TTS的模型,当前固定为:flow_01_turbo
924
+ :rtype: str
925
+ """
926
+ return self._Model
927
+
928
+ @Model.setter
929
+ def Model(self, Model):
930
+ self._Model = Model
931
+
932
+ @property
933
+ def PronunciationDict(self):
934
+ r"""多音字/生僻字发音纠正词典条目。指定特定词语在本次请求中使用的发音。
935
+ :rtype: list of PronunciationDict
936
+ """
937
+ return self._PronunciationDict
938
+
939
+ @PronunciationDict.setter
940
+ def PronunciationDict(self, PronunciationDict):
941
+ self._PronunciationDict = PronunciationDict
942
+
943
+ @property
944
+ def AlignmentMode(self):
945
+ r"""默认为0,0表示不生成字幕,1表示生成字幕
946
+ :rtype: int
947
+ """
948
+ return self._AlignmentMode
949
+
950
+ @AlignmentMode.setter
951
+ def AlignmentMode(self, AlignmentMode):
952
+ self._AlignmentMode = AlignmentMode
953
+
954
+ @property
955
+ def LanguageCode(self):
956
+ r"""需要合成的语言(ISO 639-1),默认自动识别,支持的语言如下: zh(中文) en(英文) yue(粤语) ja(日语) ko(韩语) ar(阿拉伯语) id(印尼语) th(泰语)
957
+ :rtype: str
958
+ """
959
+ return self._LanguageCode
960
+
961
+ @LanguageCode.setter
962
+ def LanguageCode(self, LanguageCode):
963
+ self._LanguageCode = LanguageCode
964
+
965
+
966
+ def _deserialize(self, params):
967
+ self._Text = params.get("Text")
968
+ if params.get("Voice") is not None:
969
+ self._Voice = Voice()
970
+ self._Voice._deserialize(params.get("Voice"))
971
+ self._SdkAppId = params.get("SdkAppId")
972
+ if params.get("AudioFormat") is not None:
973
+ self._AudioFormat = AudioFormat()
974
+ self._AudioFormat._deserialize(params.get("AudioFormat"))
975
+ self._Model = params.get("Model")
976
+ if params.get("PronunciationDict") is not None:
977
+ self._PronunciationDict = []
978
+ for item in params.get("PronunciationDict"):
979
+ obj = PronunciationDict()
980
+ obj._deserialize(item)
981
+ self._PronunciationDict.append(obj)
982
+ self._AlignmentMode = params.get("AlignmentMode")
983
+ self._LanguageCode = params.get("LanguageCode")
984
+ memeber_set = set(params.keys())
985
+ for name, value in vars(self).items():
986
+ property_name = name[1:]
987
+ if property_name in memeber_set:
988
+ memeber_set.remove(property_name)
989
+ if len(memeber_set) > 0:
990
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
991
+
992
+
993
+
994
+ class AsyncTextToSpeechResponse(AbstractModel):
995
+ r"""AsyncTextToSpeech返回参数结构体
996
+
997
+ """
998
+
999
+ def __init__(self):
1000
+ r"""
1001
+ :param _TaskId: 任务ID
1002
+ :type TaskId: str
1003
+ :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
1004
+ :type RequestId: str
1005
+ """
1006
+ self._TaskId = None
1007
+ self._RequestId = None
1008
+
1009
+ @property
1010
+ def TaskId(self):
1011
+ r"""任务ID
1012
+ :rtype: str
1013
+ """
1014
+ return self._TaskId
1015
+
1016
+ @TaskId.setter
1017
+ def TaskId(self, TaskId):
1018
+ self._TaskId = TaskId
1019
+
1020
+ @property
1021
+ def RequestId(self):
1022
+ r"""唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
1023
+ :rtype: str
1024
+ """
1025
+ return self._RequestId
1026
+
1027
+ @RequestId.setter
1028
+ def RequestId(self, RequestId):
1029
+ self._RequestId = RequestId
1030
+
1031
+
1032
+ def _deserialize(self, params):
1033
+ self._TaskId = params.get("TaskId")
1034
+ self._RequestId = params.get("RequestId")
1035
+
1036
+
763
1037
  class AudioEncode(AbstractModel):
764
1038
  r"""音频编码参数。
765
1039
 
@@ -938,6 +1212,9 @@ class AudioFormat(AbstractModel):
938
1212
  - TextToSpeech 非流式接口
939
1213
 
940
1214
  支持 pcm,wav,mp3, 默认: pcm
1215
+
1216
+ - AsyncTextToSpeech
1217
+ 支持pcm,mp3, 默认:mp3
941
1218
  :type Format: str
942
1219
  :param _SampleRate: 生成的音频采样率,默认24000
943
1220
  可选
@@ -962,6 +1239,9 @@ class AudioFormat(AbstractModel):
962
1239
  - TextToSpeech 非流式接口
963
1240
 
964
1241
  支持 pcm,wav,mp3, 默认: pcm
1242
+
1243
+ - AsyncTextToSpeech
1244
+ 支持pcm,mp3, 默认:mp3
965
1245
  :rtype: str
966
1246
  """
967
1247
  return self._Format
@@ -3856,6 +4136,123 @@ class DescribeAITranscriptionResponse(AbstractModel):
3856
4136
  self._RequestId = params.get("RequestId")
3857
4137
 
3858
4138
 
4139
+ class DescribeAsyncTextToSpeechRequest(AbstractModel):
4140
+ r"""DescribeAsyncTextToSpeech请求参数结构体
4141
+
4142
+ """
4143
+
4144
+ def __init__(self):
4145
+ r"""
4146
+ :param _TaskId: 任务ID
4147
+ :type TaskId: str
4148
+ """
4149
+ self._TaskId = None
4150
+
4151
+ @property
4152
+ def TaskId(self):
4153
+ r"""任务ID
4154
+ :rtype: str
4155
+ """
4156
+ return self._TaskId
4157
+
4158
+ @TaskId.setter
4159
+ def TaskId(self, TaskId):
4160
+ self._TaskId = TaskId
4161
+
4162
+
4163
+ def _deserialize(self, params):
4164
+ self._TaskId = params.get("TaskId")
4165
+ memeber_set = set(params.keys())
4166
+ for name, value in vars(self).items():
4167
+ property_name = name[1:]
4168
+ if property_name in memeber_set:
4169
+ memeber_set.remove(property_name)
4170
+ if len(memeber_set) > 0:
4171
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
4172
+
4173
+
4174
+
4175
+ class DescribeAsyncTextToSpeechResponse(AbstractModel):
4176
+ r"""DescribeAsyncTextToSpeech返回参数结构体
4177
+
4178
+ """
4179
+
4180
+ def __init__(self):
4181
+ r"""
4182
+ :param _Status: 任务状态
4183
+ - Processing,处理中
4184
+ - Success,任务成功
4185
+ - Failed,任务失败
4186
+ - Expired,任务过期
4187
+ :type Status: str
4188
+ :param _AudioDownloadUrl: 音频下载url
4189
+ :type AudioDownloadUrl: str
4190
+ :param _SubtitleDownloadUrl: 字幕下载url
4191
+ :type SubtitleDownloadUrl: str
4192
+ :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
4193
+ :type RequestId: str
4194
+ """
4195
+ self._Status = None
4196
+ self._AudioDownloadUrl = None
4197
+ self._SubtitleDownloadUrl = None
4198
+ self._RequestId = None
4199
+
4200
+ @property
4201
+ def Status(self):
4202
+ r"""任务状态
4203
+ - Processing,处理中
4204
+ - Success,任务成功
4205
+ - Failed,任务失败
4206
+ - Expired,任务过期
4207
+ :rtype: str
4208
+ """
4209
+ return self._Status
4210
+
4211
+ @Status.setter
4212
+ def Status(self, Status):
4213
+ self._Status = Status
4214
+
4215
+ @property
4216
+ def AudioDownloadUrl(self):
4217
+ r"""音频下载url
4218
+ :rtype: str
4219
+ """
4220
+ return self._AudioDownloadUrl
4221
+
4222
+ @AudioDownloadUrl.setter
4223
+ def AudioDownloadUrl(self, AudioDownloadUrl):
4224
+ self._AudioDownloadUrl = AudioDownloadUrl
4225
+
4226
+ @property
4227
+ def SubtitleDownloadUrl(self):
4228
+ r"""字幕下载url
4229
+ :rtype: str
4230
+ """
4231
+ return self._SubtitleDownloadUrl
4232
+
4233
+ @SubtitleDownloadUrl.setter
4234
+ def SubtitleDownloadUrl(self, SubtitleDownloadUrl):
4235
+ self._SubtitleDownloadUrl = SubtitleDownloadUrl
4236
+
4237
+ @property
4238
+ def RequestId(self):
4239
+ r"""唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
4240
+ :rtype: str
4241
+ """
4242
+ return self._RequestId
4243
+
4244
+ @RequestId.setter
4245
+ def RequestId(self, RequestId):
4246
+ self._RequestId = RequestId
4247
+
4248
+
4249
+ def _deserialize(self, params):
4250
+ self._Status = params.get("Status")
4251
+ self._AudioDownloadUrl = params.get("AudioDownloadUrl")
4252
+ self._SubtitleDownloadUrl = params.get("SubtitleDownloadUrl")
4253
+ self._RequestId = params.get("RequestId")
4254
+
4255
+
3859
4256
  class DescribeCallDetailInfoRequest(AbstractModel):
3860
4257
  r"""DescribeCallDetailInfo请求参数结构体
3861
4258
 
@@ -12182,6 +12579,57 @@ class PresetLayoutConfig(AbstractModel):
12182
12579
 
12183
12580
 
12184
12581
 
12582
+ class PronunciationDict(AbstractModel):
12583
+ r"""多音字/生僻字发音纠正词典条目。指定特定词语在本次请求中使用的发音。
12584
+
12585
+ """
12586
+
12587
+ def __init__(self):
12588
+ r"""
12589
+ :param _Word: 需要纠正发音的词语,前后空格自动去除。同一请求中若有重复词语,以最后一条为准。
12590
+ :type Word: str
12591
+ :param _Pronunciation: 目标发音,支持以下格式:<br>① 带声调数字的拼音(1=阴平,2=阳平,3=上声,4=去声,5=轻声),如 yin2 hang2;<br>② 拼音连写(无空格),如 yin2hang2;<br>③ 文字+拼音混写,如 银hang2;<br>④ 直接文本替换,会将原始文本替换为目标文本
12592
+ :type Pronunciation: str
12593
+ """
12594
+ self._Word = None
12595
+ self._Pronunciation = None
12596
+
12597
+ @property
12598
+ def Word(self):
12599
+ r"""需要纠正发音的词语,前后空格自动去除。同一请求中若有重复词语,以最后一条为准。
12600
+ :rtype: str
12601
+ """
12602
+ return self._Word
12603
+
12604
+ @Word.setter
12605
+ def Word(self, Word):
12606
+ self._Word = Word
12607
+
12608
+ @property
12609
+ def Pronunciation(self):
12610
+ r"""目标发音,支持以下格式:<br>① 带声调数字的拼音(1=阴平,2=阳平,3=上声,4=去声,5=轻声),如 yin2 hang2;<br>② 拼音连写(无空格),如 yin2hang2;<br>③ 文字+拼音混写,如 银hang2;<br>④ 直接文本替换,会将原始文本替换为目标文本
12611
+ :rtype: str
12612
+ """
12613
+ return self._Pronunciation
12614
+
12615
+ @Pronunciation.setter
12616
+ def Pronunciation(self, Pronunciation):
12617
+ self._Pronunciation = Pronunciation
12618
+
12619
+
12620
+ def _deserialize(self, params):
12621
+ self._Word = params.get("Word")
12622
+ self._Pronunciation = params.get("Pronunciation")
12623
+ memeber_set = set(params.keys())
12624
+ for name, value in vars(self).items():
12625
+ property_name = name[1:]
12626
+ if property_name in memeber_set:
12627
+ memeber_set.remove(property_name)
12628
+ if len(memeber_set) > 0:
12629
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
12630
+
12631
+
12632
+
12185
12633
  class PublishCdnParams(AbstractModel):
12186
12634
  r"""第三方CDN转推参数
12187
12635
 
@@ -15417,7 +15865,7 @@ class StartStreamIngestRequest(AbstractModel):
15417
15865
  :type UserId: str
15418
15866
  :param _UserSig: 输入在线媒体流机器人UserId对应的校验签名,即UserId和UserSig相当于机器人进房的登录密码,具体计算方法请参考TRTC计算[UserSig](https://cloud.tencent.com/document/product/647/45910#UserSig)的方案。
15419
15867
  :type UserSig: str
15420
- :param _StreamUrl: 源流URL【必填】。如果是视频流,分辨率请保持不变。
15868
+ :param _StreamUrl: 源流URL【必填】。如果是视频流,分辨率请保持不变,视频流的最大分辨率限制1080p,最大帧率限制30fps。
15421
15869
  :type StreamUrl: str
15422
15870
  :param _PrivateMapKey: TRTC房间权限加密串,只有在TRTC控制台启用了高级权限控制的时候需要携带,在TRTC控制台如果开启高级权限控制后,TRTC 的后台服务系统会校验一个叫做 [PrivateMapKey] 的“权限票据”,权限票据中包含了一个加密后的 RoomId 和一个加密后的“权限位列表”。由于 PrivateMapKey 中包含 RoomId,所以只提供了 UserSig 没有提供 PrivateMapKey 时,并不能进入指定的房间。
15423
15871
  :type PrivateMapKey: str
@@ -15438,12 +15886,14 @@ class StartStreamIngestRequest(AbstractModel):
15438
15886
  :type RepeatNum: int
15439
15887
  :param _MaxDuration: 循环播放最大时长,仅支持RepeatNum设置-1时生效,取值范围[1, 10080],单位分钟。
15440
15888
  :type MaxDuration: int
15441
- :param _Volume: 音量,取值范围[0, 100],默认100,表示原音量。
15889
+ :param _Volume: 音量,取值范围[0, 200],默认100,表示原音量。
15442
15890
  :type Volume: int
15443
15891
  :param _EnableProgress: 开启播放进度回调, 默认false,当开启后,播放进度会通过trtc custom data 回调给播放端
15444
15892
  :type EnableProgress: bool
15445
15893
  :param _Tempo: 播放倍速,默认1.0,可取[0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0]
15446
15894
  :type Tempo: float
15895
+ :param _IdleTimeout: 播放任务处于空闲状态的最大时长(秒), 不填时任务会自适应销毁,可取[0, 600],空闲状态超过设置的 IdleTimeout 后,该播放任务会自动销毁
15896
+ :type IdleTimeout: int
15447
15897
  """
15448
15898
  self._SdkAppId = None
15449
15899
  self._RoomId = None
@@ -15462,6 +15912,7 @@ class StartStreamIngestRequest(AbstractModel):
15462
15912
  self._Volume = None
15463
15913
  self._EnableProgress = None
15464
15914
  self._Tempo = None
15915
+ self._IdleTimeout = None
15465
15916
 
15466
15917
  @property
15467
15918
  def SdkAppId(self):
@@ -15523,7 +15974,7 @@ class StartStreamIngestRequest(AbstractModel):
15523
15974
 
15524
15975
  @property
15525
15976
  def StreamUrl(self):
15526
- r"""源流URL【必填】。如果是视频流,分辨率请保持不变。
15977
+ r"""源流URL【必填】。如果是视频流,分辨率请保持不变,视频流的最大分辨率限制1080p,最大帧率限制30fps。
15527
15978
  :rtype: str
15528
15979
  """
15529
15980
  return self._StreamUrl
@@ -15637,7 +16088,7 @@ class StartStreamIngestRequest(AbstractModel):
15637
16088
 
15638
16089
  @property
15639
16090
  def Volume(self):
15640
- r"""音量,取值范围[0, 100],默认100,表示原音量。
16091
+ r"""音量,取值范围[0, 200],默认100,表示原音量。
15641
16092
  :rtype: int
15642
16093
  """
15643
16094
  return self._Volume
@@ -15668,6 +16119,17 @@ class StartStreamIngestRequest(AbstractModel):
15668
16119
  def Tempo(self, Tempo):
15669
16120
  self._Tempo = Tempo
15670
16121
 
16122
+ @property
16123
+ def IdleTimeout(self):
16124
+ r"""播放任务处于空闲状态的最大时长(秒), 不填时任务会自适应销毁,可取[0, 600],空闲状态超过设置的 IdleTimeout 后,该播放任务会自动销毁
16125
+ :rtype: int
16126
+ """
16127
+ return self._IdleTimeout
16128
+
16129
+ @IdleTimeout.setter
16130
+ def IdleTimeout(self, IdleTimeout):
16131
+ self._IdleTimeout = IdleTimeout
16132
+
15671
16133
 
15672
16134
  def _deserialize(self, params):
15673
16135
  self._SdkAppId = params.get("SdkAppId")
@@ -15691,6 +16153,7 @@ class StartStreamIngestRequest(AbstractModel):
15691
16153
  self._Volume = params.get("Volume")
15692
16154
  self._EnableProgress = params.get("EnableProgress")
15693
16155
  self._Tempo = params.get("Tempo")
16156
+ self._IdleTimeout = params.get("IdleTimeout")
15694
16157
  memeber_set = set(params.keys())
15695
16158
  for name, value in vars(self).items():
15696
16159
  property_name = name[1:]
@@ -17289,6 +17752,10 @@ class TextToSpeechRequest(AbstractModel):
17289
17752
  - id(印尼语)
17290
17753
  - th(泰语)
17291
17754
  :type Language: str
17755
+ :param _PronunciationDict: 多音字/生僻字发音纠正词典条目。指定特定词语在本次请求中使用的发音。
17756
+ :type PronunciationDict: list of PronunciationDict
17757
+ :param _AlignmentMode: 默认为0,0表示不生成字幕,1表示生成字幕
17758
+ :type AlignmentMode: int
17292
17759
  """
17293
17760
  self._Text = None
17294
17761
  self._Voice = None
@@ -17297,6 +17764,8 @@ class TextToSpeechRequest(AbstractModel):
17297
17764
  self._APIKey = None
17298
17765
  self._Model = None
17299
17766
  self._Language = None
17767
+ self._PronunciationDict = None
17768
+ self._AlignmentMode = None
17300
17769
 
17301
17770
  @property
17302
17771
  def Text(self):
@@ -17387,6 +17856,28 @@ class TextToSpeechRequest(AbstractModel):
17387
17856
  def Language(self, Language):
17388
17857
  self._Language = Language
17389
17858
 
17859
+ @property
17860
+ def PronunciationDict(self):
17861
+ r"""多音字/生僻字发音纠正词典条目。指定特定词语在本次请求中使用的发音。
17862
+ :rtype: list of PronunciationDict
17863
+ """
17864
+ return self._PronunciationDict
17865
+
17866
+ @PronunciationDict.setter
17867
+ def PronunciationDict(self, PronunciationDict):
17868
+ self._PronunciationDict = PronunciationDict
17869
+
17870
+ @property
17871
+ def AlignmentMode(self):
17872
+ r"""默认为0,0表示不生成字幕,1表示生成字幕
17873
+ :rtype: int
17874
+ """
17875
+ return self._AlignmentMode
17876
+
17877
+ @AlignmentMode.setter
17878
+ def AlignmentMode(self, AlignmentMode):
17879
+ self._AlignmentMode = AlignmentMode
17880
+
17390
17881
 
17391
17882
  def _deserialize(self, params):
17392
17883
  self._Text = params.get("Text")
@@ -17400,6 +17891,13 @@ class TextToSpeechRequest(AbstractModel):
17400
17891
  self._APIKey = params.get("APIKey")
17401
17892
  self._Model = params.get("Model")
17402
17893
  self._Language = params.get("Language")
17894
+ if params.get("PronunciationDict") is not None:
17895
+ self._PronunciationDict = []
17896
+ for item in params.get("PronunciationDict"):
17897
+ obj = PronunciationDict()
17898
+ obj._deserialize(item)
17899
+ self._PronunciationDict.append(obj)
17900
+ self._AlignmentMode = params.get("AlignmentMode")
17403
17901
  memeber_set = set(params.keys())
17404
17902
  for name, value in vars(self).items():
17405
17903
  property_name = name[1:]
@@ -17419,10 +17917,13 @@ class TextToSpeechResponse(AbstractModel):
17419
17917
  r"""
17420
17918
  :param _Audio: Base64编码的音频数据
17421
17919
  :type Audio: str
17920
+ :param _Alignments: 字幕对齐数据
17921
+ :type Alignments: list of AlignmentItem
17422
17922
  :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
17423
17923
  :type RequestId: str
17424
17924
  """
17425
17925
  self._Audio = None
17926
+ self._Alignments = None
17426
17927
  self._RequestId = None
17427
17928
 
17428
17929
  @property
@@ -17436,6 +17937,17 @@ class TextToSpeechResponse(AbstractModel):
17436
17937
  def Audio(self, Audio):
17437
17938
  self._Audio = Audio
17438
17939
 
17940
+ @property
17941
+ def Alignments(self):
17942
+ r"""字幕对齐数据
17943
+ :rtype: list of AlignmentItem
17944
+ """
17945
+ return self._Alignments
17946
+
17947
+ @Alignments.setter
17948
+ def Alignments(self, Alignments):
17949
+ self._Alignments = Alignments
17950
+
17439
17951
  @property
17440
17952
  def RequestId(self):
17441
17953
  r"""唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
@@ -17450,6 +17962,12 @@ class TextToSpeechResponse(AbstractModel):
17450
17962
 
17451
17963
  def _deserialize(self, params):
17452
17964
  self._Audio = params.get("Audio")
17965
+ if params.get("Alignments") is not None:
17966
+ self._Alignments = []
17967
+ for item in params.get("Alignments"):
17968
+ obj = AlignmentItem()
17969
+ obj._deserialize(item)
17970
+ self._Alignments.append(obj)
17453
17971
  self._RequestId = params.get("RequestId")
17454
17972
 
17455
17973
 
@@ -17483,6 +18001,10 @@ class TextToSpeechSSERequest(AbstractModel):
17483
18001
  - th(泰语)
17484
18002
 
17485
18003
  :type Language: str
18004
+ :param _PronunciationDict: 多音字/生僻字发音纠正词典条目。指定特定词语在本次请求中使用的发音。
18005
+ :type PronunciationDict: list of PronunciationDict
18006
+ :param _AlignmentMode: 默认为0,0表示不生成字幕,1表示生成字幕
18007
+ :type AlignmentMode: int
17486
18008
  """
17487
18009
  self._Text = None
17488
18010
  self._Voice = None
@@ -17491,6 +18013,8 @@ class TextToSpeechSSERequest(AbstractModel):
17491
18013
  self._APIKey = None
17492
18014
  self._Model = None
17493
18015
  self._Language = None
18016
+ self._PronunciationDict = None
18017
+ self._AlignmentMode = None
17494
18018
 
17495
18019
  @property
17496
18020
  def Text(self):
@@ -17582,6 +18106,28 @@ class TextToSpeechSSERequest(AbstractModel):
17582
18106
  def Language(self, Language):
17583
18107
  self._Language = Language
17584
18108
 
18109
+ @property
18110
+ def PronunciationDict(self):
18111
+ r"""多音字/生僻字发音纠正词典条目。指定特定词语在本次请求中使用的发音。
18112
+ :rtype: list of PronunciationDict
18113
+ """
18114
+ return self._PronunciationDict
18115
+
18116
+ @PronunciationDict.setter
18117
+ def PronunciationDict(self, PronunciationDict):
18118
+ self._PronunciationDict = PronunciationDict
18119
+
18120
+ @property
18121
+ def AlignmentMode(self):
18122
+ r"""默认为0,0表示不生成字幕,1表示生成字幕
18123
+ :rtype: int
18124
+ """
18125
+ return self._AlignmentMode
18126
+
18127
+ @AlignmentMode.setter
18128
+ def AlignmentMode(self, AlignmentMode):
18129
+ self._AlignmentMode = AlignmentMode
18130
+
17585
18131
 
17586
18132
  def _deserialize(self, params):
17587
18133
  self._Text = params.get("Text")
@@ -17595,6 +18141,13 @@ class TextToSpeechSSERequest(AbstractModel):
17595
18141
  self._APIKey = params.get("APIKey")
17596
18142
  self._Model = params.get("Model")
17597
18143
  self._Language = params.get("Language")
18144
+ if params.get("PronunciationDict") is not None:
18145
+ self._PronunciationDict = []
18146
+ for item in params.get("PronunciationDict"):
18147
+ obj = PronunciationDict()
18148
+ obj._deserialize(item)
18149
+ self._PronunciationDict.append(obj)
18150
+ self._AlignmentMode = params.get("AlignmentMode")
17598
18151
  memeber_set = set(params.keys())
17599
18152
  for name, value in vars(self).items():
17600
18153
  property_name = name[1:]
@@ -18680,7 +19233,7 @@ class UpdateStreamIngestRequest(AbstractModel):
18680
19233
  :type TaskId: str
18681
19234
  :param _StreamUrl: 源流URL。
18682
19235
  :type StreamUrl: str
18683
- :param _Volume: 音量,取值范围[0, 100],默认100,表示原音量。
19236
+ :param _Volume: 音量,取值范围[0, 200],默认100,表示原音量。
18684
19237
  :type Volume: int
18685
19238
  :param _IsPause: 是否暂停,默认false表示不暂停。暂停期间任务仍在进行中仍会计费,暂停超过12小时会自动销毁任务, 建议主动调用停止任务接口。
18686
19239
  :type IsPause: bool
@@ -18732,7 +19285,7 @@ class UpdateStreamIngestRequest(AbstractModel):
18732
19285
 
18733
19286
  @property
18734
19287
  def Volume(self):
18735
- r"""音量,取值范围[0, 100],默认100,表示原音量。
19288
+ r"""音量,取值范围[0, 200],默认100,表示原音量。
18736
19289
  :rtype: int
18737
19290
  """
18738
19291
  return self._Volume
@@ -26,6 +26,29 @@ class TrtcClient(AbstractClient):
26
26
  _service = 'trtc'
27
27
 
28
28
 
29
+ def AsyncTextToSpeech(self, request):
30
+ r"""异步语音合成
31
+
32
+ :param request: Request instance for AsyncTextToSpeech.
33
+ :type request: :class:`tencentcloud.trtc.v20190722.models.AsyncTextToSpeechRequest`
34
+ :rtype: :class:`tencentcloud.trtc.v20190722.models.AsyncTextToSpeechResponse`
35
+
36
+ """
37
+ try:
38
+ params = request._serialize()
39
+ headers = request.headers
40
+ body = self.call("AsyncTextToSpeech", params, headers=headers)
41
+ response = json.loads(body)
42
+ model = models.AsyncTextToSpeechResponse()
43
+ model._deserialize(response["Response"])
44
+ return model
45
+ except Exception as e:
46
+ if isinstance(e, TencentCloudSDKException):
47
+ raise
48
+ else:
49
+ raise TencentCloudSDKException(type(e).__name__, str(e))
50
+
51
+
29
52
  def ControlAIConversation(self, request):
30
53
  r"""提供服务端控制机器人的功能
31
54
 
@@ -418,6 +441,29 @@ class TrtcClient(AbstractClient):
418
441
  raise TencentCloudSDKException(type(e).__name__, str(e))
419
442
 
420
443
 
444
+ def DescribeAsyncTextToSpeech(self, request):
445
+ r"""查询异步语音合成状态
446
+
447
+ :param request: Request instance for DescribeAsyncTextToSpeech.
448
+ :type request: :class:`tencentcloud.trtc.v20190722.models.DescribeAsyncTextToSpeechRequest`
449
+ :rtype: :class:`tencentcloud.trtc.v20190722.models.DescribeAsyncTextToSpeechResponse`
450
+
451
+ """
452
+ try:
453
+ params = request._serialize()
454
+ headers = request.headers
455
+ body = self.call("DescribeAsyncTextToSpeech", params, headers=headers)
456
+ response = json.loads(body)
457
+ model = models.DescribeAsyncTextToSpeechResponse()
458
+ model._deserialize(response["Response"])
459
+ return model
460
+ except Exception as e:
461
+ if isinstance(e, TencentCloudSDKException):
462
+ raise
463
+ else:
464
+ raise TencentCloudSDKException(type(e).__name__, str(e))
465
+
466
+
421
467
  def DescribeCallDetailInfo(self, request):
422
468
  r"""查询指定时间内的用户列表及用户通话质量数据,最大可查询14天内数据。DataType 不为null,查询起止时间不超过1个小时,查询用户不超过6个,支持跨天查询。DataType为null时,查询起止时间不超过4个小时, 默认查询6个用户,同时支持每页查询100以内用户个数(PageSize不超过100)。接口用于查询质量问题,不推荐作为计费使用。(同老接口DescribeCallDetail)
423
469
  **注意**:
@@ -25,6 +25,24 @@ class TrtcClient(AbstractClient):
25
25
  _endpoint = 'trtc.tencentcloudapi.com'
26
26
  _service = 'trtc'
27
27
 
28
+ async def AsyncTextToSpeech(
29
+ self,
30
+ request: models.AsyncTextToSpeechRequest,
31
+ opts: Dict = None,
32
+ ) -> models.AsyncTextToSpeechResponse:
33
+ """
34
+ 异步语音合成
35
+ """
36
+
37
+ kwargs = {}
38
+ kwargs["action"] = "AsyncTextToSpeech"
39
+ kwargs["params"] = request._serialize()
40
+ kwargs["resp_cls"] = models.AsyncTextToSpeechResponse
41
+ kwargs["headers"] = request.headers
42
+ kwargs["opts"] = opts or {}
43
+
44
+ return await self.call_and_deserialize(**kwargs)
45
+
28
46
  async def ControlAIConversation(
29
47
  self,
30
48
  request: models.ControlAIConversationRequest,
@@ -337,6 +355,24 @@ class TrtcClient(AbstractClient):
337
355
 
338
356
  return await self.call_and_deserialize(**kwargs)
339
357
 
358
+ async def DescribeAsyncTextToSpeech(
359
+ self,
360
+ request: models.DescribeAsyncTextToSpeechRequest,
361
+ opts: Dict = None,
362
+ ) -> models.DescribeAsyncTextToSpeechResponse:
363
+ """
364
+ 查询异步语音合成状态
365
+ """
366
+
367
+ kwargs = {}
368
+ kwargs["action"] = "DescribeAsyncTextToSpeech"
369
+ kwargs["params"] = request._serialize()
370
+ kwargs["resp_cls"] = models.DescribeAsyncTextToSpeechResponse
371
+ kwargs["headers"] = request.headers
372
+ kwargs["opts"] = opts or {}
373
+
374
+ return await self.call_and_deserialize(**kwargs)
375
+
340
376
  async def DescribeCallDetailInfo(
341
377
  self,
342
378
  request: models.DescribeCallDetailInfoRequest,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tencentcloud-sdk-python-trtc
3
- Version: 3.1.53
3
+ Version: 3.1.80
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<4.0.0,>=3.1.53
18
+ Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.80
19
19
 
20
20
  ============================
21
21
  Tencent Cloud SDK for Python
@@ -0,0 +1 @@
1
+ tencentcloud-sdk-python-common<4.0.0,>=3.1.80
@@ -1 +0,0 @@
1
- tencentcloud-sdk-python-common<4.0.0,>=3.1.53