cartesia 2.0.0b8__py3-none-any.whl → 2.0.3__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/__init__.py +11 -1
- cartesia/auth/__init__.py +13 -0
- cartesia/auth/client.py +159 -0
- cartesia/auth/requests/__init__.py +7 -0
- cartesia/auth/requests/token_grant.py +10 -0
- cartesia/auth/requests/token_request.py +17 -0
- cartesia/auth/requests/token_response.py +10 -0
- cartesia/auth/types/__init__.py +7 -0
- cartesia/auth/types/token_grant.py +22 -0
- cartesia/auth/types/token_request.py +28 -0
- cartesia/auth/types/token_response.py +22 -0
- cartesia/base_client.py +4 -0
- cartesia/core/client_wrapper.py +1 -1
- cartesia/tts/__init__.py +2 -0
- cartesia/tts/_async_websocket.py +3 -0
- cartesia/tts/_websocket.py +3 -0
- cartesia/tts/client.py +21 -4
- cartesia/tts/requests/generation_request.py +12 -1
- cartesia/tts/requests/tts_request.py +4 -1
- cartesia/tts/requests/web_socket_tts_request.py +4 -1
- cartesia/tts/types/__init__.py +2 -0
- cartesia/tts/types/generation_request.py +12 -1
- cartesia/tts/types/model_speed.py +5 -0
- cartesia/tts/types/tts_request.py +4 -1
- cartesia/tts/types/web_socket_tts_request.py +4 -1
- cartesia/voices/client.py +19 -21
- {cartesia-2.0.0b8.dist-info → cartesia-2.0.3.dist-info}/METADATA +1 -1
- {cartesia-2.0.0b8.dist-info → cartesia-2.0.3.dist-info}/RECORD +29 -18
- {cartesia-2.0.0b8.dist-info → cartesia-2.0.3.dist-info}/WHEEL +0 -0
cartesia/__init__.py
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
2
2
|
|
3
|
-
from . import api_status, datasets, embedding, infill, tts, voice_changer, voices
|
3
|
+
from . import api_status, auth, datasets, embedding, infill, tts, voice_changer, voices
|
4
4
|
from .api_status import ApiInfo, ApiInfoParams
|
5
|
+
from .auth import TokenGrant, TokenGrantParams, TokenRequest, TokenRequestParams, TokenResponse, TokenResponseParams
|
5
6
|
from .client import AsyncCartesia, Cartesia
|
6
7
|
from .datasets import (
|
7
8
|
CreateDatasetRequest,
|
@@ -28,6 +29,7 @@ from .tts import (
|
|
28
29
|
FlushId,
|
29
30
|
GenerationRequest,
|
30
31
|
GenerationRequestParams,
|
32
|
+
ModelSpeed,
|
31
33
|
Mp3OutputFormat,
|
32
34
|
Mp3OutputFormatParams,
|
33
35
|
NaturalSpecifier,
|
@@ -200,6 +202,7 @@ __all__ = [
|
|
200
202
|
"MixVoiceSpecifierParams",
|
201
203
|
"MixVoicesRequest",
|
202
204
|
"MixVoicesRequestParams",
|
205
|
+
"ModelSpeed",
|
203
206
|
"Mp3OutputFormat",
|
204
207
|
"Mp3OutputFormatParams",
|
205
208
|
"NaturalSpecifier",
|
@@ -233,6 +236,12 @@ __all__ = [
|
|
233
236
|
"StreamingResponse_Error",
|
234
237
|
"StreamingResponse_ErrorParams",
|
235
238
|
"SupportedLanguage",
|
239
|
+
"TokenGrant",
|
240
|
+
"TokenGrantParams",
|
241
|
+
"TokenRequest",
|
242
|
+
"TokenRequestParams",
|
243
|
+
"TokenResponse",
|
244
|
+
"TokenResponseParams",
|
236
245
|
"TtsRequest",
|
237
246
|
"TtsRequestEmbeddingSpecifier",
|
238
247
|
"TtsRequestEmbeddingSpecifierParams",
|
@@ -294,6 +303,7 @@ __all__ = [
|
|
294
303
|
"WordTimestampsParams",
|
295
304
|
"__version__",
|
296
305
|
"api_status",
|
306
|
+
"auth",
|
297
307
|
"datasets",
|
298
308
|
"embedding",
|
299
309
|
"infill",
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from .types import TokenGrant, TokenRequest, TokenResponse
|
4
|
+
from .requests import TokenGrantParams, TokenRequestParams, TokenResponseParams
|
5
|
+
|
6
|
+
__all__ = [
|
7
|
+
"TokenGrant",
|
8
|
+
"TokenGrantParams",
|
9
|
+
"TokenRequest",
|
10
|
+
"TokenRequestParams",
|
11
|
+
"TokenResponse",
|
12
|
+
"TokenResponseParams",
|
13
|
+
]
|
cartesia/auth/client.py
ADDED
@@ -0,0 +1,159 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import typing
|
4
|
+
from ..core.client_wrapper import SyncClientWrapper
|
5
|
+
from .requests.token_grant import TokenGrantParams
|
6
|
+
from ..core.request_options import RequestOptions
|
7
|
+
from .types.token_response import TokenResponse
|
8
|
+
from ..core.serialization import convert_and_respect_annotation_metadata
|
9
|
+
from ..core.pydantic_utilities import parse_obj_as
|
10
|
+
from json.decoder import JSONDecodeError
|
11
|
+
from ..core.api_error import ApiError
|
12
|
+
from ..core.client_wrapper import AsyncClientWrapper
|
13
|
+
|
14
|
+
# this is used as the default value for optional parameters
|
15
|
+
OMIT = typing.cast(typing.Any, ...)
|
16
|
+
|
17
|
+
|
18
|
+
class AuthClient:
|
19
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
20
|
+
self._client_wrapper = client_wrapper
|
21
|
+
|
22
|
+
def access_token(
|
23
|
+
self,
|
24
|
+
*,
|
25
|
+
grants: TokenGrantParams,
|
26
|
+
expires_in: typing.Optional[int] = OMIT,
|
27
|
+
request_options: typing.Optional[RequestOptions] = None,
|
28
|
+
) -> TokenResponse:
|
29
|
+
"""
|
30
|
+
Generates a new Access Token for the client. These tokens are short-lived and should be used to make requests to the API from authenticated clients.
|
31
|
+
|
32
|
+
Parameters
|
33
|
+
----------
|
34
|
+
grants : TokenGrantParams
|
35
|
+
The permissions to be granted via the token.
|
36
|
+
|
37
|
+
expires_in : typing.Optional[int]
|
38
|
+
The number of seconds the token will be valid for since the time of generation. The maximum is 1 hour (3600 seconds).
|
39
|
+
|
40
|
+
request_options : typing.Optional[RequestOptions]
|
41
|
+
Request-specific configuration.
|
42
|
+
|
43
|
+
Returns
|
44
|
+
-------
|
45
|
+
TokenResponse
|
46
|
+
|
47
|
+
Examples
|
48
|
+
--------
|
49
|
+
from cartesia import Cartesia
|
50
|
+
|
51
|
+
client = Cartesia(
|
52
|
+
api_key="YOUR_API_KEY",
|
53
|
+
)
|
54
|
+
client.auth.access_token(
|
55
|
+
grants={"tts": True},
|
56
|
+
expires_in=60,
|
57
|
+
)
|
58
|
+
"""
|
59
|
+
_response = self._client_wrapper.httpx_client.request(
|
60
|
+
"access-token",
|
61
|
+
method="POST",
|
62
|
+
json={
|
63
|
+
"grants": convert_and_respect_annotation_metadata(
|
64
|
+
object_=grants, annotation=TokenGrantParams, direction="write"
|
65
|
+
),
|
66
|
+
"expires_in": expires_in,
|
67
|
+
},
|
68
|
+
request_options=request_options,
|
69
|
+
omit=OMIT,
|
70
|
+
)
|
71
|
+
try:
|
72
|
+
if 200 <= _response.status_code < 300:
|
73
|
+
return typing.cast(
|
74
|
+
TokenResponse,
|
75
|
+
parse_obj_as(
|
76
|
+
type_=TokenResponse, # type: ignore
|
77
|
+
object_=_response.json(),
|
78
|
+
),
|
79
|
+
)
|
80
|
+
_response_json = _response.json()
|
81
|
+
except JSONDecodeError:
|
82
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
83
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
84
|
+
|
85
|
+
|
86
|
+
class AsyncAuthClient:
|
87
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
88
|
+
self._client_wrapper = client_wrapper
|
89
|
+
|
90
|
+
async def access_token(
|
91
|
+
self,
|
92
|
+
*,
|
93
|
+
grants: TokenGrantParams,
|
94
|
+
expires_in: typing.Optional[int] = OMIT,
|
95
|
+
request_options: typing.Optional[RequestOptions] = None,
|
96
|
+
) -> TokenResponse:
|
97
|
+
"""
|
98
|
+
Generates a new Access Token for the client. These tokens are short-lived and should be used to make requests to the API from authenticated clients.
|
99
|
+
|
100
|
+
Parameters
|
101
|
+
----------
|
102
|
+
grants : TokenGrantParams
|
103
|
+
The permissions to be granted via the token.
|
104
|
+
|
105
|
+
expires_in : typing.Optional[int]
|
106
|
+
The number of seconds the token will be valid for since the time of generation. The maximum is 1 hour (3600 seconds).
|
107
|
+
|
108
|
+
request_options : typing.Optional[RequestOptions]
|
109
|
+
Request-specific configuration.
|
110
|
+
|
111
|
+
Returns
|
112
|
+
-------
|
113
|
+
TokenResponse
|
114
|
+
|
115
|
+
Examples
|
116
|
+
--------
|
117
|
+
import asyncio
|
118
|
+
|
119
|
+
from cartesia import AsyncCartesia
|
120
|
+
|
121
|
+
client = AsyncCartesia(
|
122
|
+
api_key="YOUR_API_KEY",
|
123
|
+
)
|
124
|
+
|
125
|
+
|
126
|
+
async def main() -> None:
|
127
|
+
await client.auth.access_token(
|
128
|
+
grants={"tts": True},
|
129
|
+
expires_in=60,
|
130
|
+
)
|
131
|
+
|
132
|
+
|
133
|
+
asyncio.run(main())
|
134
|
+
"""
|
135
|
+
_response = await self._client_wrapper.httpx_client.request(
|
136
|
+
"access-token",
|
137
|
+
method="POST",
|
138
|
+
json={
|
139
|
+
"grants": convert_and_respect_annotation_metadata(
|
140
|
+
object_=grants, annotation=TokenGrantParams, direction="write"
|
141
|
+
),
|
142
|
+
"expires_in": expires_in,
|
143
|
+
},
|
144
|
+
request_options=request_options,
|
145
|
+
omit=OMIT,
|
146
|
+
)
|
147
|
+
try:
|
148
|
+
if 200 <= _response.status_code < 300:
|
149
|
+
return typing.cast(
|
150
|
+
TokenResponse,
|
151
|
+
parse_obj_as(
|
152
|
+
type_=TokenResponse, # type: ignore
|
153
|
+
object_=_response.json(),
|
154
|
+
),
|
155
|
+
)
|
156
|
+
_response_json = _response.json()
|
157
|
+
except JSONDecodeError:
|
158
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
159
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from .token_grant import TokenGrantParams
|
4
|
+
from .token_request import TokenRequestParams
|
5
|
+
from .token_response import TokenResponseParams
|
6
|
+
|
7
|
+
__all__ = ["TokenGrantParams", "TokenRequestParams", "TokenResponseParams"]
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import typing_extensions
|
4
|
+
from .token_grant import TokenGrantParams
|
5
|
+
import typing_extensions
|
6
|
+
|
7
|
+
|
8
|
+
class TokenRequestParams(typing_extensions.TypedDict):
|
9
|
+
grants: TokenGrantParams
|
10
|
+
"""
|
11
|
+
The permissions to be granted via the token.
|
12
|
+
"""
|
13
|
+
|
14
|
+
expires_in: typing_extensions.NotRequired[int]
|
15
|
+
"""
|
16
|
+
The number of seconds the token will be valid for since the time of generation. The maximum is 1 hour (3600 seconds).
|
17
|
+
"""
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from ...core.pydantic_utilities import UniversalBaseModel
|
4
|
+
import pydantic
|
5
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2
|
6
|
+
import typing
|
7
|
+
|
8
|
+
|
9
|
+
class TokenGrant(UniversalBaseModel):
|
10
|
+
tts: bool = pydantic.Field()
|
11
|
+
"""
|
12
|
+
The `tts` grant allows the token to be used to access any TTS endpoint.
|
13
|
+
"""
|
14
|
+
|
15
|
+
if IS_PYDANTIC_V2:
|
16
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
17
|
+
else:
|
18
|
+
|
19
|
+
class Config:
|
20
|
+
frozen = True
|
21
|
+
smart_union = True
|
22
|
+
extra = pydantic.Extra.allow
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from ...core.pydantic_utilities import UniversalBaseModel
|
4
|
+
from .token_grant import TokenGrant
|
5
|
+
import pydantic
|
6
|
+
import typing
|
7
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2
|
8
|
+
|
9
|
+
|
10
|
+
class TokenRequest(UniversalBaseModel):
|
11
|
+
grants: TokenGrant = pydantic.Field()
|
12
|
+
"""
|
13
|
+
The permissions to be granted via the token.
|
14
|
+
"""
|
15
|
+
|
16
|
+
expires_in: typing.Optional[int] = pydantic.Field(default=None)
|
17
|
+
"""
|
18
|
+
The number of seconds the token will be valid for since the time of generation. The maximum is 1 hour (3600 seconds).
|
19
|
+
"""
|
20
|
+
|
21
|
+
if IS_PYDANTIC_V2:
|
22
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
23
|
+
else:
|
24
|
+
|
25
|
+
class Config:
|
26
|
+
frozen = True
|
27
|
+
smart_union = True
|
28
|
+
extra = pydantic.Extra.allow
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from ...core.pydantic_utilities import UniversalBaseModel
|
4
|
+
import pydantic
|
5
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2
|
6
|
+
import typing
|
7
|
+
|
8
|
+
|
9
|
+
class TokenResponse(UniversalBaseModel):
|
10
|
+
token: str = pydantic.Field()
|
11
|
+
"""
|
12
|
+
The generated Access Token.
|
13
|
+
"""
|
14
|
+
|
15
|
+
if IS_PYDANTIC_V2:
|
16
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
17
|
+
else:
|
18
|
+
|
19
|
+
class Config:
|
20
|
+
frozen = True
|
21
|
+
smart_union = True
|
22
|
+
extra = pydantic.Extra.allow
|
cartesia/base_client.py
CHANGED
@@ -5,12 +5,14 @@ from .environment import CartesiaEnvironment
|
|
5
5
|
import httpx
|
6
6
|
from .core.client_wrapper import SyncClientWrapper
|
7
7
|
from .api_status.client import ApiStatusClient
|
8
|
+
from .auth.client import AuthClient
|
8
9
|
from .infill.client import InfillClient
|
9
10
|
from .tts.client import TtsClient
|
10
11
|
from .voice_changer.client import VoiceChangerClient
|
11
12
|
from .voices.client import VoicesClient
|
12
13
|
from .core.client_wrapper import AsyncClientWrapper
|
13
14
|
from .api_status.client import AsyncApiStatusClient
|
15
|
+
from .auth.client import AsyncAuthClient
|
14
16
|
from .infill.client import AsyncInfillClient
|
15
17
|
from .tts.client import AsyncTtsClient
|
16
18
|
from .voice_changer.client import AsyncVoiceChangerClient
|
@@ -76,6 +78,7 @@ class BaseCartesia:
|
|
76
78
|
timeout=_defaulted_timeout,
|
77
79
|
)
|
78
80
|
self.api_status = ApiStatusClient(client_wrapper=self._client_wrapper)
|
81
|
+
self.auth = AuthClient(client_wrapper=self._client_wrapper)
|
79
82
|
self.infill = InfillClient(client_wrapper=self._client_wrapper)
|
80
83
|
self.tts = TtsClient(client_wrapper=self._client_wrapper)
|
81
84
|
self.voice_changer = VoiceChangerClient(client_wrapper=self._client_wrapper)
|
@@ -141,6 +144,7 @@ class AsyncBaseCartesia:
|
|
141
144
|
timeout=_defaulted_timeout,
|
142
145
|
)
|
143
146
|
self.api_status = AsyncApiStatusClient(client_wrapper=self._client_wrapper)
|
147
|
+
self.auth = AsyncAuthClient(client_wrapper=self._client_wrapper)
|
144
148
|
self.infill = AsyncInfillClient(client_wrapper=self._client_wrapper)
|
145
149
|
self.tts = AsyncTtsClient(client_wrapper=self._client_wrapper)
|
146
150
|
self.voice_changer = AsyncVoiceChangerClient(client_wrapper=self._client_wrapper)
|
cartesia/core/client_wrapper.py
CHANGED
@@ -16,7 +16,7 @@ class BaseClientWrapper:
|
|
16
16
|
headers: typing.Dict[str, str] = {
|
17
17
|
"X-Fern-Language": "Python",
|
18
18
|
"X-Fern-SDK-Name": "cartesia",
|
19
|
-
"X-Fern-SDK-Version": "2.0.
|
19
|
+
"X-Fern-SDK-Version": "2.0.3",
|
20
20
|
}
|
21
21
|
headers["X-API-Key"] = self.api_key
|
22
22
|
headers["Cartesia-Version"] = "2024-11-13"
|
cartesia/tts/__init__.py
CHANGED
@@ -7,6 +7,7 @@ from .types import (
|
|
7
7
|
Emotion,
|
8
8
|
FlushId,
|
9
9
|
GenerationRequest,
|
10
|
+
ModelSpeed,
|
10
11
|
Mp3OutputFormat,
|
11
12
|
NaturalSpecifier,
|
12
13
|
NumericalSpecifier,
|
@@ -94,6 +95,7 @@ __all__ = [
|
|
94
95
|
"FlushId",
|
95
96
|
"GenerationRequest",
|
96
97
|
"GenerationRequestParams",
|
98
|
+
"ModelSpeed",
|
97
99
|
"Mp3OutputFormat",
|
98
100
|
"Mp3OutputFormatParams",
|
99
101
|
"NaturalSpecifier",
|
cartesia/tts/_async_websocket.py
CHANGED
@@ -71,6 +71,7 @@ class _AsyncTTSContext:
|
|
71
71
|
add_phoneme_timestamps: bool = False,
|
72
72
|
use_original_timestamps: bool = False,
|
73
73
|
continue_: bool = False,
|
74
|
+
max_buffer_delay_ms: Optional[int] = None,
|
74
75
|
flush: bool = False,
|
75
76
|
) -> None:
|
76
77
|
"""Send audio generation requests to the WebSocket. The response can be received using the `receive` method.
|
@@ -111,6 +112,8 @@ class _AsyncTTSContext:
|
|
111
112
|
request_body["use_original_timestamps"] = use_original_timestamps
|
112
113
|
if continue_:
|
113
114
|
request_body["continue"] = continue_
|
115
|
+
if max_buffer_delay_ms:
|
116
|
+
request_body["max_buffer_delay_ms"] = max_buffer_delay_ms
|
114
117
|
if flush:
|
115
118
|
request_body["flush"] = flush
|
116
119
|
|
cartesia/tts/_websocket.py
CHANGED
@@ -63,6 +63,7 @@ class _TTSContext:
|
|
63
63
|
output_format: OutputFormatParams,
|
64
64
|
voice: TtsRequestVoiceSpecifierParams,
|
65
65
|
context_id: Optional[str] = None,
|
66
|
+
max_buffer_delay_ms: Optional[int] = None,
|
66
67
|
duration: Optional[int] = None,
|
67
68
|
language: Optional[str] = None,
|
68
69
|
stream: bool = True,
|
@@ -108,6 +109,8 @@ class _TTSContext:
|
|
108
109
|
request_body["add_phoneme_timestamps"] = add_phoneme_timestamps
|
109
110
|
if use_original_timestamps:
|
110
111
|
request_body["use_original_timestamps"] = use_original_timestamps
|
112
|
+
if max_buffer_delay_ms:
|
113
|
+
request_body["max_buffer_delay_ms"] = max_buffer_delay_ms
|
111
114
|
|
112
115
|
if (
|
113
116
|
"context_id" in request_body
|
cartesia/tts/client.py
CHANGED
@@ -5,6 +5,7 @@ from ..core.client_wrapper import SyncClientWrapper
|
|
5
5
|
from .requests.tts_request_voice_specifier import TtsRequestVoiceSpecifierParams
|
6
6
|
from .requests.output_format import OutputFormatParams
|
7
7
|
from .types.supported_language import SupportedLanguage
|
8
|
+
from .types.model_speed import ModelSpeed
|
8
9
|
from ..core.request_options import RequestOptions
|
9
10
|
from ..core.serialization import convert_and_respect_annotation_metadata
|
10
11
|
from json.decoder import JSONDecodeError
|
@@ -32,13 +33,14 @@ class TtsClient:
|
|
32
33
|
output_format: OutputFormatParams,
|
33
34
|
language: typing.Optional[SupportedLanguage] = OMIT,
|
34
35
|
duration: typing.Optional[float] = OMIT,
|
36
|
+
speed: typing.Optional[ModelSpeed] = OMIT,
|
35
37
|
request_options: typing.Optional[RequestOptions] = None,
|
36
38
|
) -> typing.Iterator[bytes]:
|
37
39
|
"""
|
38
40
|
Parameters
|
39
41
|
----------
|
40
42
|
model_id : str
|
41
|
-
The ID of the model to use for the generation. See [Models](/build-with-
|
43
|
+
The ID of the model to use for the generation. See [Models](/build-with-cartesia/models) for available models.
|
42
44
|
|
43
45
|
transcript : str
|
44
46
|
|
@@ -52,6 +54,8 @@ class TtsClient:
|
|
52
54
|
The maximum duration of the audio in seconds. You do not usually need to specify this.
|
53
55
|
If the duration is not appropriate for the length of the transcript, the output audio may be truncated.
|
54
56
|
|
57
|
+
speed : typing.Optional[ModelSpeed]
|
58
|
+
|
55
59
|
request_options : typing.Optional[RequestOptions]
|
56
60
|
Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
|
57
61
|
|
@@ -92,6 +96,7 @@ class TtsClient:
|
|
92
96
|
object_=output_format, annotation=OutputFormatParams, direction="write"
|
93
97
|
),
|
94
98
|
"duration": duration,
|
99
|
+
"speed": speed,
|
95
100
|
},
|
96
101
|
request_options=request_options,
|
97
102
|
omit=OMIT,
|
@@ -117,13 +122,14 @@ class TtsClient:
|
|
117
122
|
output_format: OutputFormatParams,
|
118
123
|
language: typing.Optional[SupportedLanguage] = OMIT,
|
119
124
|
duration: typing.Optional[float] = OMIT,
|
125
|
+
speed: typing.Optional[ModelSpeed] = OMIT,
|
120
126
|
request_options: typing.Optional[RequestOptions] = None,
|
121
127
|
) -> typing.Iterator[WebSocketResponse]:
|
122
128
|
"""
|
123
129
|
Parameters
|
124
130
|
----------
|
125
131
|
model_id : str
|
126
|
-
The ID of the model to use for the generation. See [Models](/build-with-
|
132
|
+
The ID of the model to use for the generation. See [Models](/build-with-cartesia/models) for available models.
|
127
133
|
|
128
134
|
transcript : str
|
129
135
|
|
@@ -137,6 +143,8 @@ class TtsClient:
|
|
137
143
|
The maximum duration of the audio in seconds. You do not usually need to specify this.
|
138
144
|
If the duration is not appropriate for the length of the transcript, the output audio may be truncated.
|
139
145
|
|
146
|
+
speed : typing.Optional[ModelSpeed]
|
147
|
+
|
140
148
|
request_options : typing.Optional[RequestOptions]
|
141
149
|
Request-specific configuration.
|
142
150
|
|
@@ -179,6 +187,7 @@ class TtsClient:
|
|
179
187
|
object_=output_format, annotation=OutputFormatParams, direction="write"
|
180
188
|
),
|
181
189
|
"duration": duration,
|
190
|
+
"speed": speed,
|
182
191
|
},
|
183
192
|
request_options=request_options,
|
184
193
|
omit=OMIT,
|
@@ -218,13 +227,14 @@ class AsyncTtsClient:
|
|
218
227
|
output_format: OutputFormatParams,
|
219
228
|
language: typing.Optional[SupportedLanguage] = OMIT,
|
220
229
|
duration: typing.Optional[float] = OMIT,
|
230
|
+
speed: typing.Optional[ModelSpeed] = OMIT,
|
221
231
|
request_options: typing.Optional[RequestOptions] = None,
|
222
232
|
) -> typing.AsyncIterator[bytes]:
|
223
233
|
"""
|
224
234
|
Parameters
|
225
235
|
----------
|
226
236
|
model_id : str
|
227
|
-
The ID of the model to use for the generation. See [Models](/build-with-
|
237
|
+
The ID of the model to use for the generation. See [Models](/build-with-cartesia/models) for available models.
|
228
238
|
|
229
239
|
transcript : str
|
230
240
|
|
@@ -238,6 +248,8 @@ class AsyncTtsClient:
|
|
238
248
|
The maximum duration of the audio in seconds. You do not usually need to specify this.
|
239
249
|
If the duration is not appropriate for the length of the transcript, the output audio may be truncated.
|
240
250
|
|
251
|
+
speed : typing.Optional[ModelSpeed]
|
252
|
+
|
241
253
|
request_options : typing.Optional[RequestOptions]
|
242
254
|
Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
|
243
255
|
|
@@ -286,6 +298,7 @@ class AsyncTtsClient:
|
|
286
298
|
object_=output_format, annotation=OutputFormatParams, direction="write"
|
287
299
|
),
|
288
300
|
"duration": duration,
|
301
|
+
"speed": speed,
|
289
302
|
},
|
290
303
|
request_options=request_options,
|
291
304
|
omit=OMIT,
|
@@ -311,13 +324,14 @@ class AsyncTtsClient:
|
|
311
324
|
output_format: OutputFormatParams,
|
312
325
|
language: typing.Optional[SupportedLanguage] = OMIT,
|
313
326
|
duration: typing.Optional[float] = OMIT,
|
327
|
+
speed: typing.Optional[ModelSpeed] = OMIT,
|
314
328
|
request_options: typing.Optional[RequestOptions] = None,
|
315
329
|
) -> typing.AsyncIterator[WebSocketResponse]:
|
316
330
|
"""
|
317
331
|
Parameters
|
318
332
|
----------
|
319
333
|
model_id : str
|
320
|
-
The ID of the model to use for the generation. See [Models](/build-with-
|
334
|
+
The ID of the model to use for the generation. See [Models](/build-with-cartesia/models) for available models.
|
321
335
|
|
322
336
|
transcript : str
|
323
337
|
|
@@ -331,6 +345,8 @@ class AsyncTtsClient:
|
|
331
345
|
The maximum duration of the audio in seconds. You do not usually need to specify this.
|
332
346
|
If the duration is not appropriate for the length of the transcript, the output audio may be truncated.
|
333
347
|
|
348
|
+
speed : typing.Optional[ModelSpeed]
|
349
|
+
|
334
350
|
request_options : typing.Optional[RequestOptions]
|
335
351
|
Request-specific configuration.
|
336
352
|
|
@@ -381,6 +397,7 @@ class AsyncTtsClient:
|
|
381
397
|
object_=output_format, annotation=OutputFormatParams, direction="write"
|
382
398
|
),
|
383
399
|
"duration": duration,
|
400
|
+
"speed": speed,
|
384
401
|
},
|
385
402
|
request_options=request_options,
|
386
403
|
omit=OMIT,
|
@@ -6,6 +6,7 @@ from .tts_request_voice_specifier import TtsRequestVoiceSpecifierParams
|
|
6
6
|
import typing_extensions
|
7
7
|
from ..types.supported_language import SupportedLanguage
|
8
8
|
from .web_socket_raw_output_format import WebSocketRawOutputFormatParams
|
9
|
+
from ..types.model_speed import ModelSpeed
|
9
10
|
from ..types.context_id import ContextId
|
10
11
|
from ...core.serialization import FieldMetadata
|
11
12
|
|
@@ -13,7 +14,7 @@ from ...core.serialization import FieldMetadata
|
|
13
14
|
class GenerationRequestParams(typing_extensions.TypedDict):
|
14
15
|
model_id: str
|
15
16
|
"""
|
16
|
-
The ID of the model to use for the generation. See [Models](/build-with-
|
17
|
+
The ID of the model to use for the generation. See [Models](/build-with-cartesia/models) for available models.
|
17
18
|
"""
|
18
19
|
|
19
20
|
transcript: typing.Optional[typing.Any]
|
@@ -30,6 +31,7 @@ class GenerationRequestParams(typing_extensions.TypedDict):
|
|
30
31
|
If the duration is not appropriate for the length of the transcript, the output audio may be truncated.
|
31
32
|
"""
|
32
33
|
|
34
|
+
speed: typing_extensions.NotRequired[ModelSpeed]
|
33
35
|
context_id: typing_extensions.NotRequired[ContextId]
|
34
36
|
continue_: typing_extensions.NotRequired[typing_extensions.Annotated[bool, FieldMetadata(alias="continue")]]
|
35
37
|
"""
|
@@ -37,6 +39,15 @@ class GenerationRequestParams(typing_extensions.TypedDict):
|
|
37
39
|
If not specified, this defaults to `false`.
|
38
40
|
"""
|
39
41
|
|
42
|
+
max_buffer_delay_ms: typing_extensions.NotRequired[int]
|
43
|
+
"""
|
44
|
+
The maximum time in milliseconds to buffer text before starting generation. Values between [0, 1000]ms are supported. Defaults to 0 (no buffering).
|
45
|
+
|
46
|
+
When set, the model will buffer incoming text chunks until it's confident it has enough context to generate high-quality speech, or the buffer delay elapses, whichever comes first. Without this option set, the model will kick off generations immediately, ceding control of buffering to the user.
|
47
|
+
|
48
|
+
Use this to balance responsiveness with higher quality speech generation, which often benefits from having more context.
|
49
|
+
"""
|
50
|
+
|
40
51
|
flush: typing_extensions.NotRequired[bool]
|
41
52
|
"""
|
42
53
|
Whether to flush the context.
|
@@ -5,12 +5,13 @@ from .tts_request_voice_specifier import TtsRequestVoiceSpecifierParams
|
|
5
5
|
import typing_extensions
|
6
6
|
from ..types.supported_language import SupportedLanguage
|
7
7
|
from .output_format import OutputFormatParams
|
8
|
+
from ..types.model_speed import ModelSpeed
|
8
9
|
|
9
10
|
|
10
11
|
class TtsRequestParams(typing_extensions.TypedDict):
|
11
12
|
model_id: str
|
12
13
|
"""
|
13
|
-
The ID of the model to use for the generation. See [Models](/build-with-
|
14
|
+
The ID of the model to use for the generation. See [Models](/build-with-cartesia/models) for available models.
|
14
15
|
"""
|
15
16
|
|
16
17
|
transcript: str
|
@@ -22,3 +23,5 @@ class TtsRequestParams(typing_extensions.TypedDict):
|
|
22
23
|
The maximum duration of the audio in seconds. You do not usually need to specify this.
|
23
24
|
If the duration is not appropriate for the length of the transcript, the output audio may be truncated.
|
24
25
|
"""
|
26
|
+
|
27
|
+
speed: typing_extensions.NotRequired[ModelSpeed]
|
@@ -5,12 +5,13 @@ import typing_extensions
|
|
5
5
|
from .output_format import OutputFormatParams
|
6
6
|
from .tts_request_voice_specifier import TtsRequestVoiceSpecifierParams
|
7
7
|
from ...core.serialization import FieldMetadata
|
8
|
+
from ..types.model_speed import ModelSpeed
|
8
9
|
|
9
10
|
|
10
11
|
class WebSocketTtsRequestParams(typing_extensions.TypedDict):
|
11
12
|
model_id: str
|
12
13
|
"""
|
13
|
-
The ID of the model to use for the generation. See [Models](/build-with-
|
14
|
+
The ID of the model to use for the generation. See [Models](/build-with-cartesia/models) for available models.
|
14
15
|
"""
|
15
16
|
|
16
17
|
output_format: typing_extensions.NotRequired[OutputFormatParams]
|
@@ -23,3 +24,5 @@ class WebSocketTtsRequestParams(typing_extensions.TypedDict):
|
|
23
24
|
add_phoneme_timestamps: typing_extensions.NotRequired[bool]
|
24
25
|
continue_: typing_extensions.NotRequired[typing_extensions.Annotated[bool, FieldMetadata(alias="continue")]]
|
25
26
|
context_id: typing_extensions.NotRequired[str]
|
27
|
+
max_buffer_delay_ms: typing_extensions.NotRequired[int]
|
28
|
+
speed: typing_extensions.NotRequired[ModelSpeed]
|
cartesia/tts/types/__init__.py
CHANGED
@@ -6,6 +6,7 @@ from .controls import Controls
|
|
6
6
|
from .emotion import Emotion
|
7
7
|
from .flush_id import FlushId
|
8
8
|
from .generation_request import GenerationRequest
|
9
|
+
from .model_speed import ModelSpeed
|
9
10
|
from .mp_3_output_format import Mp3OutputFormat
|
10
11
|
from .natural_specifier import NaturalSpecifier
|
11
12
|
from .numerical_specifier import NumericalSpecifier
|
@@ -50,6 +51,7 @@ __all__ = [
|
|
50
51
|
"Emotion",
|
51
52
|
"FlushId",
|
52
53
|
"GenerationRequest",
|
54
|
+
"ModelSpeed",
|
53
55
|
"Mp3OutputFormat",
|
54
56
|
"NaturalSpecifier",
|
55
57
|
"NumericalSpecifier",
|
@@ -6,6 +6,7 @@ import typing
|
|
6
6
|
from .tts_request_voice_specifier import TtsRequestVoiceSpecifier
|
7
7
|
from .supported_language import SupportedLanguage
|
8
8
|
from .web_socket_raw_output_format import WebSocketRawOutputFormat
|
9
|
+
from .model_speed import ModelSpeed
|
9
10
|
from .context_id import ContextId
|
10
11
|
import typing_extensions
|
11
12
|
from ...core.serialization import FieldMetadata
|
@@ -15,7 +16,7 @@ from ...core.pydantic_utilities import IS_PYDANTIC_V2
|
|
15
16
|
class GenerationRequest(UniversalBaseModel):
|
16
17
|
model_id: str = pydantic.Field()
|
17
18
|
"""
|
18
|
-
The ID of the model to use for the generation. See [Models](/build-with-
|
19
|
+
The ID of the model to use for the generation. See [Models](/build-with-cartesia/models) for available models.
|
19
20
|
"""
|
20
21
|
|
21
22
|
transcript: typing.Optional[typing.Any] = pydantic.Field(default=None)
|
@@ -32,6 +33,7 @@ class GenerationRequest(UniversalBaseModel):
|
|
32
33
|
If the duration is not appropriate for the length of the transcript, the output audio may be truncated.
|
33
34
|
"""
|
34
35
|
|
36
|
+
speed: typing.Optional[ModelSpeed] = None
|
35
37
|
context_id: typing.Optional[ContextId] = None
|
36
38
|
continue_: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="continue")] = pydantic.Field(
|
37
39
|
default=None
|
@@ -41,6 +43,15 @@ class GenerationRequest(UniversalBaseModel):
|
|
41
43
|
If not specified, this defaults to `false`.
|
42
44
|
"""
|
43
45
|
|
46
|
+
max_buffer_delay_ms: typing.Optional[int] = pydantic.Field(default=None)
|
47
|
+
"""
|
48
|
+
The maximum time in milliseconds to buffer text before starting generation. Values between [0, 1000]ms are supported. Defaults to 0 (no buffering).
|
49
|
+
|
50
|
+
When set, the model will buffer incoming text chunks until it's confident it has enough context to generate high-quality speech, or the buffer delay elapses, whichever comes first. Without this option set, the model will kick off generations immediately, ceding control of buffering to the user.
|
51
|
+
|
52
|
+
Use this to balance responsiveness with higher quality speech generation, which often benefits from having more context.
|
53
|
+
"""
|
54
|
+
|
44
55
|
flush: typing.Optional[bool] = pydantic.Field(default=None)
|
45
56
|
"""
|
46
57
|
Whether to flush the context.
|
@@ -6,13 +6,14 @@ from .tts_request_voice_specifier import TtsRequestVoiceSpecifier
|
|
6
6
|
import typing
|
7
7
|
from .supported_language import SupportedLanguage
|
8
8
|
from .output_format import OutputFormat
|
9
|
+
from .model_speed import ModelSpeed
|
9
10
|
from ...core.pydantic_utilities import IS_PYDANTIC_V2
|
10
11
|
|
11
12
|
|
12
13
|
class TtsRequest(UniversalBaseModel):
|
13
14
|
model_id: str = pydantic.Field()
|
14
15
|
"""
|
15
|
-
The ID of the model to use for the generation. See [Models](/build-with-
|
16
|
+
The ID of the model to use for the generation. See [Models](/build-with-cartesia/models) for available models.
|
16
17
|
"""
|
17
18
|
|
18
19
|
transcript: str
|
@@ -25,6 +26,8 @@ class TtsRequest(UniversalBaseModel):
|
|
25
26
|
If the duration is not appropriate for the length of the transcript, the output audio may be truncated.
|
26
27
|
"""
|
27
28
|
|
29
|
+
speed: typing.Optional[ModelSpeed] = None
|
30
|
+
|
28
31
|
if IS_PYDANTIC_V2:
|
29
32
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
30
33
|
else:
|
@@ -7,13 +7,14 @@ from .output_format import OutputFormat
|
|
7
7
|
from .tts_request_voice_specifier import TtsRequestVoiceSpecifier
|
8
8
|
import typing_extensions
|
9
9
|
from ...core.serialization import FieldMetadata
|
10
|
+
from .model_speed import ModelSpeed
|
10
11
|
from ...core.pydantic_utilities import IS_PYDANTIC_V2
|
11
12
|
|
12
13
|
|
13
14
|
class WebSocketTtsRequest(UniversalBaseModel):
|
14
15
|
model_id: str = pydantic.Field()
|
15
16
|
"""
|
16
|
-
The ID of the model to use for the generation. See [Models](/build-with-
|
17
|
+
The ID of the model to use for the generation. See [Models](/build-with-cartesia/models) for available models.
|
17
18
|
"""
|
18
19
|
|
19
20
|
output_format: typing.Optional[OutputFormat] = None
|
@@ -26,6 +27,8 @@ class WebSocketTtsRequest(UniversalBaseModel):
|
|
26
27
|
add_phoneme_timestamps: typing.Optional[bool] = None
|
27
28
|
continue_: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="continue")] = None
|
28
29
|
context_id: typing.Optional[str] = None
|
30
|
+
max_buffer_delay_ms: typing.Optional[int] = None
|
31
|
+
speed: typing.Optional[ModelSpeed] = None
|
29
32
|
|
30
33
|
if IS_PYDANTIC_V2:
|
31
34
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
cartesia/voices/client.py
CHANGED
@@ -14,8 +14,8 @@ from ..core.api_error import ApiError
|
|
14
14
|
from .. import core
|
15
15
|
from ..tts.types.supported_language import SupportedLanguage
|
16
16
|
from .types.clone_mode import CloneMode
|
17
|
-
from .types.voice_metadata import VoiceMetadata
|
18
17
|
from .types.voice_id import VoiceId
|
18
|
+
from .types.voice_metadata import VoiceMetadata
|
19
19
|
from ..core.jsonable_encoder import jsonable_encoder
|
20
20
|
from .types.localize_target_language import LocalizeTargetLanguage
|
21
21
|
from .types.gender import Gender
|
@@ -148,9 +148,9 @@ class VoicesClient:
|
|
148
148
|
name: str,
|
149
149
|
language: SupportedLanguage,
|
150
150
|
mode: CloneMode,
|
151
|
-
enhance: bool,
|
152
151
|
description: typing.Optional[str] = OMIT,
|
153
|
-
|
152
|
+
enhance: typing.Optional[bool] = OMIT,
|
153
|
+
base_voice_id: typing.Optional[VoiceId] = OMIT,
|
154
154
|
request_options: typing.Optional[RequestOptions] = None,
|
155
155
|
) -> VoiceMetadata:
|
156
156
|
"""
|
@@ -177,16 +177,16 @@ class VoicesClient:
|
|
177
177
|
Tradeoff between similarity and stability. Similarity clones sound more like the source clip, but may reproduce background noise. Stability clones always sound like a studio recording, but may not sound as similar to the source clip.
|
178
178
|
|
179
179
|
|
180
|
-
enhance : bool
|
181
|
-
Whether to enhance the clip to improve its quality before cloning. Useful if the clip has background noise.
|
182
|
-
|
183
|
-
|
184
180
|
description : typing.Optional[str]
|
185
181
|
A description for the voice.
|
186
182
|
|
187
183
|
|
188
|
-
|
189
|
-
|
184
|
+
enhance : typing.Optional[bool]
|
185
|
+
Whether to apply AI enhancements to the clip to reduce background noise. This leads to cleaner generated speech at the cost of reduced similarity to the source clip.
|
186
|
+
|
187
|
+
|
188
|
+
base_voice_id : typing.Optional[VoiceId]
|
189
|
+
Optional base voice ID that the cloned voice is derived from.
|
190
190
|
|
191
191
|
|
192
192
|
request_options : typing.Optional[RequestOptions]
|
@@ -208,7 +208,6 @@ class VoicesClient:
|
|
208
208
|
description="Copied from Cartesia docs",
|
209
209
|
mode="stability",
|
210
210
|
language="en",
|
211
|
-
enhance=True,
|
212
211
|
)
|
213
212
|
"""
|
214
213
|
_response = self._client_wrapper.httpx_client.request(
|
@@ -220,7 +219,7 @@ class VoicesClient:
|
|
220
219
|
"language": language,
|
221
220
|
"mode": mode,
|
222
221
|
"enhance": enhance,
|
223
|
-
"
|
222
|
+
"base_voice_id": base_voice_id,
|
224
223
|
},
|
225
224
|
files={
|
226
225
|
"clip": clip,
|
@@ -717,9 +716,9 @@ class AsyncVoicesClient:
|
|
717
716
|
name: str,
|
718
717
|
language: SupportedLanguage,
|
719
718
|
mode: CloneMode,
|
720
|
-
enhance: bool,
|
721
719
|
description: typing.Optional[str] = OMIT,
|
722
|
-
|
720
|
+
enhance: typing.Optional[bool] = OMIT,
|
721
|
+
base_voice_id: typing.Optional[VoiceId] = OMIT,
|
723
722
|
request_options: typing.Optional[RequestOptions] = None,
|
724
723
|
) -> VoiceMetadata:
|
725
724
|
"""
|
@@ -746,16 +745,16 @@ class AsyncVoicesClient:
|
|
746
745
|
Tradeoff between similarity and stability. Similarity clones sound more like the source clip, but may reproduce background noise. Stability clones always sound like a studio recording, but may not sound as similar to the source clip.
|
747
746
|
|
748
747
|
|
749
|
-
enhance : bool
|
750
|
-
Whether to enhance the clip to improve its quality before cloning. Useful if the clip has background noise.
|
751
|
-
|
752
|
-
|
753
748
|
description : typing.Optional[str]
|
754
749
|
A description for the voice.
|
755
750
|
|
756
751
|
|
757
|
-
|
758
|
-
|
752
|
+
enhance : typing.Optional[bool]
|
753
|
+
Whether to apply AI enhancements to the clip to reduce background noise. This leads to cleaner generated speech at the cost of reduced similarity to the source clip.
|
754
|
+
|
755
|
+
|
756
|
+
base_voice_id : typing.Optional[VoiceId]
|
757
|
+
Optional base voice ID that the cloned voice is derived from.
|
759
758
|
|
760
759
|
|
761
760
|
request_options : typing.Optional[RequestOptions]
|
@@ -782,7 +781,6 @@ class AsyncVoicesClient:
|
|
782
781
|
description="Copied from Cartesia docs",
|
783
782
|
mode="stability",
|
784
783
|
language="en",
|
785
|
-
enhance=True,
|
786
784
|
)
|
787
785
|
|
788
786
|
|
@@ -797,7 +795,7 @@ class AsyncVoicesClient:
|
|
797
795
|
"language": language,
|
798
796
|
"mode": mode,
|
799
797
|
"enhance": enhance,
|
800
|
-
"
|
798
|
+
"base_voice_id": base_voice_id,
|
801
799
|
},
|
802
800
|
files={
|
803
801
|
"clip": clip,
|
@@ -1,15 +1,25 @@
|
|
1
|
-
cartesia/__init__.py,sha256=
|
1
|
+
cartesia/__init__.py,sha256=p9ilqR-oE6N6pPQbiKUbnfEdDy00ihjNTtg7ES7EHg0,8448
|
2
2
|
cartesia/api_status/__init__.py,sha256=_dHNLdknrBjxHtU2PvLumttJM-JTQhJQqhhAQkLqt_U,168
|
3
3
|
cartesia/api_status/client.py,sha256=GJ9Dq8iCn3hn8vCIqc6k1fCGEhSz0T0kaPGcdFnbMDY,3146
|
4
4
|
cartesia/api_status/requests/__init__.py,sha256=ilEMzEy1JEw484CuL92bX5lHGOznc62pjiDMgiZ0tKM,130
|
5
5
|
cartesia/api_status/requests/api_info.py,sha256=AmB6RpquI2yUlTQBtOk8e0qtLmXHYLcGZKpXZahOwmc,172
|
6
6
|
cartesia/api_status/types/__init__.py,sha256=6NUyGWiGK1Wl3mXlSMJN2ObKf2LK3vjX2MUP1uopfEQ,118
|
7
7
|
cartesia/api_status/types/api_info.py,sha256=o1LwSxnoHpCR7huw9J-cF6LRlC_fiftDQLYUz8p-vTc,568
|
8
|
-
cartesia/
|
8
|
+
cartesia/auth/__init__.py,sha256=T8_EGgzdzyJLqfD7DAgdkE6G1Ey2sUMyze-7x8HTzGg,355
|
9
|
+
cartesia/auth/client.py,sha256=gJurqzV5r-edd5DV2xc1Uy1Fm8Fi3ndaourZmbOh15E,5261
|
10
|
+
cartesia/auth/requests/__init__.py,sha256=hR7qCSJCPiOG7f8z8jTKQLOC7QoonSvvPKe0JbcEYEs,278
|
11
|
+
cartesia/auth/requests/token_grant.py,sha256=HTrgl6TsokxYIMXeTK-NjSKQ8WQfDwnbEfbyzirs0kk,251
|
12
|
+
cartesia/auth/requests/token_request.py,sha256=DeQQhHOLfmL4O3ZqrFq1FtxTDmTsYGpMtmRRiCvxUcE,498
|
13
|
+
cartesia/auth/requests/token_response.py,sha256=jXpHZmFe6RWO837e_lC2GJWwqO-b6KHOA-b6tTJVC54,211
|
14
|
+
cartesia/auth/types/__init__.py,sha256=iZrkHrlWs8e9KkR27f2IG-B72HC_N05A7Lcyt_EU9SM,242
|
15
|
+
cartesia/auth/types/token_grant.py,sha256=sdEqlqS95XSy_Xdp4TEeRSC1hQp4nbPv1HHZFxbU0So,666
|
16
|
+
cartesia/auth/types/token_request.py,sha256=2cx2OBXTEjrbuVMOpBzkIm9-DZD2mGiWE6Ui3kumxGI,893
|
17
|
+
cartesia/auth/types/token_response.py,sha256=_GcvfQdjwgNu1ODj8EuTkaMsez508a6xuOo8HOVNOJQ,626
|
18
|
+
cartesia/base_client.py,sha256=YH0l0UUzanAa9mDdJU6BFQ9XKELiaPTm9NsJpVQ4evA,6539
|
9
19
|
cartesia/client.py,sha256=sPAYQLt9W2E_2F17ooocvvJImuNyLrL8xUypgf6dZeI,6238
|
10
20
|
cartesia/core/__init__.py,sha256=-t9txgeQZL_1FDw_08GEoj4ft1Cn9Dti6X0Drsadlr0,1519
|
11
21
|
cartesia/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
|
12
|
-
cartesia/core/client_wrapper.py,sha256=
|
22
|
+
cartesia/core/client_wrapper.py,sha256=xKyHqaGJ7V2OuMGkVOEjxofnt8QaFjgiEIom7EWhBBI,1854
|
13
23
|
cartesia/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
|
14
24
|
cartesia/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
|
15
25
|
cartesia/core/http_client.py,sha256=KL5RGa0y4n8nX0-07WRg4ZQUTq30sc-XJbWcP5vjBDg,19552
|
@@ -41,20 +51,20 @@ cartesia/environment.py,sha256=Qnp91BGLic7hXmKsiYub2m3nPfvDWm59aB1wWta1J6A,160
|
|
41
51
|
cartesia/infill/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
42
52
|
cartesia/infill/client.py,sha256=PWE5Ak-wsaBM_8g52oDl9PYx76PkW6f900mnxvZf4Bk,12571
|
43
53
|
cartesia/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
44
|
-
cartesia/tts/__init__.py,sha256=
|
45
|
-
cartesia/tts/_async_websocket.py,sha256=
|
46
|
-
cartesia/tts/_websocket.py,sha256=
|
47
|
-
cartesia/tts/client.py,sha256=
|
54
|
+
cartesia/tts/__init__.py,sha256=YrVxJT7i-0wygFgN2hOVftYLEM7JoFgCo3SvLoN7pkA,4735
|
55
|
+
cartesia/tts/_async_websocket.py,sha256=tJ-6rdJrviKvGhSW8J8t-rCinXM5gXXQJgDO8OgW3EE,18805
|
56
|
+
cartesia/tts/_websocket.py,sha256=Uk6B-TP-0nzeyFE9w-_PzNIiVYP14rKqSDZlm6bU24Q,19271
|
57
|
+
cartesia/tts/client.py,sha256=0jWpiNKPp4QbyibfB2tsFb7wqQ9vb4m_QlLB-qxzKP8,15398
|
48
58
|
cartesia/tts/requests/__init__.py,sha256=0rcfMLHNbUhkRI1xS09UE4p-WT1BCqrcblFtPxcATOI,3261
|
49
59
|
cartesia/tts/requests/cancel_context_request.py,sha256=Wl8g-o5vwl9ENm-H1wsLx441FkIR_4Wt5UYtuWce2Yw,431
|
50
60
|
cartesia/tts/requests/controls.py,sha256=xzUJlfgqhaJ1A-JD0LTpoHYk4iEpCuGpSD7qE4YYsRg,285
|
51
|
-
cartesia/tts/requests/generation_request.py,sha256=
|
61
|
+
cartesia/tts/requests/generation_request.py,sha256=cUy--5WFsC7E-KEPVay3QpU_-a3GVGnatTKsBw6hIV4,2743
|
52
62
|
cartesia/tts/requests/mp_3_output_format.py,sha256=PGDVzC1d7-Jce12rFxtF8G1pTHmlUdiGAhykFTABg0w,316
|
53
63
|
cartesia/tts/requests/output_format.py,sha256=8TKu9AAeHCR5L4edzYch8FIYIldn4bM7ySrsCl8W_g8,842
|
54
64
|
cartesia/tts/requests/phoneme_timestamps.py,sha256=ft81nmqElZAnvTBT27lY6YWfF18ZGsCx3Y1XHv9J7cM,267
|
55
65
|
cartesia/tts/requests/raw_output_format.py,sha256=S60Vp7DeAATCMLF3bXgxhw0zILJBWJ9GhI9irAg_UkI,316
|
56
66
|
cartesia/tts/requests/speed.py,sha256=-YGBWwh7_VtCBnYlT5EVsnrmcHFMEBTxy9LathZhkMA,259
|
57
|
-
cartesia/tts/requests/tts_request.py,sha256=
|
67
|
+
cartesia/tts/requests/tts_request.py,sha256=KBoahYfPbDENlEWsqnR4z1ZIhGIJwhLrzQIzkbtqtzE,1021
|
58
68
|
cartesia/tts/requests/tts_request_embedding_specifier.py,sha256=-M54ZjV0H5LPwcKtz0bOVqlkvO1pPiMbqMbVBMko3Ns,565
|
59
69
|
cartesia/tts/requests/tts_request_id_specifier.py,sha256=-0ClfyJnnaH0uAcF5r84s3cM_cw2wT39dp6T4JYzOQ8,536
|
60
70
|
cartesia/tts/requests/tts_request_voice_specifier.py,sha256=eGzL4aVGq4gKPxeglsV7-wuhxg8x33Qth3uFTTytgeI,337
|
@@ -71,16 +81,17 @@ cartesia/tts/requests/web_socket_response.py,sha256=WqZ6RgO4suG78wiVSIsOWwyXBioV
|
|
71
81
|
cartesia/tts/requests/web_socket_stream_options.py,sha256=VIvblFw9hGZvDzFpOnC11G0NvrFSVt-1-0sY5rpcZPI,232
|
72
82
|
cartesia/tts/requests/web_socket_timestamps_response.py,sha256=MK3zN2Q_PVWJtX5DidNB0uXoF2o33rv6qCYPVaourxY,351
|
73
83
|
cartesia/tts/requests/web_socket_tts_output.py,sha256=pX2uf0XVdziFhXCydwLlVOWb-LvBiuq-cBI6R1INiMg,760
|
74
|
-
cartesia/tts/requests/web_socket_tts_request.py,sha256=
|
84
|
+
cartesia/tts/requests/web_socket_tts_request.py,sha256=RBFrdmYe0SRlzhEUwhTFCL8ZC1tbIwD2aFnUgF-my80,1260
|
75
85
|
cartesia/tts/requests/word_timestamps.py,sha256=WMfBJtETi6wTpES0pYZCFfFRfEbzWE-RtosDJ5seUWg,261
|
76
86
|
cartesia/tts/socket_client.py,sha256=zTPayHbgy-yQQ50AE1HXN4GMyanisZcLXf7Ds1paYks,11621
|
77
|
-
cartesia/tts/types/__init__.py,sha256=
|
87
|
+
cartesia/tts/types/__init__.py,sha256=44KWnBiqkNHZZpy8M5uze8cdEFE79sbMRVJStxQSEhM,3305
|
78
88
|
cartesia/tts/types/cancel_context_request.py,sha256=zInhk3qRZsSc0F1aYJ-Q5BHJsosTrb22IJWhzue-eKE,856
|
79
89
|
cartesia/tts/types/context_id.py,sha256=UCEtq5xFGOeBCECcY6Y-gYVe_Peg1hFhH9YYOkpApQg,81
|
80
90
|
cartesia/tts/types/controls.py,sha256=H4CSu79mM1Ld4NZx_5uXw3EwRzTEMQRxKBRvFpcFb8Y,644
|
81
91
|
cartesia/tts/types/emotion.py,sha256=zocyDcHTiFFnNRgo2YLMi70iGyffa080B4mkg9lcqVc,764
|
82
92
|
cartesia/tts/types/flush_id.py,sha256=HCIKo9o8d7YWKtaSNU3TEvfUVBju93ckGQy01Z9wLcE,79
|
83
|
-
cartesia/tts/types/generation_request.py,sha256=
|
93
|
+
cartesia/tts/types/generation_request.py,sha256=H5ZaNGH2ngTZY-NQ7wqLUiIAArH8KFo3rt690bxWCUw,3242
|
94
|
+
cartesia/tts/types/model_speed.py,sha256=iiTj8V0piFCX2FZh5B8EkgRhZDlj4z3VFcQhp66e7y8,160
|
84
95
|
cartesia/tts/types/mp_3_output_format.py,sha256=0WGblkuDUL7pZO1aRuQ_mU2Z5gN9xIabRfRKkjtzms8,731
|
85
96
|
cartesia/tts/types/natural_specifier.py,sha256=K526P1RRuBGy80hyd_tX8tohPrE8DR9EgTCxS5wce0o,188
|
86
97
|
cartesia/tts/types/numerical_specifier.py,sha256=tJpIskWO545luCKMFM9JlVc7VVhBhSvqL1qurhzL9cI,92
|
@@ -90,7 +101,7 @@ cartesia/tts/types/raw_encoding.py,sha256=eyc2goiYOTxWcuKHAgYZ2SrnfePW22Fbmc-5fG
|
|
90
101
|
cartesia/tts/types/raw_output_format.py,sha256=jZGVaS0KIi9mU6trfskgA3HbMKJolhrwICnuDhF01ic,673
|
91
102
|
cartesia/tts/types/speed.py,sha256=4c5WdxocBw6WSMnundSaNnceUeooU0vikhy00FW6M-w,239
|
92
103
|
cartesia/tts/types/supported_language.py,sha256=riDRduThMbMWAq9i2uCfxhwVTpgaFwNDZ9LhEIl4zHY,237
|
93
|
-
cartesia/tts/types/tts_request.py,sha256=
|
104
|
+
cartesia/tts/types/tts_request.py,sha256=FGcxW-siiQpEzJZSHMET3nDSYHSzRt3WSTO-cCEz9u4,1376
|
94
105
|
cartesia/tts/types/tts_request_embedding_specifier.py,sha256=eL_qCEr4pvWfy4qp9hZBuVdCincX5DBVqfv1vLt2_Vk,942
|
95
106
|
cartesia/tts/types/tts_request_id_specifier.py,sha256=ktGdkkTRQ9scA-lt8qJ2jn_E5WzoOK8AXMrVqi71gf0,906
|
96
107
|
cartesia/tts/types/tts_request_voice_specifier.py,sha256=p-3UQ62uFL1SgbX73Ex1D_V73Ef0wmT1ApOt1iLZmwE,307
|
@@ -107,7 +118,7 @@ cartesia/tts/types/web_socket_response.py,sha256=mHDECZ4K84QmN2s0IWuBsXBt83Yq7Qx
|
|
107
118
|
cartesia/tts/types/web_socket_stream_options.py,sha256=MhDSxBFqMuQeWjoyPqXVnTEzLjF8g6aojeigb5dQUgU,596
|
108
119
|
cartesia/tts/types/web_socket_timestamps_response.py,sha256=kuWXI82ncF1QapnaHEjwrL84qWob7ByQU-yh1e0IEmk,667
|
109
120
|
cartesia/tts/types/web_socket_tts_output.py,sha256=uvkv0smTBhdm18Rl17C0Ml4Inh79YBHNzAcKnZBs14Y,979
|
110
|
-
cartesia/tts/types/web_socket_tts_request.py,sha256=
|
121
|
+
cartesia/tts/types/web_socket_tts_request.py,sha256=TlqUQPhqZcDZ6jgpzLqzJnYVGBIc9_TQYSu_SVYkVVk,1567
|
111
122
|
cartesia/tts/types/word_timestamps.py,sha256=XZ2Q0prdb3F9c3AiOKXu4s3A3jBxE-qIt1npHOf16R0,631
|
112
123
|
cartesia/tts/utils/constants.py,sha256=1CHa5flJf8--L_eYyOyOiWJNZ-Q81ufHZxDbJs8xYSk,418
|
113
124
|
cartesia/tts/utils/tts.py,sha256=u7PgPxlJs6fcQTfr-jqAvBCAaK3JWLhF5QF4s-PwoMo,2093
|
@@ -121,7 +132,7 @@ cartesia/voice_changer/types/__init__.py,sha256=qAiHsdRpnFeS0lBkYp_NRrhSJiRXCg5-
|
|
121
132
|
cartesia/voice_changer/types/output_format_container.py,sha256=RqLDELdgeOjYqNTJX1Le62qjiFiJGxf0cYnol88-LLM,166
|
122
133
|
cartesia/voice_changer/types/streaming_response.py,sha256=rQ4ZehtOHsCBKijyULz_ahGQYNj1yus6AM6u2wgcBsI,1963
|
123
134
|
cartesia/voices/__init__.py,sha256=2D58Bir45LvcvP08QMnPlFE8DD8BONTjPLkIDdKs7vg,1891
|
124
|
-
cartesia/voices/client.py,sha256=
|
135
|
+
cartesia/voices/client.py,sha256=A_PEoCLko1znexKKicp-gZVMUcSpDoKqz3p1r4Aa04k,38993
|
125
136
|
cartesia/voices/requests/__init__.py,sha256=XiBJbSYeQCgFMtwywKvQ0Nmp7Zf_0WskzRhgr9c8h38,1072
|
126
137
|
cartesia/voices/requests/create_voice_request.py,sha256=r6dKb9ga0ZsAi_6PXuE43u2lLgfQg2DIYjk2Neng7pI,617
|
127
138
|
cartesia/voices/requests/embedding_response.py,sha256=PGZkBD8UBcv2MYQbBXyD4T6lzaE9oSGGwXx-MoXCp0M,228
|
@@ -160,6 +171,6 @@ cartesia/voices/types/voice_expand_options.py,sha256=e4FroWdlxEE-LXQfT1RWlGHtswl
|
|
160
171
|
cartesia/voices/types/voice_id.py,sha256=GDoXcRVeIm-V21R4suxG2zqLD3DLYkXE9kgizadzFKo,79
|
161
172
|
cartesia/voices/types/voice_metadata.py,sha256=4KNGjXMUKm3niv-NvKIFVGtiilpH13heuzKcZYNQxk4,1181
|
162
173
|
cartesia/voices/types/weight.py,sha256=XqDU7_JItNUb5QykIDqTbELlRYQdbt2SviRgW0w2LKo,80
|
163
|
-
cartesia-2.0.
|
164
|
-
cartesia-2.0.
|
165
|
-
cartesia-2.0.
|
174
|
+
cartesia-2.0.3.dist-info/METADATA,sha256=cW9xivCIN1lB-8xc8V_-DMwh0pwJa3gwmsYO3XwJl0M,11206
|
175
|
+
cartesia-2.0.3.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
176
|
+
cartesia-2.0.3.dist-info/RECORD,,
|
File without changes
|