tencentcloud-sdk-python-tts 3.0.1459__tar.gz → 3.1.7__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 (19) hide show
  1. tencentcloud_sdk_python_tts-3.1.7/PKG-INFO +46 -0
  2. {tencentcloud-sdk-python-tts-3.0.1459 → tencentcloud_sdk_python_tts-3.1.7}/setup.py +2 -1
  3. {tencentcloud-sdk-python-tts-3.0.1459 → tencentcloud_sdk_python_tts-3.1.7}/tencentcloud/__init__.py +1 -1
  4. {tencentcloud-sdk-python-tts-3.0.1459 → tencentcloud_sdk_python_tts-3.1.7}/tencentcloud/tts/v20190823/models.py +8 -8
  5. {tencentcloud-sdk-python-tts-3.0.1459 → tencentcloud_sdk_python_tts-3.1.7}/tencentcloud/tts/v20190823/tts_client.py +1 -1
  6. tencentcloud_sdk_python_tts-3.1.7/tencentcloud/tts/v20190823/tts_client_async.py +107 -0
  7. tencentcloud_sdk_python_tts-3.1.7/tencentcloud_sdk_python_tts.egg-info/PKG-INFO +46 -0
  8. {tencentcloud-sdk-python-tts-3.0.1459 → tencentcloud_sdk_python_tts-3.1.7}/tencentcloud_sdk_python_tts.egg-info/SOURCES.txt +1 -0
  9. tencentcloud_sdk_python_tts-3.1.7/tencentcloud_sdk_python_tts.egg-info/requires.txt +1 -0
  10. tencentcloud-sdk-python-tts-3.0.1459/PKG-INFO +0 -45
  11. tencentcloud-sdk-python-tts-3.0.1459/tencentcloud_sdk_python_tts.egg-info/PKG-INFO +0 -45
  12. tencentcloud-sdk-python-tts-3.0.1459/tencentcloud_sdk_python_tts.egg-info/requires.txt +0 -1
  13. {tencentcloud-sdk-python-tts-3.0.1459 → tencentcloud_sdk_python_tts-3.1.7}/README.rst +0 -0
  14. {tencentcloud-sdk-python-tts-3.0.1459 → tencentcloud_sdk_python_tts-3.1.7}/setup.cfg +0 -0
  15. {tencentcloud-sdk-python-tts-3.0.1459 → tencentcloud_sdk_python_tts-3.1.7}/tencentcloud/tts/__init__.py +0 -0
  16. {tencentcloud-sdk-python-tts-3.0.1459 → tencentcloud_sdk_python_tts-3.1.7}/tencentcloud/tts/v20190823/__init__.py +0 -0
  17. {tencentcloud-sdk-python-tts-3.0.1459 → tencentcloud_sdk_python_tts-3.1.7}/tencentcloud/tts/v20190823/errorcodes.py +0 -0
  18. {tencentcloud-sdk-python-tts-3.0.1459 → tencentcloud_sdk_python_tts-3.1.7}/tencentcloud_sdk_python_tts.egg-info/dependency_links.txt +0 -0
  19. {tencentcloud-sdk-python-tts-3.0.1459 → tencentcloud_sdk_python_tts-3.1.7}/tencentcloud_sdk_python_tts.egg-info/top_level.txt +0 -0
