tencentcloud-sdk-python-trtc 3.1.73__tar.gz → 3.1.85__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.73 → tencentcloud_sdk_python_trtc-3.1.85}/PKG-INFO +2 -2
  2. {tencentcloud_sdk_python_trtc-3.1.73 → tencentcloud_sdk_python_trtc-3.1.85}/setup.py +1 -1
  3. {tencentcloud_sdk_python_trtc-3.1.73 → tencentcloud_sdk_python_trtc-3.1.85}/tencentcloud/__init__.py +1 -1
  4. {tencentcloud_sdk_python_trtc-3.1.73 → tencentcloud_sdk_python_trtc-3.1.85}/tencentcloud/trtc/v20190722/errorcodes.py +6 -0
  5. {tencentcloud_sdk_python_trtc-3.1.73 → tencentcloud_sdk_python_trtc-3.1.85}/tencentcloud/trtc/v20190722/models.py +589 -0
  6. {tencentcloud_sdk_python_trtc-3.1.73 → tencentcloud_sdk_python_trtc-3.1.85}/tencentcloud/trtc/v20190722/trtc_client.py +46 -0
  7. {tencentcloud_sdk_python_trtc-3.1.73 → tencentcloud_sdk_python_trtc-3.1.85}/tencentcloud/trtc/v20190722/trtc_client_async.py +36 -0
  8. {tencentcloud_sdk_python_trtc-3.1.73 → tencentcloud_sdk_python_trtc-3.1.85}/tencentcloud_sdk_python_trtc.egg-info/PKG-INFO +2 -2
  9. tencentcloud_sdk_python_trtc-3.1.85/tencentcloud_sdk_python_trtc.egg-info/requires.txt +1 -0
  10. tencentcloud_sdk_python_trtc-3.1.73/tencentcloud_sdk_python_trtc.egg-info/requires.txt +0 -1
  11. {tencentcloud_sdk_python_trtc-3.1.73 → tencentcloud_sdk_python_trtc-3.1.85}/README.rst +0 -0
  12. {tencentcloud_sdk_python_trtc-3.1.73 → tencentcloud_sdk_python_trtc-3.1.85}/setup.cfg +0 -0
  13. {tencentcloud_sdk_python_trtc-3.1.73 → tencentcloud_sdk_python_trtc-3.1.85}/tencentcloud/trtc/__init__.py +0 -0
  14. {tencentcloud_sdk_python_trtc-3.1.73 → tencentcloud_sdk_python_trtc-3.1.85}/tencentcloud/trtc/v20190722/__init__.py +0 -0
  15. {tencentcloud_sdk_python_trtc-3.1.73 → tencentcloud_sdk_python_trtc-3.1.85}/tencentcloud_sdk_python_trtc.egg-info/SOURCES.txt +0 -0
  16. {tencentcloud_sdk_python_trtc-3.1.73 → tencentcloud_sdk_python_trtc-3.1.85}/tencentcloud_sdk_python_trtc.egg-info/dependency_links.txt +0 -0
  17. {tencentcloud_sdk_python_trtc-3.1.73 → tencentcloud_sdk_python_trtc-3.1.85}/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.73
