typecast-python 0.3.8__tar.gz → 0.3.9__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. {typecast_python-0.3.8 → typecast_python-0.3.9}/PKG-INFO +14 -10
  2. {typecast_python-0.3.8 → typecast_python-0.3.9}/README.md +1 -1
  3. {typecast_python-0.3.8 → typecast_python-0.3.9}/pyproject.toml +17 -13
  4. {typecast_python-0.3.8 → typecast_python-0.3.9}/src/typecast/async_client.py +5 -2
  5. {typecast_python-0.3.8 → typecast_python-0.3.9}/src/typecast/client.py +2 -0
  6. {typecast_python-0.3.8 → typecast_python-0.3.9}/src/typecast/models/tts.py +6 -4
  7. {typecast_python-0.3.8 → typecast_python-0.3.9}/src/typecast/models/voices.py +7 -5
  8. {typecast_python-0.3.8 → typecast_python-0.3.9}/.gitignore +0 -0
  9. {typecast_python-0.3.8 → typecast_python-0.3.9}/LICENSE +0 -0
  10. {typecast_python-0.3.8 → typecast_python-0.3.9}/src/typecast/__init__.py +0 -0
  11. {typecast_python-0.3.8 → typecast_python-0.3.9}/src/typecast/_user_agent.py +0 -0
  12. {typecast_python-0.3.8 → typecast_python-0.3.9}/src/typecast/_voice_clone.py +0 -0
  13. {typecast_python-0.3.8 → typecast_python-0.3.9}/src/typecast/composer.py +0 -0
  14. {typecast_python-0.3.8 → typecast_python-0.3.9}/src/typecast/conf.py +0 -0
  15. {typecast_python-0.3.8 → typecast_python-0.3.9}/src/typecast/exceptions.py +0 -0
  16. {typecast_python-0.3.8 → typecast_python-0.3.9}/src/typecast/models/__init__.py +0 -0
  17. {typecast_python-0.3.8 → typecast_python-0.3.9}/src/typecast/models/error.py +0 -0
  18. {typecast_python-0.3.8 → typecast_python-0.3.9}/src/typecast/models/subscription.py +0 -0
  19. {typecast_python-0.3.8 → typecast_python-0.3.9}/src/typecast/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: typecast-python
3
- Version: 0.3.8
3
+ Version: 0.3.9
4
4
  Summary: Official Typecast Python SDK - Convert text to lifelike speech using AI-powered voices
5
5
  Project-URL: Homepage, https://typecast.ai
6
6
  Project-URL: Documentation, https://typecast.ai/docs/overview
@@ -217,26 +217,30 @@ Classifier: Intended Audience :: Developers
217
217
  Classifier: License :: OSI Approved :: Apache Software License
218
218
  Classifier: Operating System :: OS Independent
219
219
  Classifier: Programming Language :: Python :: 3
220
+ Classifier: Programming Language :: Python :: 3.8
221
+ Classifier: Programming Language :: Python :: 3.9
222
+ Classifier: Programming Language :: Python :: 3.10
220
223
  Classifier: Programming Language :: Python :: 3.11
221
224
  Classifier: Programming Language :: Python :: 3.12
222
225
  Classifier: Programming Language :: Python :: 3.13
226
+ Classifier: Programming Language :: Python :: 3.14
223
227
  Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
224
228
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
225
- Requires-Python: >=3.11
226
- Requires-Dist: aiohttp>=3.14.0
229
+ Requires-Python: <3.15,>=3.8
230
+ Requires-Dist: aiohttp>=3.9.0
227
231
  Requires-Dist: pydantic>=2.0.0
228
232
  Requires-Dist: requests>=2.28.0
229
233
  Requires-Dist: typing-extensions>=4.0.0
230
234
  Provides-Extra: dev
231
235
  Requires-Dist: aioresponses>=0.7.6; extra == 'dev'
232
- Requires-Dist: black>=23.0.0; extra == 'dev'
233
- Requires-Dist: flake8>=6.0.0; extra == 'dev'
236
+ Requires-Dist: black<25.0.0,>=23.0.0; extra == 'dev'
237
+ Requires-Dist: flake8<6.0.0,>=5.0.0; extra == 'dev'
234
238
  Requires-Dist: isort>=5.0.0; extra == 'dev'
235
- Requires-Dist: mypy>=1.0.0; extra == 'dev'
236
- Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
237
- Requires-Dist: pytest-cov>=7.0.0; extra == 'dev'
239
+ Requires-Dist: mypy<1.11.0,>=1.0.0; extra == 'dev'
240
+ Requires-Dist: pytest-asyncio<1.0.0,>=0.21.0; extra == 'dev'
241
+ Requires-Dist: pytest-cov<6.0.0,>=5.0.0; extra == 'dev'
238
242
  Requires-Dist: pytest-mock>=3.14.0; extra == 'dev'
239
- Requires-Dist: pytest>=7.0.0; extra == 'dev'
243
+ Requires-Dist: pytest<9.0.0,>=7.0.0; extra == 'dev'
240
244
  Description-Content-Type: text/markdown