@@ -0,0 +1,46 @@
1
+ Metadata-Version: 2.1
2
+ Name: tencentcloud-sdk-python-tts
3
+ Version: 3.1.7
4
+ Summary: Tencent Cloud Tts SDK for Python
5
+ Home-page: https://github.com/TencentCloud/tencentcloud-sdk-python
6
+ Author: Tencent Cloud
7
+ Maintainer-email: tencentcloudapi@tencent.com
8
+ License: Apache License 2.0
9
+ Platform: any
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: Apache Software License
13
+ Classifier: Programming Language :: Python
14
+ Classifier: Programming Language :: Python :: 2.7
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.6
17
+ Classifier: Programming Language :: Python :: 3.7
18
+ Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.7
19
+
20
+ ============================
21
+ Tencent Cloud SDK for Python
22
+ ============================
23
+
24
+ Tencent Cloud Python Tts SDK is the official software development kit, which allows Python developers to write software that makes use of Tencent Cloud services like CVM and CBS.
25
+ The SDK works on Python versions:
26
+
27
+ * 2.7 and greater, including 3.x
28
+
29
+ Quick Start
30
+ -----------
31
+
32
+ First, install the library:
33
+
34
+ .. code-block:: sh
35
+
36
+ $ pip install tencentcloud-sdk-python-common
37
+ $ pip install tencentcloud-sdk-python-tts
38
+
39
+ or download source code from github and install:
40
+
41
+ .. code-block:: sh
42
+
43
+ $ git clone https://github.com/tencentcloud/tencentcloud-sdk-python.git
44
+ $ cd tencentcloud-sdk-python
45
+ $ python package.py --components common tts
46
+
@@ -8,7 +8,8 @@ ROOT = os.path.dirname(__file__)
8
8
 