3
+ Version: 3.1.85
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.73
18
+ Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.85
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.73,<4.0.0"],
11
+ install_requires=["tencentcloud-sdk-python-common>=3.1.85,<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.73'
17
+ __version__ = '3.1.85'
@@ -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: 咖啡店氛围,背景中有人聊天。
@@ -639,12 +720,24 @@ class AsrParam(AbstractModel):
639
720
  :type AlternativeLanguage: list of str
640
721
  :param _VadLevel: vad的远场人声抑制能力(不会对asr识别效果造成影响),范围为[0, 3],默认为0。推荐设置为2,有较好的远场人声抑制能力。
641
722
  :type VadLevel: int
723
+ :param _FilterDirty: 是否过滤脏词(目前仅支持填写基础语言引擎和标准语言引擎),范围为[0, 2],默认值为 0。
724
+ 0:不过滤脏词;1:过滤脏词;2:将脏词替换为 " * "。
725
+ :type FilterDirty: int
726
+ :param _FilterModal: 是否过滤语气词(目前仅支持填写基础语言引擎和标准语言引擎),范围为[0, 2],默认值为 0。
727
+ 0:不过滤语气词;1:部分过滤;2:严格过滤。
728
+ :type FilterModal: int
729
+ :param _FilterPunc: 是否过滤句末的句号(目前仅支持填写基础语言引擎和标准语言引擎),范围为[0, 1],默认值为 0。
730
+ 0:不过滤句末的句号;1:过滤句末的句号。
731
+ :type FilterPunc: int
642
732
  """
643
733
  self._Lang = None
644
734
  self._VadSilenceTime = None
645
735
  self._HotWordList = None
646
736
  self._AlternativeLanguage = None
647
737
  self._VadLevel = None
738
+ self._FilterDirty = None
739
+ self._FilterModal = None
740
+ self._FilterPunc = None
648
741
 
649
742
  @property
650
743
  def Lang(self):
@@ -743,6 +836,42 @@ class AsrParam(AbstractModel):
743
836
  def VadLevel(self, VadLevel):
744
837
  self._VadLevel = VadLevel
745
838
 
839
+ @property
840
+ def FilterDirty(self):
841
+ r"""是否过滤脏词(目前仅支持填写基础语言引擎和标准语言引擎),范围为[0, 2],默认值为 0。
842
+ 0:不过滤脏词;1:过滤脏词;2:将脏词替换为 " * "。
843
+ :rtype: int
844
+ """
845
+ return self._FilterDirty
846
+
847
+ @FilterDirty.setter
848
+ def FilterDirty(self, FilterDirty):
849
+ self._FilterDirty = FilterDirty
850
+
851
+ @property
852
+ def FilterModal(self):
853
+ r"""是否过滤语气词(目前仅支持填写基础语言引擎和标准语言引擎),范围为[0, 2],默认值为 0。
854
+ 0:不过滤语气词;1:部分过滤;2:严格过滤。
855
+ :rtype: int
856
+ """
857
+ return self._FilterModal
858
+
859
+ @FilterModal.setter
860
+ def FilterModal(self, FilterModal):
861
+ self._FilterModal = FilterModal
862
+
863
+ @property
864
+ def FilterPunc(self):
865
+ r"""是否过滤句末的句号(目前仅支持填写基础语言引擎和标准语言引擎),范围为[0, 1],默认值为 0。
866
+ 0:不过滤句末的句号;1:过滤句末的句号。
867
+ :rtype: int
868
+ """
869
+ return self._FilterPunc
870
+
871
+ @FilterPunc.setter
872
+ def FilterPunc(self, FilterPunc):
873
+ self._FilterPunc = FilterPunc
874
+
746
875
 
747
876
  def _deserialize(self, params):
748
877
  self._Lang = params.get("Lang")
@@ -750,6 +879,9 @@ class AsrParam(AbstractModel):
750
879
  self._HotWordList = params.get("HotWordList")
751
880
  self._AlternativeLanguage = params.get("AlternativeLanguage")
752
881
  self._VadLevel = params.get("VadLevel")
882
+ self._FilterDirty = params.get("FilterDirty")
883
+ self._FilterModal = params.get("FilterModal")
884
+ self._FilterPunc = params.get("FilterPunc")
753
885
  memeber_set = set(params.keys())
754
886
  for name, value in vars(self).items():
755
887
  property_name = name[1:]
@@ -760,6 +892,199 @@ class AsrParam(AbstractModel):
760
892
 
761
893
 
762
894
 
895
+ class AsyncTextToSpeechRequest(AbstractModel):
896
+ r"""AsyncTextToSpeech请求参数结构体
897
+
898
+ """
899
+
900
+ def __init__(self):
901
+ r"""
902
+ :param _Text: 需要转语音的文字内容,最大允许50000字符,注意 1汉字=2字符
903
+ :type Text: str
904
+ :param _Voice: 文本转语音的声音配置
905
+ :type Voice: :class:`tencentcloud.trtc.v20190722.models.Voice`
906
+ :param _SdkAppId: TRTC的SdkAppId
907
+ :type SdkAppId: int
908
+ :param _AudioFormat: 文本转语音的输出音频的格式
909
+ :type AudioFormat: :class:`tencentcloud.trtc.v20190722.models.AudioFormat`
910
+ :param _Model: TTS的模型,当前固定为:flow_01_turbo
911
+ :type Model: str
912
+ :param _PronunciationDict: 多音字/生僻字发音纠正词典条目。指定特定词语在本次请求中使用的发音。
913
+ :type PronunciationDict: list of PronunciationDict
914
+ :param _AlignmentMode: 默认为0,0表示不生成字幕,1表示生成字幕
915
+ :type AlignmentMode: int
916
+ :param _LanguageCode: 需要合成的语言(ISO 639-1),默认自动识别,支持的语言如下: zh(中文) en(英文) yue(粤语) ja(日语) ko(韩语) ar(阿拉伯语) id(印尼语) th(泰语)
917
+ :type LanguageCode: str
918
+ """
919
+ self._Text = None
920
+ self._Voice = None
921
+ self._SdkAppId = None
922
+ self._AudioFormat = None
923
+ self._Model = None
924
+ self._PronunciationDict = None
925
+ self._AlignmentMode = None
926
+ self._LanguageCode = None
927
+
928
+ @property
929
+ def Text(self):
930
+ r"""需要转语音的文字内容,最大允许50000字符,注意 1汉字=2字符
931
+ :rtype: str
932
+ """
933
+ return self._Text
934
+
935
+ @Text.setter
936
+ def Text(self, Text):
937
+ self._Text = Text
938
+
939
+ @property
940
+ def Voice(self):
941
+ r"""文本转语音的声音配置
942
+ :rtype: :class:`tencentcloud.trtc.v20190722.models.Voice`
943
+ """
944
+ return self._Voice
945
+
946
+ @Voice.setter
947
+ def Voice(self, Voice):
948
+ self._Voice = Voice
949
+
950
+ @property
951
+ def SdkAppId(self):
952
+ r"""TRTC的SdkAppId
953
+ :rtype: int
954
+ """
955
+ return self._SdkAppId
956
+
957
+ @SdkAppId.setter
958
+ def SdkAppId(self, SdkAppId):
959
+ self._SdkAppId = SdkAppId
960
+
961
+ @property
962
+ def AudioFormat(self):
963
+ r"""文本转语音的输出音频的格式
964
+ :rtype: :class:`tencentcloud.trtc.v20190722.models.AudioFormat`
965
+ """
966
+ return self._AudioFormat
967
+
968
+ @AudioFormat.setter
969
+ def AudioFormat(self, AudioFormat):
970
+ self._AudioFormat = AudioFormat
971
+
972
+ @property
973
+ def Model(self):
974
+ r"""TTS的模型,当前固定为:flow_01_turbo
975
+ :rtype: str
976
+ """
977
+ return self._Model
978
+
979
+ @Model.setter
980
+ def Model(self, Model):
981
+ self._Model = Model
982
+
983
+ @property
984
+ def PronunciationDict(self):
985
+ r"""多音字/生僻字发音纠正词典条目。指定特定词语在本次请求中使用的发音。
986
+ :rtype: list of PronunciationDict
987
+ """
988
+ return self._PronunciationDict
989
+
990
+ @PronunciationDict.setter
991
+ def PronunciationDict(self, PronunciationDict):
992
+ self._PronunciationDict = PronunciationDict
993
+
994
+ @property
995
+ def AlignmentMode(self):
996
+ r"""默认为0,0表示不生成字幕,1表示生成字幕
997
+ :rtype: int
998
+ """
999
+ return self._AlignmentMode
1000
+
1001
+ @AlignmentMode.setter
1002
+ def AlignmentMode(self, AlignmentMode):
1003
+ self._AlignmentMode = AlignmentMode
1004
+
1005
+ @property
1006
+ def LanguageCode(self):
1007
+ r"""需要合成的语言(ISO 639-1),默认自动识别,支持的语言如下: zh(中文) en(英文) yue(粤语) ja(日语) ko(韩语) ar(阿拉伯语) id(印尼语) th(泰语)
1008
+ :rtype: str
1009
+ """
1010
+ return self._LanguageCode
1011
+
1012
+ @LanguageCode.setter
1013
+ def LanguageCode(self, LanguageCode):
1014
+ self._LanguageCode = LanguageCode
1015
+
1016
+
1017
+ def _deserialize(self, params):
1018
+ self._Text = params.get("Text")
1019
+ if params.get("Voice") is not None:
1020
+ self._Voice = Voice()
1021
+ self._Voice._deserialize(params.get("Voice"))
1022
+ self._SdkAppId = params.get("SdkAppId")
1023
+ if params.get("AudioFormat") is not None:
1024
+ self._AudioFormat = AudioFormat()
1025
+ self._AudioFormat._deserialize(params.get("AudioFormat"))
1026
+ self._Model = params.get("Model")
1027
+ if params.get("PronunciationDict") is not None:
1028
+ self._PronunciationDict = []
1029
+ for item in params.get("PronunciationDict"):
1030
+ obj = PronunciationDict()
1031
+ obj._deserialize(item)
1032
+ self._PronunciationDict.append(obj)
1033
+ self._AlignmentMode = params.get("AlignmentMode")
1034
+ self._LanguageCode = params.get("LanguageCode")
1035
+ memeber_set = set(params.keys())
1036
+ for name, value in vars(self).items():
1037
+ property_name = name[1:]
1038
+ if property_name in memeber_set:
1039
+ memeber_set.remove(property_name)
1040
+ if len(memeber_set) > 0:
1041
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
1042
+
1043
+
1044
+
1045
+ class AsyncTextToSpeechResponse(AbstractModel):
1046
+ r"""AsyncTextToSpeech返回参数结构体
1047
+
1048
+ """
1049
+
1050
+ def __init__(self):
1051
+ r"""
1052
+ :param _TaskId: 任务ID
1053
+ :type TaskId: str
1054
+ :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
1055
+ :type RequestId: str
1056
+ """
1057
+ self._TaskId = None
1058
+ self._RequestId = None
1059
+
1060
+ @property
1061
+ def TaskId(self):
1062
+ r"""任务ID
1063
+ :rtype: str
1064
+ """
1065
+ return self._TaskId
1066
+
1067
+ @TaskId.setter
1068
+ def TaskId(self, TaskId):
1069
+ self._TaskId = TaskId
1070
+
1071
+ @property
1072
+ def RequestId(self):
1073
+ r"""唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
1074
+ :rtype: str
1075
+ """
1076
+ return self._RequestId
1077
+
1078
+ @RequestId.setter
1079
+ def RequestId(self, RequestId):
1080
+ self._RequestId = RequestId
1081
+
1082
+
1083
+ def _deserialize(self, params):
1084
+ self._TaskId = params.get("TaskId")
1085
+ self._RequestId = params.get("RequestId")
1086
+
1087
+
763
1088
  class AudioEncode(AbstractModel):
764
1089
  r"""音频编码参数。
765
1090
 
@@ -938,6 +1263,9 @@ class AudioFormat(AbstractModel):
938
1263
  - TextToSpeech 非流式接口
939
1264
 
940
1265
  支持 pcm,wav,mp3, 默认: pcm
1266
+
1267
+ - AsyncTextToSpeech
1268
+ 支持pcm,mp3, 默认:mp3
941
1269
  :type Format: str
942
1270
  :param _SampleRate: 生成的音频采样率,默认24000
943
1271
  可选
@@ -962,6 +1290,9 @@ class AudioFormat(AbstractModel):
962
1290
  - TextToSpeech 非流式接口
963
1291
 
964
1292
  支持 pcm,wav,mp3, 默认: pcm
1293
+
1294
+ - AsyncTextToSpeech
1295
+ 支持pcm,mp3, 默认:mp3
965
1296
  :rtype: str
966
1297
  """
967
1298
  return self._Format
@@ -3856,6 +4187,123 @@ class DescribeAITranscriptionResponse(AbstractModel):
3856
4187
  self._RequestId = params.get("RequestId")
3857
4188
 
3858
4189
 
4190
+ class DescribeAsyncTextToSpeechRequest(AbstractModel):
4191
+ r"""DescribeAsyncTextToSpeech请求参数结构体
4192
+
4193
+ """
4194
+
4195
+ def __init__(self):
4196
+ r"""
4197
+ :param _TaskId: 任务ID
4198
+ :type TaskId: str
4199
+ """
4200
+ self._TaskId = None
4201
+
4202
+ @property
4203
+ def TaskId(self):
4204
+ r"""任务ID
4205
+ :rtype: str
4206
+ """
4207
+ return self._TaskId
4208
+
4209
+ @TaskId.setter
4210
+ def TaskId(self, TaskId):
4211
+ self._TaskId = TaskId
4212
+
4213
+
4214
+ def _deserialize(self, params):
4215
+ self._TaskId = params.get("TaskId")
4216
+ memeber_set = set(params.keys())
4217
+ for name, value in vars(self).items():
4218
+ property_name = name[1:]
4219
+ if property_name in memeber_set:
4220
+ memeber_set.remove(property_name)
4221
+ if len(memeber_set) > 0:
4222
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
4223
+
4224
+
4225
+
4226
+ class DescribeAsyncTextToSpeechResponse(AbstractModel):
4227
+ r"""DescribeAsyncTextToSpeech返回参数结构体
4228
+
4229
+ """
4230
+
4231
+ def __init__(self):
4232
+ r"""
4233
+ :param _Status: 任务状态
4234
+ - Processing,处理中
4235
+ - Success,任务成功
4236
+ - Failed,任务失败
4237
+ - Expired,任务过期
4238
+ :type Status: str
4239
+ :param _AudioDownloadUrl: 音频下载url
4240
+ :type AudioDownloadUrl: str
4241
+ :param _SubtitleDownloadUrl: 字幕下载url
4242
+ :type SubtitleDownloadUrl: str
4243
+ :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
4244
+ :type RequestId: str
4245
+ """
4246
+ self._Status = None
4247
+ self._AudioDownloadUrl = None
4248
+ self._SubtitleDownloadUrl = None
4249
+ self._RequestId = None
4250
+
4251
+ @property
4252
+ def Status(self):
4253
+ r"""任务状态
4254
+ - Processing,处理中
4255
+ - Success,任务成功
4256
+ - Failed,任务失败
4257
+ - Expired,任务过期
4258
+ :rtype: str
4259
+ """
4260
+ return self._Status
4261
+
4262
+ @Status.setter
4263
+ def Status(self, Status):
4264
+ self._Status = Status
4265
+
4266
+ @property
4267
+ def AudioDownloadUrl(self):
4268
+ r"""音频下载url
4269
+ :rtype: str
4270
+ """
4271
+ return self._AudioDownloadUrl
4272
+
4273
+ @AudioDownloadUrl.setter
4274
+ def AudioDownloadUrl(self, AudioDownloadUrl):
4275
+ self._AudioDownloadUrl = AudioDownloadUrl
4276
+
4277
+ @property
4278
+ def SubtitleDownloadUrl(self):
4279
+ r"""字幕下载url
4280
+ :rtype: str
4281
+ """
4282
+ return self._SubtitleDownloadUrl
4283
+
4284
+ @SubtitleDownloadUrl.setter
4285
+ def SubtitleDownloadUrl(self, SubtitleDownloadUrl):
4286
+ self._SubtitleDownloadUrl = SubtitleDownloadUrl
4287
+
4288
+ @property
4289
+ def RequestId(self):
4290
+ r"""唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
4291
+ :rtype: str
4292
+ """
4293
+ return self._RequestId
4294
+
4295
+ @RequestId.setter
4296
+ def RequestId(self, RequestId):
4297
+ self._RequestId = RequestId
4298
+
4299
+
4300
+ def _deserialize(self, params):
4301
+ self._Status = params.get("Status")
4302
+ self._AudioDownloadUrl = params.get("AudioDownloadUrl")
4303
+ self._SubtitleDownloadUrl = params.get("SubtitleDownloadUrl")
4304
+ self._RequestId = params.get("RequestId")
4305
+
4306
+
3859
4307
  class DescribeCallDetailInfoRequest(AbstractModel):
3860
4308
  r"""DescribeCallDetailInfo请求参数结构体
3861
4309
 
@@ -12182,6 +12630,57 @@ class PresetLayoutConfig(AbstractModel):
12182
12630
 
12183
12631
 
12184
12632
 
12633
+ class PronunciationDict(AbstractModel):
12634
+ r"""多音字/生僻字发音纠正词典条目。指定特定词语在本次请求中使用的发音。
12635
+
12636
+ """
12637
+
12638
+ def __init__(self):
12639
+ r"""
12640
+ :param _Word: 需要纠正发音的词语,前后空格自动去除。同一请求中若有重复词语,以最后一条为准。
12641
+ :type Word: str
12642
+ :param _Pronunciation: 目标发音,支持以下格式:<br>① 带声调数字的拼音(1=阴平,2=阳平,3=上声,4=去声,5=轻声),如 yin2 hang2;<br>② 拼音连写(无空格),如 yin2hang2;<br>③ 文字+拼音混写,如 银hang2;<br>④ 直接文本替换,会将原始文本替换为目标文本
12643
+ :type Pronunciation: str
12644
+ """
12645
+ self._Word = None
12646
+ self._Pronunciation = None
12647
+
12648
+ @property
12649
+ def Word(self):
12650
+ r"""需要纠正发音的词语,前后空格自动去除。同一请求中若有重复词语,以最后一条为准。
12651
+ :rtype: str
12652
+ """
12653
+ return self._Word
12654
+
12655
+ @Word.setter
12656
+ def Word(self, Word):
12657
+ self._Word = Word
12658
+
12659
+ @property
12660
+ def Pronunciation(self):
12661
+ r"""目标发音,支持以下格式:<br>① 带声调数字的拼音(1=阴平,2=阳平,3=上声,4=去声,5=轻声),如 yin2 hang2;<br>② 拼音连写(无空格),如 yin2hang2;<br>③ 文字+拼音混写,如 银hang2;<br>④ 直接文本替换,会将原始文本替换为目标文本
12662
+ :rtype: str
12663
+ """
12664
+ return self._Pronunciation
12665
+
12666
+ @Pronunciation.setter
12667
+ def Pronunciation(self, Pronunciation):
12668
+ self._Pronunciation = Pronunciation
12669
+
12670
+
12671
+ def _deserialize(self, params):
12672
+ self._Word = params.get("Word")
12673
+ self._Pronunciation = params.get("Pronunciation")
12674
+ memeber_set = set(params.keys())
12675
+ for name, value in vars(self).items():
12676
+ property_name = name[1:]
12677
+ if property_name in memeber_set:
12678
+ memeber_set.remove(property_name)
12679
+ if len(memeber_set) > 0:
12680
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
12681
+
12682
+
12683
+
12185
12684
  class PublishCdnParams(AbstractModel):
12186
12685
  r"""第三方CDN转推参数
12187
12686
 
@@ -17304,6 +17803,10 @@ class TextToSpeechRequest(AbstractModel):
17304
17803
  - id(印尼语)
17305
17804
  - th(泰语)
17306
17805
  :type Language: str
17806
+ :param _PronunciationDict: 多音字/生僻字发音纠正词典条目。指定特定词语在本次请求中使用的发音。
17807
+ :type PronunciationDict: list of PronunciationDict
17808
+ :param _AlignmentMode: 默认为0,0表示不生成字幕,1表示生成字幕
17809
+ :type AlignmentMode: int
17307
17810
  """
17308
17811
  self._Text = None
17309
17812
  self._Voice = None
@@ -17312,6 +17815,8 @@ class TextToSpeechRequest(AbstractModel):
17312
17815
  self._APIKey = None
17313
17816
  self._Model = None
17314
17817
  self._Language = None
17818
+ self._PronunciationDict = None
17819
+ self._AlignmentMode = None
17315
17820
 
17316
17821
  @property
17317
17822
  def Text(self):
@@ -17402,6 +17907,28 @@ class TextToSpeechRequest(AbstractModel):
17402
17907
  def Language(self, Language):
17403
17908
  self._Language = Language
17404
17909
 
17910
+ @property
17911
+ def PronunciationDict(self):
17912
+ r"""多音字/生僻字发音纠正词典条目。指定特定词语在本次请求中使用的发音。
17913
+ :rtype: list of PronunciationDict
17914
+ """
17915
+ return self._PronunciationDict
17916
+
17917
+ @PronunciationDict.setter
17918
+ def PronunciationDict(self, PronunciationDict):
17919
+ self._PronunciationDict = PronunciationDict
17920
+
17921
+ @property
17922
+ def AlignmentMode(self):
17923
+ r"""默认为0,0表示不生成字幕,1表示生成字幕
17924
+ :rtype: int
17925
+ """
17926
+ return self._AlignmentMode
17927
+
17928
+ @AlignmentMode.setter
17929
+ def AlignmentMode(self, AlignmentMode):
17930
+ self._AlignmentMode = AlignmentMode
17931
+
17405
17932
 
17406
17933
  def _deserialize(self, params):
17407
17934
  self._Text = params.get("Text")
@@ -17415,6 +17942,13 @@ class TextToSpeechRequest(AbstractModel):
17415
17942
  self._APIKey = params.get("APIKey")
17416
17943
  self._Model = params.get("Model")
17417
17944
  self._Language = params.get("Language")
17945
+ if params.get("PronunciationDict") is not None:
17946
+ self._PronunciationDict = []
17947
+ for item in params.get("PronunciationDict"):
17948
+ obj = PronunciationDict()
17949
+ obj._deserialize(item)
17950
+ self._PronunciationDict.append(obj)
17951
+ self._AlignmentMode = params.get("AlignmentMode")
17418
17952
  memeber_set = set(params.keys())
17419
17953
  for name, value in vars(self).items():
17420
17954
  property_name = name[1:]
@@ -17434,10 +17968,13 @@ class TextToSpeechResponse(AbstractModel):
17434
17968
  r"""
17435
17969
  :param _Audio: Base64编码的音频数据
17436
17970
  :type Audio: str
17971
+ :param _Alignments: 字幕对齐数据
17972
+ :type Alignments: list of AlignmentItem
17437
17973
  :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
17438
17974
  :type RequestId: str
17439
17975
  """
17440
17976
  self._Audio = None
17977
+ self._Alignments = None
17441
17978
  self._RequestId = None
17442
17979
 
17443
17980
  @property
@@ -17451,6 +17988,17 @@ class TextToSpeechResponse(AbstractModel):
17451
17988
  def Audio(self, Audio):
17452
17989
  self._Audio = Audio
17453
17990
 
17991
+ @property
17992
+ def Alignments(self):
17993
+ r"""字幕对齐数据
17994
+ :rtype: list of AlignmentItem
17995
+ """
17996
+ return self._Alignments
17997
+
17998
+ @Alignments.setter
17999
+ def Alignments(self, Alignments):
18000
+ self._Alignments = Alignments
18001
+
17454
18002
  @property
17455
18003
  def RequestId(self):
17456
18004
  r"""唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
@@ -17465,6 +18013,12 @@ class TextToSpeechResponse(AbstractModel):
17465
18013
 
17466
18014
  def _deserialize(self, params):
17467
18015
  self._Audio = params.get("Audio")
18016
+ if params.get("Alignments") is not None:
18017
+ self._Alignments = []
18018
+ for item in params.get("Alignments"):
18019
+ obj = AlignmentItem()
18020
+ obj._deserialize(item)
18021
+ self._Alignments.append(obj)
17468
18022
  self._RequestId = params.get("RequestId")
17469
18023
 
17470
18024
 
@@ -17498,6 +18052,10 @@ class TextToSpeechSSERequest(AbstractModel):
17498
18052
  - th(泰语)
17499
18053
 
17500
18054
  :type Language: str
18055
+ :param _PronunciationDict: 多音字/生僻字发音纠正词典条目。指定特定词语在本次请求中使用的发音。
18056
+ :type PronunciationDict: list of PronunciationDict
18057
+ :param _AlignmentMode: 默认为0,0表示不生成字幕,1表示生成字幕
18058
+ :type AlignmentMode: int
17501
18059
  """
17502
18060
  self._Text = None
17503
18061
  self._Voice = None
@@ -17506,6 +18064,8 @@ class TextToSpeechSSERequest(AbstractModel):
17506
18064
  self._APIKey = None
17507
18065
  self._Model = None
17508
18066
  self._Language = None
18067
+ self._PronunciationDict = None
18068
+ self._AlignmentMode = None
17509
18069
 
17510
18070
  @property
17511
18071
  def Text(self):
@@ -17597,6 +18157,28 @@ class TextToSpeechSSERequest(AbstractModel):
17597
18157
  def Language(self, Language):
17598
18158
  self._Language = Language
17599
18159
 
18160
+ @property
18161
+ def PronunciationDict(self):
18162
+ r"""多音字/生僻字发音纠正词典条目。指定特定词语在本次请求中使用的发音。
18163
+ :rtype: list of PronunciationDict
18164
+ """
18165
+ return self._PronunciationDict
18166
+
18167
+ @PronunciationDict.setter
18168
+ def PronunciationDict(self, PronunciationDict):
18169
+ self._PronunciationDict = PronunciationDict
18170
+
18171
+ @property
18172
+ def AlignmentMode(self):
18173
+ r"""默认为0,0表示不生成字幕,1表示生成字幕
18174
+ :rtype: int
18175
+ """
18176
+ return self._AlignmentMode
18177
+
18178
+ @AlignmentMode.setter
18179
+ def AlignmentMode(self, AlignmentMode):
18180
+ self._AlignmentMode = AlignmentMode
18181
+
17600
18182
 
17601
18183
  def _deserialize(self, params):
17602
18184
  self._Text = params.get("Text")
@@ -17610,6 +18192,13 @@ class TextToSpeechSSERequest(AbstractModel):
17610
18192
  self._APIKey = params.get("APIKey")
17611
18193
  self._Model = params.get("Model")
17612
18194
  self._Language = params.get("Language")
18195
+ if params.get("PronunciationDict") is not None:
18196
+ self._PronunciationDict = []
18197
+ for item in params.get("PronunciationDict"):
18198
+ obj = PronunciationDict()
18199
+ obj._deserialize(item)
18200
+ self._PronunciationDict.append(obj)
18201
+ self._AlignmentMode = params.get("AlignmentMode")
17613
18202
  memeber_set = set(params.keys())
17614
18203
  for name, value in vars(self).items():
17615
18204
  property_name = name[1:]
@@ -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.73
3
+ Version: 3.1.85
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.73
18
+ Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.85
19
19
 
20
20
  ============================
21
21
  Tencent Cloud SDK for Python
@@ -0,0 +1 @@
1
+ tencentcloud-sdk-python-common<4.0.0,>=3.1.85
@@ -1 +0,0 @@
1
- tencentcloud-sdk-python-common<4.0.0,>=3.1.73