cartesia 2.0.7__py3-none-any.whl → 2.0.8__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 CHANGED
@@ -52,11 +52,7 @@ from .tts import (
52
52
  Controls,
53
53
  ControlsParams,
54
54
  Emotion,
55
- ExperimentalModelControls,
56
- ExperimentalModelControlsParams,
57
55
  FlushId,
58
- GenerationConfig,
59
- GenerationConfigParams,
60
56
  GenerationRequest,
61
57
  GenerationRequestParams,
62
58
  ModelSpeed,
@@ -217,16 +213,12 @@ __all__ = [
217
213
  "Emotion",
218
214
  "ErrorMessage",
219
215
  "ErrorMessageParams",
220
- "ExperimentalModelControls",
221
- "ExperimentalModelControlsParams",
222
216
  "FilePurpose",
223
217
  "FlushDoneMessage",
224
218
  "FlushDoneMessageParams",
225
219
  "FlushId",
226
220
  "Gender",
227
221
  "GenderPresentation",
228
- "GenerationConfig",
229
- "GenerationConfigParams",
230
222
  "GenerationRequest",
231
223
  "GenerationRequestParams",
232
224
  "GetVoicesResponse",
@@ -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.7",
19
+ "X-Fern-SDK-Version": "2.0.8",
20
20
  }
21
21
  headers["X-API-Key"] = self.api_key
22
22
  headers["Cartesia-Version"] = "2024-11-13"
cartesia/tts/__init__.py CHANGED
@@ -5,9 +5,7 @@ from .types import (
5
5
  ContextId,
6
6
  Controls,
7
7
  Emotion,
8
- ExperimentalModelControls,
9
8
  FlushId,
10
- GenerationConfig,
11
9
  GenerationRequest,
12
10
  ModelSpeed,
13
11
  Mp3OutputFormat,
@@ -53,8 +51,6 @@ from .types import (
53
51
  from .requests import (
54
52
  CancelContextRequestParams,
55
53
  ControlsParams,
56
- ExperimentalModelControlsParams,
57
- GenerationConfigParams,
58
54
  GenerationRequestParams,
59
55
  Mp3OutputFormatParams,
60
56
  OutputFormatParams,
@@ -100,11 +96,7 @@ __all__ = [
100
96
  "Controls",
101
97
  "ControlsParams",
102
98
  "Emotion",
103
- "ExperimentalModelControls",
104
- "ExperimentalModelControlsParams",
105
99
  "FlushId",
106
- "GenerationConfig",
107
- "GenerationConfigParams",
108
100
  "GenerationRequest",
109
101
  "GenerationRequestParams",
110
102
  "ModelSpeed",
@@ -50,7 +50,6 @@ class _AsyncTTSContext:
50
50
  self._context_id = context_id
51
51
  self._websocket = websocket
52
52
  self.timeout = timeout
53
- self._error = None
54
53
 
55
54
  @property
56
55
  def context_id(self) -> str:
@@ -338,27 +337,28 @@ class AsyncTtsWebsocket(TtsWebsocket):
338
337
 
339
338
  async def close(self):
340
339
  """This method closes the websocket connection. *Highly* recommended to call this method when done."""
341
- if self.websocket is not None and not self._is_websocket_closed():
342
- await self.websocket.close()
343
- if self._processing_task:
344
- self._processing_task.cancel()
345
- try:
346
- self._processing_task = None
347
- except asyncio.CancelledError:
348
- pass
349
- except TypeError as e:
350
- # Ignore the error if the task is already canceled.
351
- # For some reason we are getting None responses
352
- # TODO: This needs to be fixed - we need to think about why we are getting None responses.
353
- if "Received message 256:None" not in str(e):
354
- raise e
355
-
356
- for context_id in list(self._context_queues.keys()):
357
- self._remove_context(context_id)
358
-
359
- self._context_queues.clear()
360
- self._processing_task = None
361
- self.websocket = None
340
+ self._closing = True
341
+ try:
342
+ if self._processing_task:
343
+ self._processing_task.cancel()
344
+ try:
345
+ await self._processing_task
346
+ except asyncio.CancelledError:
347
+ pass
348
+ finally:
349
+ self._processing_task = None
350
+
351
+ if self.websocket is not None and not self._is_websocket_closed():
352
+ await self.websocket.close()
353
+
354
+ for context_id in list(self._context_queues.keys()):
355
+ self._remove_context(context_id)
356
+
357
+ self._context_queues.clear()
358
+ self._processing_task = None
359
+ self.websocket = None
360
+ finally:
361
+ self._closing = False
362
362
 
363
363
  async def send(
364
364
  self,
@@ -444,6 +444,16 @@ class AsyncTtsWebsocket(TtsWebsocket):
444
444
  ),
445
445
  )
446
446
 
447
+ def _is_close_error(self, e: TypeError) -> bool:
448
+ # TODO: This method checks the error string, but should check the code directly if/when aiohttp
449
+ # adds the code as a field to the error
450
+ exception_str = str(e)
451
+ return (
452
+ f"{aiohttp.WSMsgType.CLOSING}:None" in exception_str
453
+ or f"{aiohttp.WSMsgType.CLOSED}:None" in exception_str
454
+ or f"{aiohttp.WSMsgType.CLOSE}:1000" in exception_str
455
+ )
456
+
447
457
  async def _process_responses(self):
448
458
  try:
449
459
  while True:
@@ -453,8 +463,13 @@ class AsyncTtsWebsocket(TtsWebsocket):
453
463
  flush_id = response.get("flush_id", -1)
454
464
  if context_id in self._context_queues:
455
465
  await self._context_queues[context_id][flush_id].put(response)
456
- except Exception as e:
457
- self._error = e
466
+ except TypeError as e:
467
+ # If the WebSocket is closing and the error is a close error, ignore it.
468
+ if self._closing and self._is_close_error(e):
469
+ return
470
+ # Otherwise, if this is a close error, raise a more clear error.
471
+ if self._is_close_error(e):
472
+ raise RuntimeError(f"WebSocket closed unexpectedly: {e}")
458
473
  raise e
459
474
 
460
475
  async def _get_message(
@@ -46,7 +46,6 @@ class _TTSContext:
46
46
  def __init__(self, context_id: str, websocket: "TtsWebsocket"):
47
47
  self._context_id = context_id
48
48
  self._websocket = websocket
49
- self._error = None
50
49
 
51
50
  def __del__(self):
52
51
  self._close()
cartesia/tts/client.py CHANGED
@@ -6,7 +6,6 @@ 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
8
  from .types.model_speed import ModelSpeed
9
- from .requests.generation_config import GenerationConfigParams
10
9
  from ..core.request_options import RequestOptions
11
10
  from ..core.serialization import convert_and_respect_annotation_metadata
12
11
  from json.decoder import JSONDecodeError
@@ -37,7 +36,6 @@ class TtsClient:
37
36
  language: typing.Optional[SupportedLanguage] = OMIT,
38
37
  duration: typing.Optional[float] = OMIT,
39
38
  speed: typing.Optional[ModelSpeed] = OMIT,
40
- generation_config: typing.Optional[GenerationConfigParams] = OMIT,
41
39
  request_options: typing.Optional[RequestOptions] = None,
42
40
  ) -> typing.Iterator[bytes]:
43
41
  """
@@ -60,8 +58,6 @@ class TtsClient:
60
58
 
61
59
  speed : typing.Optional[ModelSpeed]
62
60
 
63
- generation_config : typing.Optional[GenerationConfigParams]
64
-
65
61
  request_options : typing.Optional[RequestOptions]
66
62
  Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
67
63
 
@@ -103,9 +99,6 @@ class TtsClient:
103
99
  ),
104
100
  "duration": duration,
105
101
  "speed": speed,
106
- "generation_config": convert_and_respect_annotation_metadata(
107
- object_=generation_config, annotation=GenerationConfigParams, direction="write"
108
- ),
109
102
  },
110
103
  request_options=request_options,
111
104
  omit=OMIT,
@@ -257,7 +250,6 @@ class AsyncTtsClient:
257
250
  language: typing.Optional[SupportedLanguage] = OMIT,
258
251
  duration: typing.Optional[float] = OMIT,
259
252
  speed: typing.Optional[ModelSpeed] = OMIT,
260
- generation_config: typing.Optional[GenerationConfigParams] = OMIT,
261
253
  request_options: typing.Optional[RequestOptions] = None,
262
254
  ) -> typing.AsyncIterator[bytes]:
263
255
  """
@@ -280,8 +272,6 @@ class AsyncTtsClient:
280
272
 
281
273
  speed : typing.Optional[ModelSpeed]
282
274
 
283
- generation_config : typing.Optional[GenerationConfigParams]
284
-
285
275
  request_options : typing.Optional[RequestOptions]
286
276
  Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
287
277
 
@@ -331,9 +321,6 @@ class AsyncTtsClient:
331
321
  ),
332
322
  "duration": duration,
333
323
  "speed": speed,
334
- "generation_config": convert_and_respect_annotation_metadata(
335
- object_=generation_config, annotation=GenerationConfigParams, direction="write"
336
- ),
337
324
  },
338
325
  request_options=request_options,
339
326
  omit=OMIT,
@@ -2,8 +2,6 @@
2
2
 
3
3
  from .cancel_context_request import CancelContextRequestParams
4
4
  from .controls import ControlsParams
5
- from .experimental_model_controls import ExperimentalModelControlsParams
6
- from .generation_config import GenerationConfigParams
7
5
  from .generation_request import GenerationRequestParams
8
6
  from .mp_3_output_format import Mp3OutputFormatParams
9
7
  from .output_format import OutputFormatParams, OutputFormat_Mp3Params, OutputFormat_RawParams, OutputFormat_WavParams
@@ -43,8 +41,6 @@ from .word_timestamps import WordTimestampsParams
43
41
  __all__ = [
44
42
  "CancelContextRequestParams",
45
43
  "ControlsParams",
46
- "ExperimentalModelControlsParams",
47
- "GenerationConfigParams",
48
44
  "GenerationRequestParams",
49
45
  "Mp3OutputFormatParams",
50
46
  "OutputFormatParams",
@@ -6,7 +6,6 @@ import typing_extensions
6
6
  from ..types.supported_language import SupportedLanguage
7
7
  from .output_format import OutputFormatParams
8
8
  from ..types.model_speed import ModelSpeed
9
- from .generation_config import GenerationConfigParams
10
9
 
11
10
 
12
11
  class TtsRequestParams(typing_extensions.TypedDict):
@@ -26,4 +25,3 @@ class TtsRequestParams(typing_extensions.TypedDict):
26
25
  """
27
26
 
28
27
  speed: typing_extensions.NotRequired[ModelSpeed]
29
- generation_config: typing_extensions.NotRequired[GenerationConfigParams]
@@ -4,9 +4,7 @@ from .cancel_context_request import CancelContextRequest
4
4
  from .context_id import ContextId
5
5
  from .controls import Controls
6
6
  from .emotion import Emotion
7
- from .experimental_model_controls import ExperimentalModelControls
8
7
  from .flush_id import FlushId
9
- from .generation_config import GenerationConfig
10
8
  from .generation_request import GenerationRequest
11
9
  from .model_speed import ModelSpeed
12
10
  from .mp_3_output_format import Mp3OutputFormat
@@ -53,9 +51,7 @@ __all__ = [
53
51
  "ContextId",
54
52
  "Controls",
55
53
  "Emotion",
56
- "ExperimentalModelControls",
57
54
  "FlushId",
58
- "GenerationConfig",
59
55
  "GenerationRequest",
60
56
  "ModelSpeed",
61
57
  "Mp3OutputFormat",
@@ -7,7 +7,6 @@ import typing
7
7
  from .supported_language import SupportedLanguage
8
8
  from .output_format import OutputFormat
9
9
  from .model_speed import ModelSpeed
10
- from .generation_config import GenerationConfig
11
10
  from ...core.pydantic_utilities import IS_PYDANTIC_V2
12
11
 
13
12
 
@@ -28,7 +27,6 @@ class TtsRequest(UniversalBaseModel):
28
27
  """
29
28
 
30
29
  speed: typing.Optional[ModelSpeed] = None
31
- generation_config: typing.Optional[GenerationConfig] = None
32
30
 
33
31
  if IS_PYDANTIC_V2:
34
32
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.1
2
2
  Name: cartesia
3
- Version: 2.0.7
3
+ Version: 2.0.8
4
4
  Summary:
5
5
  Requires-Python: >=3.8,<4.0
6
6
  Classifier: Intended Audience :: Developers
@@ -16,7 +16,6 @@ Classifier: Programming Language :: Python :: 3.9
16
16
  Classifier: Programming Language :: Python :: 3.10
17
17
  Classifier: Programming Language :: Python :: 3.11
18
18
  Classifier: Programming Language :: Python :: 3.12
19
- Classifier: Programming Language :: Python :: 3.13
20
19
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
20
  Classifier: Typing :: Typed
22
21
  Requires-Dist: aiohttp (>=3.10.10)
@@ -29,7 +28,6 @@ Requires-Dist: pydantic-core (>=2.18.2,<3.0.0)
29
28
  Requires-Dist: pydub (>=0.25.1)
30
29
  Requires-Dist: typing_extensions (>=4.0.0)
31
30
  Requires-Dist: websockets (>=10.4)
32
- Project-URL: Repository, https://github.com/cartesia-ai/cartesia-python
33
31
  Description-Content-Type: text/markdown
34
32
 
35
33
  # Cartesia Python Library
@@ -1,4 +1,4 @@
1
- cartesia/__init__.py,sha256=lBkEFiaSL1JdrAqnRXLlVrjbhMyU2vkSzbIOH8tzptI,10555
1
+ cartesia/__init__.py,sha256=P8YXd1NsmEHQOF4p0MpPMGLOSy_0cIPHOnFe-iV94oU,10311
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
@@ -19,7 +19,7 @@ cartesia/base_client.py,sha256=igAZOMDXz2Nv58oXHa7I9UfgxVN48drqhEmfsCCQlg8,6701
19
19
  cartesia/client.py,sha256=LoJjlJW2kJA-hyDt-Wu7QuKQsiTiLQfLYZjsjtewPJM,6537
20
20
  cartesia/core/__init__.py,sha256=-t9txgeQZL_1FDw_08GEoj4ft1Cn9Dti6X0Drsadlr0,1519
21
21
  cartesia/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
22
- cartesia/core/client_wrapper.py,sha256=5M1ORBWg2FutL5oJSkFfz1F3lbdMxk_vWBY6CPMCZWM,1854
22
+ cartesia/core/client_wrapper.py,sha256=JoQT3EFinsagzASKi5rc7WDSyStOFPy9Mgy6h0w46Pc,1854
23
23
  cartesia/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
24
24
  cartesia/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
25
25
  cartesia/core/http_client.py,sha256=KL5RGa0y4n8nX0-07WRg4ZQUTq30sc-XJbWcP5vjBDg,19552
@@ -74,15 +74,13 @@ cartesia/stt/types/timestamp_granularity.py,sha256=Oe39JvLeMgR2BIJnx32abhvs05dJe
74
74
  cartesia/stt/types/transcript_message.py,sha256=J-MchlahI96nVBiMSLJrEOXFw2pBShbMXVocysQRnrY,1693
75
75
  cartesia/stt/types/transcription_response.py,sha256=QMcD6eLmp_Z2uaRLVyxYYIdoiRiVSGhBoxN3kjRTK2I,1190
76
76
  cartesia/stt/types/transcription_word.py,sha256=yxTndKXNmToPOM6_F_QfF-B0dE6Kx8-UwBpHLj2_zWk,803
77
- cartesia/tts/__init__.py,sha256=rs8c52LHfOWvxKn57LOP9q-OS47gVXmkxBlkeW2ggUw,5171
78
- cartesia/tts/_async_websocket.py,sha256=tJ-6rdJrviKvGhSW8J8t-rCinXM5gXXQJgDO8OgW3EE,18805
79
- cartesia/tts/_websocket.py,sha256=bYaJ5vmCAl8AYrIJsqP3aA_nkFTeN3ey-Zc1nql_I3g,19274
80
- cartesia/tts/client.py,sha256=LbYypisx4hdiCUMAimjtqy9VOkXGlI4jSXxC9_6TXuY,18925
81
- cartesia/tts/requests/__init__.py,sha256=rRsvmYUnSEtOzTS9DdU391oVNRQKDWPG6BJcBKiHzRw,3614
77
+ cartesia/tts/__init__.py,sha256=DwNzIilOcdNUbeIHIknngnW8WyZ6K5xZremSQQoo5VM,4927
78
+ cartesia/tts/_async_websocket.py,sha256=yviop52kcrW490JSV8jdxSQITmbQzb0TOxNd1zmuZsg,19424
79
+ cartesia/tts/_websocket.py,sha256=K93vHOdxhF4-Duk8xunNnIpvkAT_ztfAtaomD5im8c0,19247
80
+ cartesia/tts/client.py,sha256=Oot_ctyaqBgRMpyBUaMwh3z1M62oPKVMXNvMkmo1fRw,18180
81
+ cartesia/tts/requests/__init__.py,sha256=SeITRF5QSAjOE5pNxbD6VffwwttMnQwuv0Z5n9h7BKs,3418
82
82
  cartesia/tts/requests/cancel_context_request.py,sha256=Wl8g-o5vwl9ENm-H1wsLx441FkIR_4Wt5UYtuWce2Yw,431
83
83
  cartesia/tts/requests/controls.py,sha256=xzUJlfgqhaJ1A-JD0LTpoHYk4iEpCuGpSD7qE4YYsRg,285
84
- cartesia/tts/requests/experimental_model_controls.py,sha256=ml7no5z_jnhy_21IXzSIYiar1OhNelCsD8A4lsfy4zk,687
85
- cartesia/tts/requests/generation_config.py,sha256=Y7TRIeN9qolqmnOG8-iUbcomtkDM8krYalHFwV_l1x4,863
86
84
  cartesia/tts/requests/generation_request.py,sha256=JQPumk0UMCHDQrcUvuqeDsdc8LCJAEolSs10LpJzK00,3083
87
85
  cartesia/tts/requests/mp_3_output_format.py,sha256=PGDVzC1d7-Jce12rFxtF8G1pTHmlUdiGAhykFTABg0w,316
88
86
  cartesia/tts/requests/output_format.py,sha256=8TKu9AAeHCR5L4edzYch8FIYIldn4bM7ySrsCl8W_g8,842
@@ -90,7 +88,7 @@ cartesia/tts/requests/phoneme_timestamps.py,sha256=ft81nmqElZAnvTBT27lY6YWfF18ZG
90
88
  cartesia/tts/requests/raw_output_format.py,sha256=S60Vp7DeAATCMLF3bXgxhw0zILJBWJ9GhI9irAg_UkI,316
91
89
  cartesia/tts/requests/speed.py,sha256=-YGBWwh7_VtCBnYlT5EVsnrmcHFMEBTxy9LathZhkMA,259
92
90
  cartesia/tts/requests/sse_output_format.py,sha256=z_f7dlDYNvpheYOSnf3lOslHF40vS852pYkxHTpqAcc,293
93
- cartesia/tts/requests/tts_request.py,sha256=W6YA4pdTXSIoYUKKzwojcwRwEMSglx-CQrYOJThEz48,1152
91
+ cartesia/tts/requests/tts_request.py,sha256=KBoahYfPbDENlEWsqnR4z1ZIhGIJwhLrzQIzkbtqtzE,1021
94
92
  cartesia/tts/requests/tts_request_embedding_specifier.py,sha256=-M54ZjV0H5LPwcKtz0bOVqlkvO1pPiMbqMbVBMko3Ns,565
95
93
  cartesia/tts/requests/tts_request_id_specifier.py,sha256=-0ClfyJnnaH0uAcF5r84s3cM_cw2wT39dp6T4JYzOQ8,536
96
94
  cartesia/tts/requests/tts_request_voice_specifier.py,sha256=eGzL4aVGq4gKPxeglsV7-wuhxg8x33Qth3uFTTytgeI,337
@@ -111,14 +109,12 @@ cartesia/tts/requests/web_socket_tts_output.py,sha256=pX2uf0XVdziFhXCydwLlVOWb-L
111
109
  cartesia/tts/requests/web_socket_tts_request.py,sha256=1jdRjRAO7z-KLOyp8FcDoQh933RGt-ZPR3E8Vz3XPnQ,1795
112
110
  cartesia/tts/requests/word_timestamps.py,sha256=WMfBJtETi6wTpES0pYZCFfFRfEbzWE-RtosDJ5seUWg,261
113
111
  cartesia/tts/socket_client.py,sha256=zTPayHbgy-yQQ50AE1HXN4GMyanisZcLXf7Ds1paYks,11621
114
- cartesia/tts/types/__init__.py,sha256=p75DSCxARgcSxNc4DF4L5nr-OvioMVe2Kl-HwtaAf3I,3610
112
+ cartesia/tts/types/__init__.py,sha256=rXphJ9b9nSYYrepr2ssG6ghtQAOQBQcLegxbl-XG3tw,3438
115
113
  cartesia/tts/types/cancel_context_request.py,sha256=zInhk3qRZsSc0F1aYJ-Q5BHJsosTrb22IJWhzue-eKE,856
116
114
  cartesia/tts/types/context_id.py,sha256=UCEtq5xFGOeBCECcY6Y-gYVe_Peg1hFhH9YYOkpApQg,81
117
115
  cartesia/tts/types/controls.py,sha256=H4CSu79mM1Ld4NZx_5uXw3EwRzTEMQRxKBRvFpcFb8Y,644
118
116
  cartesia/tts/types/emotion.py,sha256=zocyDcHTiFFnNRgo2YLMi70iGyffa080B4mkg9lcqVc,764
119
- cartesia/tts/types/experimental_model_controls.py,sha256=5DRCWspNWDojHt1uS441UjBqBQOjhJKqUAT0KwE1GBg,1075
120
117
  cartesia/tts/types/flush_id.py,sha256=HCIKo9o8d7YWKtaSNU3TEvfUVBju93ckGQy01Z9wLcE,79
121
- cartesia/tts/types/generation_config.py,sha256=q_nkXRSLJRNrCA93GAcu0Kp_C8o6W2VFx7bm38Hqts0,1249
122
118
  cartesia/tts/types/generation_request.py,sha256=ZGVXmHZLaZg7kEg1cVGXLpr8uB3btr2eZt0NEJRZnSU,3582
123
119
  cartesia/tts/types/model_speed.py,sha256=iiTj8V0piFCX2FZh5B8EkgRhZDlj4z3VFcQhp66e7y8,160
124
120
  cartesia/tts/types/mp_3_output_format.py,sha256=0WGblkuDUL7pZO1aRuQ_mU2Z5gN9xIabRfRKkjtzms8,731
@@ -131,7 +127,7 @@ cartesia/tts/types/raw_output_format.py,sha256=jZGVaS0KIi9mU6trfskgA3HbMKJolhrwI
131
127
  cartesia/tts/types/speed.py,sha256=4c5WdxocBw6WSMnundSaNnceUeooU0vikhy00FW6M-w,239
132
128
  cartesia/tts/types/sse_output_format.py,sha256=tRb4VcYqoPJMDyjfTZMCRTblT2NjwIsQhy1oMjxQWW0,676
133
129
  cartesia/tts/types/supported_language.py,sha256=riDRduThMbMWAq9i2uCfxhwVTpgaFwNDZ9LhEIl4zHY,237
134
- cartesia/tts/types/tts_request.py,sha256=DPmzRJX-vFCkqqe2HYgsLFDL1ed05TGb635BswaSXGQ,1488
130
+ cartesia/tts/types/tts_request.py,sha256=FGcxW-siiQpEzJZSHMET3nDSYHSzRt3WSTO-cCEz9u4,1376
135
131
  cartesia/tts/types/tts_request_embedding_specifier.py,sha256=eL_qCEr4pvWfy4qp9hZBuVdCincX5DBVqfv1vLt2_Vk,942
136
132
  cartesia/tts/types/tts_request_id_specifier.py,sha256=ktGdkkTRQ9scA-lt8qJ2jn_E5WzoOK8AXMrVqi71gf0,906
137
133
  cartesia/tts/types/tts_request_voice_specifier.py,sha256=p-3UQ62uFL1SgbX73Ex1D_V73Ef0wmT1ApOt1iLZmwE,307
@@ -202,7 +198,7 @@ cartesia/voices/types/voice_expand_options.py,sha256=e4FroWdlxEE-LXQfT1RWlGHtswl
202
198
  cartesia/voices/types/voice_id.py,sha256=GDoXcRVeIm-V21R4suxG2zqLD3DLYkXE9kgizadzFKo,79
203
199
  cartesia/voices/types/voice_metadata.py,sha256=4KNGjXMUKm3niv-NvKIFVGtiilpH13heuzKcZYNQxk4,1181
204
200
  cartesia/voices/types/weight.py,sha256=XqDU7_JItNUb5QykIDqTbELlRYQdbt2SviRgW0w2LKo,80
205
- cartesia-2.0.7.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
206
- cartesia-2.0.7.dist-info/METADATA,sha256=Y6DBkN-dgV6mTHZewNoAYG8ywLzXx7SxQCVzOvP1FHU,20927
207
- cartesia-2.0.7.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
208
- cartesia-2.0.7.dist-info/RECORD,,
201
+ cartesia-2.0.8.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
202
+ cartesia-2.0.8.dist-info/METADATA,sha256=xsIV3LGzfwSIXnjAGT1sotSNwN0ZaCgefCckc2EshLE,20804
203
+ cartesia-2.0.8.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
204
+ cartesia-2.0.8.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.1.3
2
+ Generator: poetry-core 1.6.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,17 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import typing_extensions
4
- import typing_extensions
5
-
6
-
7
- class ExperimentalModelControlsParams(typing_extensions.TypedDict):
8
- """
9
- These controls are **experimental** and subject to breaking changes.
10
- """
11
-
12
- accent_localization: typing_extensions.NotRequired[int]
13
- """
14
- Toggle accent localization: 0 (disabled, default) or 1 (enabled).
15
- When enabled, the voice adapts to match the transcript language's accent while preserving vocal characteristics. When disabled, maintains the original voice accent.
16
- For more information, see [Localize Voices](/build-with-sonic/capabilities/localize-voices).
17
- """
@@ -1,23 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import typing_extensions
4
- import typing_extensions
5
- from .experimental_model_controls import ExperimentalModelControlsParams
6
-
7
-
8
- class GenerationConfigParams(typing_extensions.TypedDict):
9
- """
10
- Configure the various attributes of the generated speech. These controls are only available for `sonic-3-preview` and will have no effect on earlier models.
11
- """
12
-
13
- volume: typing_extensions.NotRequired[float]
14
- """
15
- Adjust the volume of the generated speech between -1.0 (softer) and 1.0 (louder). 0.0 is the default volume.
16
- """
17
-
18
- speed: typing_extensions.NotRequired[float]
19
- """
20
- Adjust the speed of the generated speech between -1.0 (slower) and 1.0 (faster). 0.0 is the default speed.
21
- """
22
-
23
- experimental: typing_extensions.NotRequired[ExperimentalModelControlsParams]
@@ -1,28 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from ...core.pydantic_utilities import UniversalBaseModel
4
- import typing
5
- import pydantic
6
- from ...core.pydantic_utilities import IS_PYDANTIC_V2
7
-
8
-
9
- class ExperimentalModelControls(UniversalBaseModel):
10
- """
11
- These controls are **experimental** and subject to breaking changes.
12
- """
13
-
14
- accent_localization: typing.Optional[int] = pydantic.Field(default=None)
15
- """
16
- Toggle accent localization: 0 (disabled, default) or 1 (enabled).
17
- When enabled, the voice adapts to match the transcript language's accent while preserving vocal characteristics. When disabled, maintains the original voice accent.
18
- For more information, see [Localize Voices](/build-with-sonic/capabilities/localize-voices).
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
@@ -1,34 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from ...core.pydantic_utilities import UniversalBaseModel
4
- import typing
5
- import pydantic
6
- from .experimental_model_controls import ExperimentalModelControls
7
- from ...core.pydantic_utilities import IS_PYDANTIC_V2
8
-
9
-
10
- class GenerationConfig(UniversalBaseModel):
11
- """
12
- Configure the various attributes of the generated speech. These controls are only available for `sonic-3-preview` and will have no effect on earlier models.
13
- """
14
-
15
- volume: typing.Optional[float] = pydantic.Field(default=None)
16
- """
17
- Adjust the volume of the generated speech between -1.0 (softer) and 1.0 (louder). 0.0 is the default volume.
18
- """
19
-
20
- speed: typing.Optional[float] = pydantic.Field(default=None)
21
- """
22
- Adjust the speed of the generated speech between -1.0 (slower) and 1.0 (faster). 0.0 is the default speed.
23
- """
24
-
25
- experimental: typing.Optional[ExperimentalModelControls] = None
26
-
27
- if IS_PYDANTIC_V2:
28
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
29
- else:
30
-
31
- class Config:
32
- frozen = True
33
- smart_union = True
34
- extra = pydantic.Extra.allow