9
9
  setup(
10
10
  name='tencentcloud-sdk-python-tts',
11
- install_requires=["tencentcloud-sdk-python-common>=3.0.1459,<4.0.0"],
11
+ install_requires=["tencentcloud-sdk-python-common>=3.1.7,<4.0.0"],
12
+
12
13
  version=tencentcloud.__version__,
13
14
  description='Tencent Cloud Tts SDK for Python',
14
15
  long_description=open('README.rst').read(),
@@ -14,4 +14,4 @@
14
14
  # limitations under the License.
15
15
 
16
16
 
17
- __version__ = '3.0.1459'
17
+ __version__ = '3.1.7'
@@ -35,9 +35,9 @@ class CreateTtsTaskRequest(AbstractModel):
35
35
  :type ProjectId: int
36
36
  :param _ModelType: 模型类型,1-默认模型。
37
37
  :type ModelType: int
38
- :param _VoiceType: 音色 ID,包括标准音色与精品音色,精品音色拟真度更高,价格不同于标准音色,请参见[购买指南](https://cloud.tencent.com/document/product/1073/34112)。完整的音色 ID 列表请参见[音色列表](https://cloud.tencent.com/document/product/1073/92668)。
38
+ :param _VoiceType: 音色 ID,价格请参见[购买指南](https://cloud.tencent.com/document/product/1073/34112)。完整的音色 ID 列表请参见[音色列表](https://cloud.tencent.com/document/product/1073/92668)。
39
39
  :type VoiceType: int
40
- :param _PrimaryLanguage: 主语言类型:<li>1-中文(默认)</li><li>2-英文</li><li>3-日文</li>
40
+ :param _PrimaryLanguage: 主语言类型:<li>1-中文(默认)</li><li>2-英文</li>
41
41
  :type PrimaryLanguage: int
42
42
  :param _SampleRate: 音频采样率:<li>16000:16k(默认)</li><li>8000:8k</li>
43
43
  :type SampleRate: int
@@ -126,7 +126,7 @@ class CreateTtsTaskRequest(AbstractModel):
126
126
 
127
127
  @property
128
128
  def VoiceType(self):
129
- r"""音色 ID,包括标准音色与精品音色,精品音色拟真度更高,价格不同于标准音色,请参见[购买指南](https://cloud.tencent.com/document/product/1073/34112)。完整的音色 ID 列表请参见[音色列表](https://cloud.tencent.com/document/product/1073/92668)。
129
+ r"""音色 ID,价格请参见[购买指南](https://cloud.tencent.com/document/product/1073/34112)。完整的音色 ID 列表请参见[音色列表](https://cloud.tencent.com/document/product/1073/92668)。
130
130
  :rtype: int
131
131
  """
132
132
  return self._VoiceType
@@ -137,7 +137,7 @@ class CreateTtsTaskRequest(AbstractModel):
137
137
 
138
138
  @property
139
139
  def PrimaryLanguage(self):
140
- r"""主语言类型:<li>1-中文(默认)</li><li>2-英文</li><li>3-日文</li>
140
+ r"""主语言类型:<li>1-中文(默认)</li><li>2-英文</li>
141
141
  :rtype: int
142
142
  """
143
143
  return self._PrimaryLanguage
@@ -660,11 +660,11 @@ class TextToVoiceRequest(AbstractModel):
660
660
  :type ProjectId: int
661
661
  :param _ModelType: 模型类型,1-默认模型。
662
662
  :type ModelType: int
663
- :param _VoiceType: 音色 ID,包括标准音色、精品音色、大模型音色与基础版复刻音色。不同音色价格有差异,详情请参见[购买指南](https://cloud.tencent.com/document/product/1073/34112)。完整的音色 ID 列表请参见[音色列表](https://cloud.tencent.com/document/product/1073/92668)。<br>若使用一句话版声音复刻,请填入固定值“200000000”。
663
+ :param _VoiceType: 音色 ID,包括精品音色、大模型音色与基础版复刻音色。不同音色价格有差异,详情请参见[购买指南](https://cloud.tencent.com/document/product/1073/34112)。完整的音色 ID 列表请参见[音色列表](https://cloud.tencent.com/document/product/1073/92668)。<br>若使用一句话版声音复刻,请填入固定值“200000000”。
664
664
  :type VoiceType: int
665
665
  :param _FastVoiceType: 一句话版声音复刻音色ID,使用一句话版声音复刻音色时需填写。
666
666
  :type FastVoiceType: str
667
- :param _PrimaryLanguage: 主语言类型:<li>1-中文(默认)</li><li>2-英文</li><li>3-日文</li>
667
+ :param _PrimaryLanguage: 主语言类型:<li>1-中文(默认)</li><li>2-英文</li>
668
668
  :type PrimaryLanguage: int
669
669
  :param _SampleRate: 音频采样率:
670
670
  <li>24000:24k(部分音色支持,请参见[音色列表](https://cloud.tencent.com/document/product/1073/92668))</li>
@@ -768,7 +768,7 @@ class TextToVoiceRequest(AbstractModel):
768
768
 
769
769
  @property
770
770
  def VoiceType(self):
771
- r"""音色 ID,包括标准音色、精品音色、大模型音色与基础版复刻音色。不同音色价格有差异,详情请参见[购买指南](https://cloud.tencent.com/document/product/1073/34112)。完整的音色 ID 列表请参见[音色列表](https://cloud.tencent.com/document/product/1073/92668)。<br>若使用一句话版声音复刻,请填入固定值“200000000”。
771
+ r"""音色 ID,包括精品音色、大模型音色与基础版复刻音色。不同音色价格有差异,详情请参见[购买指南](https://cloud.tencent.com/document/product/1073/34112)。完整的音色 ID 列表请参见[音色列表](https://cloud.tencent.com/document/product/1073/92668)。<br>若使用一句话版声音复刻,请填入固定值“200000000”。
772
772
  :rtype: int
773
773
  """
774
774
  return self._VoiceType
@@ -790,7 +790,7 @@ class TextToVoiceRequest(AbstractModel):
790
790
 
791
791
  @property
792
792
  def PrimaryLanguage(self):
793
- r"""主语言类型:<li>1-中文(默认)</li><li>2-英文</li><li>3-日文</li>
793
+ r"""主语言类型:<li>1-中文(默认)</li><li>2-英文</li>
794
794
  :rtype: int
795
795
  """
796
796
  return self._PrimaryLanguage
@@ -97,7 +97,7 @@ class TtsClient(AbstractClient):
97
97
  腾讯TTS技术可以应用到很多场景,比如,移动APP语音播报新闻;智能设备语音提醒;依靠网上现有节目或少量录音,快速合成明星语音,降低邀约成本;支持车载导航语音合成的个性化语音播报。
98
98
  基础合成支持 SSML,语法详见 [SSML 标记语言](https://cloud.tencent.com/document/product/1073/49575)。
99
99
  默认接口请求频率限制:
100
- 精品音色和标准音色:默认20并发
100
+ 精品音色:默认20并发
101
101
  大模型音色:默认20并发
102
102
  超自然大模型音色:暂不支持
103
103
  一句话复刻音色:默认10并发
@@ -0,0 +1,107 @@
1
+ # -*- coding: utf8 -*-
2
+ # Copyright (c) 2017-2025 Tencent. All Rights Reserved.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+
17
+
18
+ from tencentcloud.common.abstract_client_async import AbstractClient
19
+ from tencentcloud.tts.v20190823 import models
20
+ from typing import Dict
21
+
22
+
23
+ class TtsClient(AbstractClient):
24
+ _apiVersion = '2019-08-23'
25
+ _endpoint = 'tts.tencentcloudapi.com'
26
+ _service = 'tts'
27
+
28
+ async def CreateTtsTask(
29
+ self,
30
+ request: models.CreateTtsTaskRequest,
31
+ opts: Dict = None,
32
+ ) -> models.CreateTtsTaskResponse:
33
+ """
34
+ 本接口服务对10万字符以内的文本进行语音合成,异步返回音频结果。满足一次性合成较长文本的客户需求,如阅读播报、新闻媒体等场景。
35
+
36
+ <li>支持音频格式:mp3,wav,pcm</li>
37
+ <li>支持音频采样率:16000 Hz, 8000 Hz</li>
38
+ <li>支持中文普通话、英文、中英文混读、粤语合成</li>
39
+ <li>支持语速、音量设置</li>
40
+ <li>支持回调或轮询的方式获取结果,结果获取请参考 长文本语音合成结果查询。</li>
41
+ <li>提交长文本语音合成请求后,合成结果在3小时内完成。请注意:30分钟内提交任务超过 100 万字符或 200 条任务除外。</li>
42
+ <li>音频文件在服务端可保存24小时,请及时下载。</li>
43
+ <p></p>
44
+
45
+ 长文本合成支持 SSML,语法详见 [SSML 标记语言](https://cloud.tencent.com/document/product/1073/49575),使用时需满足如下使用规范:
46
+ <li>使用 SSML 标签,需置于 speak 闭合标签内部;</li>
47
+ <li>合成文本可包含多组 speak 闭合标签,且无数量限制;</li>
48
+ <li>每个 speak 闭合标签内部,字符数不超过 150 字(标签字符本身不计算在内);</li>
49
+ <li>每个 speak 闭合标签内部,使用 break 标签数目最大为 10 个。如需要使用更多,可拆解到多个 speak 标签中;</li>
50
+
51
+ <p></p>
52
+ """
53
+
54
+ kwargs = {}
55
+ kwargs["action"] = "CreateTtsTask"
56
+ kwargs["params"] = request._serialize()
57
+ kwargs["resp_cls"] = models.CreateTtsTaskResponse
58
+ kwargs["headers"] = request.headers
59
+ kwargs["opts"] = opts or {}
60
+
61
+ return await self.call_and_deserialize(**kwargs)
62
+
63
+ async def DescribeTtsTaskStatus(
64
+ self,
65
+ request: models.DescribeTtsTaskStatusRequest,
66
+ opts: Dict = None,
67
+ ) -> models.DescribeTtsTaskStatusResponse:
68
+ """
69
+ 在调用长文本语音合成请求接口后,有回调和轮询两种方式获取识别结果。
70
+
71
+ <li>当采用回调方式时,合成完毕后会将结果通过 POST 请求的形式通知到用户在请求时填写的回调 URL,具体请参见 长文本语音合成结果查询 。</li>
72
+ <li>当采用轮询方式时,需要主动提交任务ID来轮询识别结果,共有任务成功、等待、执行中和失败四种结果,具体信息请参见下文说明。</li>
73
+ """
74
+
75
+ kwargs = {}
76
+ kwargs["action"] = "DescribeTtsTaskStatus"
77
+ kwargs["params"] = request._serialize()
78
+ kwargs["resp_cls"] = models.DescribeTtsTaskStatusResponse
79
+ kwargs["headers"] = request.headers
80
+ kwargs["opts"] = opts or {}
81
+
82
+ return await self.call_and_deserialize(**kwargs)
83
+
84
+ async def TextToVoice(
85
+ self,
86
+ request: models.TextToVoiceRequest,
87
+ opts: Dict = None,
88
+ ) -> models.TextToVoiceResponse:
89
+ """
90
+ 腾讯云语音合成技术(TTS)可以将任意文本转化为语音,实现让机器和应用张口说话。
91
+ 腾讯TTS技术可以应用到很多场景,比如,移动APP语音播报新闻;智能设备语音提醒;依靠网上现有节目或少量录音,快速合成明星语音,降低邀约成本;支持车载导航语音合成的个性化语音播报。
92
+ 基础合成支持 SSML,语法详见 [SSML 标记语言](https://cloud.tencent.com/document/product/1073/49575)。
93
+ 默认接口请求频率限制:
94
+ 精品音色:默认20并发
95
+ 大模型音色:默认20并发
96
+ 超自然大模型音色:暂不支持
97
+ 一句话复刻音色:默认10并发
98
+ """
99
+
100
+ kwargs = {}
101
+ kwargs["action"] = "TextToVoice"
102
+ kwargs["params"] = request._serialize()
103
+ kwargs["resp_cls"] = models.TextToVoiceResponse
104
+ kwargs["headers"] = request.headers
105
+ kwargs["opts"] = opts or {}
106
+
107
+ return await self.call_and_deserialize(**kwargs)
@@ -0,0 +1,46 @@
1
+ Metadata-Version: 2.1
2
+ Name: tencentcloud-sdk-python-tts
3
+ Version: 3.1.7
4
+ Summary: Tencent Cloud Tts SDK for Python
5
+ Home-page: https://github.com/TencentCloud/tencentcloud-sdk-python
6
+ Author: Tencent Cloud
7
+ Maintainer-email: tencentcloudapi@tencent.com
8
+ License: Apache License 2.0
9
+ Platform: any
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: Apache Software License
13
+ Classifier: Programming Language :: Python
14
+ Classifier: Programming Language :: Python :: 2.7
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.6
17
+ Classifier: Programming Language :: Python :: 3.7
18
+ Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.7
19
+
20
+ ============================
21
+ Tencent Cloud SDK for Python
22
+ ============================
23
+
24
+ Tencent Cloud Python Tts SDK is the official software development kit, which allows Python developers to write software that makes use of Tencent Cloud services like CVM and CBS.
25
+ The SDK works on Python versions:
26
+
27
+ * 2.7 and greater, including 3.x
28
+
29
+ Quick Start
30
+ -----------
31
+
32
+ First, install the library:
33
+
34
+ .. code-block:: sh
35
+
36
+ $ pip install tencentcloud-sdk-python-common
37
+ $ pip install tencentcloud-sdk-python-tts
38
+
39
+ or download source code from github and install:
40
+
41
+ .. code-block:: sh
42
+
43
+ $ git clone https://github.com/tencentcloud/tencentcloud-sdk-python.git
44
+ $ cd tencentcloud-sdk-python
45
+ $ python package.py --components common tts
46
+
@@ -7,6 +7,7 @@ tencentcloud/tts/v20190823/__init__.py
7
7
  tencentcloud/tts/v20190823/errorcodes.py
8
8
  tencentcloud/tts/v20190823/models.py
9
9
  tencentcloud/tts/v20190823/tts_client.py
10
+ tencentcloud/tts/v20190823/tts_client_async.py
10
11
  tencentcloud_sdk_python_tts.egg-info/PKG-INFO
11
12
  tencentcloud_sdk_python_tts.egg-info/SOURCES.txt
12
13
  tencentcloud_sdk_python_tts.egg-info/dependency_links.txt
@@ -0,0 +1 @@
1
+ tencentcloud-sdk-python-common<4.0.0,>=3.1.7
@@ -1,45 +0,0 @@
1
- Metadata-Version: 1.2
2
- Name: tencentcloud-sdk-python-tts
3
- Version: 3.0.1459
4
- Summary: Tencent Cloud Tts SDK for Python
5
- Home-page: https://github.com/TencentCloud/tencentcloud-sdk-python
6
- Author: Tencent Cloud
7
- Maintainer-email: tencentcloudapi@tencent.com
8
- License: Apache License 2.0
9
- Description: ============================
10
- Tencent Cloud SDK for Python
11
- ============================
12
-
13
- Tencent Cloud Python Tts SDK is the official software development kit, which allows Python developers to write software that makes use of Tencent Cloud services like CVM and CBS.
14
- The SDK works on Python versions:
15
-
16
- * 2.7 and greater, including 3.x
17
-
18
- Quick Start
19
- -----------
20
-
21
- First, install the library:
22
-
23
- .. code-block:: sh
24
-
25
- $ pip install tencentcloud-sdk-python-common
26
- $ pip install tencentcloud-sdk-python-tts
27
-
28
- or download source code from github and install:
29
-
30
- .. code-block:: sh
31
-
32
- $ git clone https://github.com/tencentcloud/tencentcloud-sdk-python.git
33
- $ cd tencentcloud-sdk-python
34
- $ python package.py --components common tts
35
-
36
-
37
- Platform: any
38
- Classifier: Development Status :: 5 - Production/Stable
39
- Classifier: Intended Audience :: Developers
40
- Classifier: License :: OSI Approved :: Apache Software License
41
- Classifier: Programming Language :: Python
42
- Classifier: Programming Language :: Python :: 2.7
43
- Classifier: Programming Language :: Python :: 3
44
- Classifier: Programming Language :: Python :: 3.6
45
- Classifier: Programming Language :: Python :: 3.7
@@ -1,45 +0,0 @@
1
- Metadata-Version: 1.2
2
- Name: tencentcloud-sdk-python-tts
3
- Version: 3.0.1459
4
- Summary: Tencent Cloud Tts SDK for Python
5
- Home-page: https://github.com/TencentCloud/tencentcloud-sdk-python
6
- Author: Tencent Cloud
7
- Maintainer-email: tencentcloudapi@tencent.com
8
- License: Apache License 2.0
9
- Description: ============================
10
- Tencent Cloud SDK for Python
11
- ============================
12
-
13
- Tencent Cloud Python Tts SDK is the official software development kit, which allows Python developers to write software that makes use of Tencent Cloud services like CVM and CBS.
14
- The SDK works on Python versions:
15
-
16
- * 2.7 and greater, including 3.x
17
-
18
- Quick Start
19
- -----------
20
-
21
- First, install the library:
22
-
23
- .. code-block:: sh
24
-
25
- $ pip install tencentcloud-sdk-python-common
26
- $ pip install tencentcloud-sdk-python-tts
27
-
28
- or download source code from github and install:
29
-
30
- .. code-block:: sh
31
-
32
- $ git clone https://github.com/tencentcloud/tencentcloud-sdk-python.git
33
- $ cd tencentcloud-sdk-python
34
- $ python package.py --components common tts
35
-
36
-
37
- Platform: any
38
- Classifier: Development Status :: 5 - Production/Stable
39
- Classifier: Intended Audience :: Developers
40
- Classifier: License :: OSI Approved :: Apache Software License
41
- Classifier: Programming Language :: Python
42
- Classifier: Programming Language :: Python :: 2.7
43
- Classifier: Programming Language :: Python :: 3
44
- Classifier: Programming Language :: Python :: 3.6
45
- Classifier: Programming Language :: Python :: 3.7
@@ -1 +0,0 @@
1
- tencentcloud-sdk-python-common<4.0.0,>=3.0.1459