241
245
 
242
246
  <div align="center">
@@ -250,7 +254,7 @@ Convert text to lifelike speech using AI-powered voices
250
254
  [![PyPI version](https://img.shields.io/pypi/v/typecast-python.svg?style=flat-square)](https://pypi.org/project/typecast-python/)
251
255
  [![coverage](https://img.shields.io/badge/coverage-100%25-brightgreen.svg?style=flat-square)](../docs/coverage-policy.md)
252
256
  [![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg?style=flat-square)](LICENSE)
253
- [![Python](https://img.shields.io/badge/Python-3.9+-3776ab.svg?style=flat-square&logo=python&logoColor=white)](https://www.python.org/)
257
+ [![Python](https://img.shields.io/badge/Python-3.8--3.14-3776ab.svg?style=flat-square&logo=python&logoColor=white)](https://www.python.org/)
254
258
 
255
259
  [Documentation](https://typecast.ai/docs) | [API Reference](https://typecast.ai/docs/api-reference) | [Get API Key](https://typecast.ai/developers/api/api-key)
256
260
 
@@ -9,7 +9,7 @@ Convert text to lifelike speech using AI-powered voices
9
9
  [![PyPI version](https://img.shields.io/pypi/v/typecast-python.svg?style=flat-square)](https://pypi.org/project/typecast-python/)
10
10
  [![coverage](https://img.shields.io/badge/coverage-100%25-brightgreen.svg?style=flat-square)](../docs/coverage-policy.md)
11
11
  [![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg?style=flat-square)](LICENSE)
12
- [![Python](https://img.shields.io/badge/Python-3.9+-3776ab.svg?style=flat-square&logo=python&logoColor=white)](https://www.python.org/)
12
+ [![Python](https://img.shields.io/badge/Python-3.8--3.14-3776ab.svg?style=flat-square&logo=python&logoColor=white)](https://www.python.org/)
13
13
 
14
14
  [Documentation](https://typecast.ai/docs) | [API Reference](https://typecast.ai/docs/api-reference) | [Get API Key](https://typecast.ai/developers/api/api-key)
15
15
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "typecast-python"
7
- version = "0.3.8"
7
+ version = "0.3.9"
8
8
  description = "Official Typecast Python SDK - Convert text to lifelike speech using AI-powered voices"
9
9
  authors = [
10
10
  {name = "Neosapience", email = "help@typecast.ai"}
@@ -14,22 +14,26 @@ maintainers = [
14
14
  ]
15
15
  license = {file = "LICENSE"}
16
16
  readme = "README.md"
17
- requires-python = ">=3.11"
17
+ requires-python = ">=3.8,<3.15"
18
18
  keywords = ["typecast", "tts", "text-to-speech", "ai", "voice", "audio", "speech-synthesis", "voice-generation"]
19
19
  classifiers = [
20
20
  "Development Status :: 3 - Alpha",
21
21
  "Intended Audience :: Developers",
22
22
  "License :: OSI Approved :: Apache Software License",
23
23
  "Programming Language :: Python :: 3",
24
+ "Programming Language :: Python :: 3.8",
25
+ "Programming Language :: Python :: 3.9",
26
+ "Programming Language :: Python :: 3.10",
24
27
  "Programming Language :: Python :: 3.11",
25
28
  "Programming Language :: Python :: 3.12",
26
29
  "Programming Language :: Python :: 3.13",
30
+ "Programming Language :: Python :: 3.14",
27
31
  "Topic :: Software Development :: Libraries :: Python Modules",
28
32
  "Topic :: Multimedia :: Sound/Audio :: Speech",
29
33
  "Operating System :: OS Independent",
30
34
  ]
31
35
  dependencies = [
32
- "aiohttp>=3.14.0",
36
+ "aiohttp>=3.9.0",
33
37
  "requests>=2.28.0",
34
38
  "pydantic>=2.0.0",
35
39
  "typing-extensions>=4.0.0",
@@ -37,14 +41,14 @@ dependencies = [
37
41
 
38
42
  [project.optional-dependencies]
39
43
  dev = [
40
- "pytest>=7.0.0",
41
- "pytest-cov>=7.0.0",
44
+ "pytest>=7.0.0,<9.0.0",
45
+ "pytest-cov>=5.0.0,<6.0.0",
42
46
  "pytest-mock>=3.14.0",
43
- "pytest-asyncio>=0.21.0",
47
+ "pytest-asyncio>=0.21.0,<1.0.0",
44
48
  "aioresponses>=0.7.6",
45
- "black>=23.0.0",
46
- "flake8>=6.0.0",
47
- "mypy>=1.0.0",
49
+ "black>=23.0.0,<25.0.0",
50
+ "flake8>=5.0.0,<6.0.0",
51
+ "mypy>=1.0.0,<1.11.0",
48
52
  "isort>=5.0.0",
49
53
  ]
50
54
 
@@ -86,12 +90,12 @@ multi_line_output = 3
86
90
 
87
91
  [dependency-groups]
88
92
  dev = [
89
- "pytest>=7.0.0",
90
- "pytest-cov>=7.0.0",
93
+ "pytest>=7.0.0,<9.0.0",
94
+ "pytest-cov>=5.0.0,<6.0.0",
91
95
  "pytest-mock>=3.14.0",
92
- "pytest-asyncio>=0.21.0",
96
+ "pytest-asyncio>=0.21.0,<1.0.0",
93
97
  "aioresponses>=0.7.6",
94
- "python-dotenv>=1.1.1",
98
+ "python-dotenv>=1.0.0,<2.0.0",
95
99
  "ruff>=0.14.0",
96
100
  ]
97
101
 
@@ -1,3 +1,5 @@
1
+ from __future__ import annotations
2
+
1
3
  import asyncio
2
4
  from pathlib import Path
3
5
  from typing import AsyncIterator, BinaryIO, Optional, Union
@@ -208,7 +210,8 @@ class AsyncTypecast:
208
210
  seed=seed,
209
211
  )
210
212
  )
211
- await asyncio.to_thread(output_path.write_bytes, response.audio_data)
213
+ loop = asyncio.get_running_loop()
214
+ await loop.run_in_executor(None, output_path.write_bytes, response.audio_data)
212
215
  return response
213
216
 
214
217
  async def text_to_speech_stream(
@@ -255,7 +258,7 @@ class AsyncTypecast:
255
258
  error_text = await response.text()
256
259
  self._handle_error(response.status, error_text)
257
260
 
258
- async for chunk in response.content.iter_chunked(chunk_size):
261
+ async for chunk in response.content.iter_chunked(chunk_size): # pragma: no branch
259
262
  yield chunk
260
263
 
261
264
  async def text_to_speech_with_timestamps(
@@ -1,3 +1,5 @@
1
+ from __future__ import annotations
2
+
1
3
  from pathlib import Path
2
4
  from typing import BinaryIO, Iterator, Optional, Union
3
5
  from urllib.parse import quote
@@ -1,5 +1,7 @@
1
+ from __future__ import annotations
2
+
1
3
  from enum import Enum
2
- from typing import Literal, Optional, Union
4
+ from typing import List, Literal, Optional, Union
3
5
 
4
6
  from pydantic import BaseModel, ConfigDict, Field, model_validator
5
7
 
@@ -330,7 +332,7 @@ def _group_into_cues(
330
332
  word_mode=True: parts are joined with a single space.
331
333
  word_mode=False: parts are concatenated directly.
332
334
 
333
- Returns list[(text, start, end)] tuples.
335
+ Returns List[(text, start, end)] tuples.
334
336
  """
335
337
  cues = []
336
338
  cur_text_parts = []
@@ -404,11 +406,11 @@ class TTSWithTimestampsResponse(BaseModel):
404
406
  audio: str = Field(description="Base64-encoded audio bytes.")
405
407
  audio_format: Literal["wav", "mp3"] = Field(description="Audio encoding format.")
406
408
  audio_duration: float = Field(description="Length of audio in seconds.")
407
- words: Optional[list[AlignmentSegmentWord]] = Field(
409
+ words: Optional[List[AlignmentSegmentWord]] = Field(
408
410
  default=None,
409
411
  description="Word-level timestamps; null when granularity=char.",
410
412
  )
411
- characters: Optional[list[AlignmentSegmentCharacter]] = Field(
413
+ characters: Optional[List[AlignmentSegmentCharacter]] = Field(
412
414
  default=None,
413
415
  description="Character-level timestamps; null when granularity=word.",
414
416
  )
@@ -1,5 +1,7 @@
1
+ from __future__ import annotations
2
+
1
3
  from enum import Enum
2
- from typing import Optional
4
+ from typing import List, Optional
3
5
 
4
6
  from pydantic import BaseModel, Field
5
7
 
@@ -12,7 +14,7 @@ class VoicesResponse(BaseModel):
12
14
  voice_id: str
13
15
  voice_name: str
14
16
  model: str
15
- emotions: list[str]
17
+ emotions: List[str]
16
18
 
17
19
 
18
20
  class GenderEnum(str, Enum):
@@ -54,7 +56,7 @@ class ModelInfo(BaseModel):
54
56
  """Model information with supported emotions"""
55
57
 
56
58
  version: TTSModel
57
- emotions: list[str]
59
+ emotions: List[str]
58
60
 
59
61
 
60
62
  class VoiceV2Response(BaseModel):
@@ -62,10 +64,10 @@ class VoiceV2Response(BaseModel):
62
64
 
63
65
  voice_id: str
64
66
  voice_name: str
65
- models: list[ModelInfo]
67
+ models: List[ModelInfo]
66
68
  gender: Optional[GenderEnum] = None
67
69
  age: Optional[AgeEnum] = None
68
- use_cases: Optional[list[str]] = None
70
+ use_cases: Optional[List[str]] = None
69
71
 
70
72
 
71
73
  class RecommendedVoice(BaseModel):
File without changes