cartesia 1.0.9__py2.py3-none-any.whl → 1.0.11__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cartesia/_types.py +2 -2
- cartesia/client.py +6 -2
- cartesia/version.py +1 -1
- {cartesia-1.0.9.dist-info → cartesia-1.0.11.dist-info}/METADATA +13 -13
- cartesia-1.0.11.dist-info/RECORD +12 -0
- {cartesia-1.0.9.dist-info → cartesia-1.0.11.dist-info}/WHEEL +1 -1
- cartesia-1.0.9.dist-info/RECORD +0 -12
- {cartesia-1.0.9.dist-info → cartesia-1.0.11.dist-info}/LICENSE.md +0 -0
- {cartesia-1.0.9.dist-info → cartesia-1.0.11.dist-info}/top_level.txt +0 -0
cartesia/_types.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import List, TypedDict
|
1
|
+
from typing import List, TypedDict, Union
|
2
2
|
|
3
3
|
from cartesia.utils.deprecated import deprecated
|
4
4
|
|
@@ -86,7 +86,7 @@ class VoiceControls(TypedDict):
|
|
86
86
|
This is an experimental class and is subject to rapid change in future versions.
|
87
87
|
"""
|
88
88
|
|
89
|
-
speed: str = ""
|
89
|
+
speed: Union[str, float] = ""
|
90
90
|
emotion: List[str] = []
|
91
91
|
|
92
92
|
|
cartesia/client.py
CHANGED
@@ -31,6 +31,9 @@ try:
|
|
31
31
|
except ImportError:
|
32
32
|
IS_WEBSOCKET_SYNC_AVAILABLE = False
|
33
33
|
|
34
|
+
from iterators import TimeoutIterator
|
35
|
+
from websockets.sync.client import connect
|
36
|
+
|
34
37
|
from cartesia._types import (
|
35
38
|
DeprecatedOutputFormatMapping,
|
36
39
|
EventType,
|
@@ -40,8 +43,6 @@ from cartesia._types import (
|
|
40
43
|
VoiceMetadata,
|
41
44
|
)
|
42
45
|
from cartesia.utils.retry import retry_on_connection_error, retry_on_connection_error_async
|
43
|
-
from iterators import TimeoutIterator
|
44
|
-
from websockets.sync.client import connect
|
45
46
|
|
46
47
|
DEFAULT_MODEL_ID = "sonic-english" # latest default model
|
47
48
|
MULTILINGUAL_MODEL_ID = "sonic-multilingual" # latest multilingual model
|
@@ -293,6 +294,7 @@ class _TTSContext:
|
|
293
294
|
context_id: Optional[str] = None,
|
294
295
|
duration: Optional[int] = None,
|
295
296
|
language: Optional[str] = None,
|
297
|
+
add_timestamps: bool = False,
|
296
298
|
_experimental_voice_controls: Optional[VoiceControls] = None,
|
297
299
|
) -> Generator[bytes, None, None]:
|
298
300
|
"""Send audio generation requests to the WebSocket and yield responses.
|
@@ -306,6 +308,7 @@ class _TTSContext:
|
|
306
308
|
context_id: The context ID to use for the request. If not specified, a random context ID will be generated.
|
307
309
|
duration: The duration of the audio in seconds.
|
308
310
|
language: The language code for the audio request. This can only be used with `model_id = sonic-multilingual`
|
311
|
+
add_timestamps: Whether to return word-level timestamps.
|
309
312
|
_experimental_voice_controls: Experimental voice controls for controlling speed and emotion.
|
310
313
|
Note: This is an experimental feature and may change rapidly in future releases.
|
311
314
|
|
@@ -340,6 +343,7 @@ class _TTSContext:
|
|
340
343
|
},
|
341
344
|
"context_id": self._context_id,
|
342
345
|
"language": language,
|
346
|
+
"add_timestamps": add_timestamps,
|
343
347
|
}
|
344
348
|
|
345
349
|
if duration is not None:
|
cartesia/version.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "1.0.
|
1
|
+
__version__ = "1.0.11"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: cartesia
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.11
|
4
4
|
Summary: The official Python library for the Cartesia API.
|
5
5
|
Home-page:
|
6
6
|
Author: Cartesia, Inc.
|
@@ -18,19 +18,19 @@ Requires-Dist: requests
|
|
18
18
|
Requires-Dist: websockets
|
19
19
|
Requires-Dist: iterators
|
20
20
|
Provides-Extra: all
|
21
|
-
Requires-Dist: pytest
|
22
|
-
Requires-Dist: pytest-cov
|
23
|
-
Requires-Dist: twine
|
24
|
-
Requires-Dist: setuptools
|
25
|
-
Requires-Dist: wheel
|
26
|
-
Requires-Dist: numpy
|
21
|
+
Requires-Dist: pytest>=8.0.2; extra == "all"
|
22
|
+
Requires-Dist: pytest-cov>=4.1.0; extra == "all"
|
23
|
+
Requires-Dist: twine; extra == "all"
|
24
|
+
Requires-Dist: setuptools; extra == "all"
|
25
|
+
Requires-Dist: wheel; extra == "all"
|
26
|
+
Requires-Dist: numpy; extra == "all"
|
27
27
|
Provides-Extra: dev
|
28
|
-
Requires-Dist: pytest
|
29
|
-
Requires-Dist: pytest-cov
|
30
|
-
Requires-Dist: twine
|
31
|
-
Requires-Dist: setuptools
|
32
|
-
Requires-Dist: wheel
|
33
|
-
Requires-Dist: numpy
|
28
|
+
Requires-Dist: pytest>=8.0.2; extra == "dev"
|
29
|
+
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
|
30
|
+
Requires-Dist: twine; extra == "dev"
|
31
|
+
Requires-Dist: setuptools; extra == "dev"
|
32
|
+
Requires-Dist: wheel; extra == "dev"
|
33
|
+
Requires-Dist: numpy; extra == "dev"
|
34
34
|
|
35
35
|
|
36
36
|
# Cartesia Python API Library
|
@@ -0,0 +1,12 @@
|
|
1
|
+
cartesia/__init__.py,sha256=E4w7psbAwx8X6Iri3W8jGeo11gIlhr3mSU33zChipmI,93
|
2
|
+
cartesia/_types.py,sha256=pkFJmsO-OWAJNtqxV80-YcR8KWWLhIwLFejzDjBewbw,4428
|
3
|
+
cartesia/client.py,sha256=d5yhh1AvKO0yr6jPZaFoXvOW7DySNFXnn65W0lB92kA,51767
|
4
|
+
cartesia/version.py,sha256=wygrEW3brUgbks4JvwNjcujOADEl2PWkdIF9d8vyM3c,23
|
5
|
+
cartesia/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
|
+
cartesia/utils/deprecated.py,sha256=2cXvGtrxhPeUZA5LWy2n_U5OFLDv7SHeFtzqhjSJGyk,1674
|
7
|
+
cartesia/utils/retry.py,sha256=O6fyVWpH9Su8c0Fwupl57xMt6JrwJ52txBwP3faUL7k,3339
|
8
|
+
cartesia-1.0.11.dist-info/LICENSE.md,sha256=PT2YG5wEtEX1TNDn5sXkUXqbn-neyr7cZenTxd40ql4,1074
|
9
|
+
cartesia-1.0.11.dist-info/METADATA,sha256=o6SMA344ywRFJqbMOawCgZCrb8ntqDBZdJ7flp9TcI8,21122
|
10
|
+
cartesia-1.0.11.dist-info/WHEEL,sha256=fS9sRbCBHs7VFcwJLnLXN1MZRR0_TVTxvXKzOnaSFs8,110
|
11
|
+
cartesia-1.0.11.dist-info/top_level.txt,sha256=rTX4HnnCegMxl1FK9czpVC7GAvf3SwDzPG65qP-BS4w,9
|
12
|
+
cartesia-1.0.11.dist-info/RECORD,,
|
cartesia-1.0.9.dist-info/RECORD
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
cartesia/__init__.py,sha256=E4w7psbAwx8X6Iri3W8jGeo11gIlhr3mSU33zChipmI,93
|
2
|
-
cartesia/_types.py,sha256=rISSd6sfne6awLDoonqA9KlE0fVQZdIaGjxsvHTFBlE,4407
|
3
|
-
cartesia/client.py,sha256=m6eVIr5AL0Xuwh7707jXMNIxx1CAseW03xvgbbuNNsU,51613
|
4
|
-
cartesia/version.py,sha256=q2ACMkQx0Hm5xKo2YKJFBE7rTruciTSIN6AvWWL9nB8,22
|
5
|
-
cartesia/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
|
-
cartesia/utils/deprecated.py,sha256=2cXvGtrxhPeUZA5LWy2n_U5OFLDv7SHeFtzqhjSJGyk,1674
|
7
|
-
cartesia/utils/retry.py,sha256=O6fyVWpH9Su8c0Fwupl57xMt6JrwJ52txBwP3faUL7k,3339
|
8
|
-
cartesia-1.0.9.dist-info/LICENSE.md,sha256=PT2YG5wEtEX1TNDn5sXkUXqbn-neyr7cZenTxd40ql4,1074
|
9
|
-
cartesia-1.0.9.dist-info/METADATA,sha256=C2htRYPEJuve-EhP1R7dazFxnBSJrCTnESIIDBx5vBk,21137
|
10
|
-
cartesia-1.0.9.dist-info/WHEEL,sha256=DZajD4pwLWue70CAfc7YaxT1wLUciNBvN_TTcvXpltE,110
|
11
|
-
cartesia-1.0.9.dist-info/top_level.txt,sha256=rTX4HnnCegMxl1FK9czpVC7GAvf3SwDzPG65qP-BS4w,9
|
12
|
-
cartesia-1.0.9.dist-info/RECORD,,
|
File without changes
|
File without changes
|