cartesia 2.0.9__py3-none-any.whl → 2.0.11__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.

Potentially problematic release.


This version of cartesia might be problematic. Click here for more details.

@@ -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.9",
19
+ "X-Fern-SDK-Version": "2.0.11",
20
20
  }
21
21
  headers["X-API-Key"] = self.api_key
22
22
  headers["Cartesia-Version"] = "2024-11-13"
cartesia/infill/client.py CHANGED
@@ -78,7 +78,7 @@ class InfillClient:
78
78
  The format of the output audio
79
79
 
80
80
  output_format_sample_rate : int
81
- The sample rate of the output audio
81
+ The sample rate of the output audio in Hz. Supported sample rates are 8000, 16000, 22050, 24000, 44100, 48000.
82
82
 
83
83
  output_format_encoding : typing.Optional[RawEncoding]
84
84
  Required for `raw` and `wav` containers.
@@ -221,7 +221,7 @@ class AsyncInfillClient:
221
221
  The format of the output audio
222
222
 
223
223
  output_format_sample_rate : int
224
- The sample rate of the output audio
224
+ The sample rate of the output audio in Hz. Supported sample rates are 8000, 16000, 22050, 24000, 44100, 48000.
225
225
 
226
226
  output_format_encoding : typing.Optional[RawEncoding]
227
227
  Required for `raw` and `wav` containers.
@@ -5,6 +5,10 @@ import typing_extensions
5
5
 
6
6
  class Mp3OutputFormatParams(typing_extensions.TypedDict):
7
7
  sample_rate: int
8
+ """
9
+ The sample rate of the audio in Hz. Supported sample rates are 8000, 16000, 22050, 24000, 44100, 48000.
10
+ """
11
+
8
12
  bit_rate: int
9
13
  """
10
14
  The bit rate of the audio in bits per second. Supported bit rates are 32000, 64000, 96000, 128000, 192000.
@@ -8,4 +8,8 @@ import typing_extensions
8
8
  class RawOutputFormatParams(typing_extensions.TypedDict):
9
9
  encoding: RawEncoding
10
10
  sample_rate: int
11
+ """
12
+ The sample rate of the audio in Hz. Supported sample rates are 8000, 16000, 22050, 24000, 44100, 48000.
13
+ """
14
+
11
15
  bit_rate: typing_extensions.NotRequired[int]
@@ -9,3 +9,6 @@ class SseOutputFormatParams(typing_extensions.TypedDict):
9
9
  container: typing.Literal["raw"]
10
10
  encoding: RawEncoding
11
11
  sample_rate: int
12
+ """
13
+ The sample rate of the audio in Hz. Supported sample rates are 8000, 16000, 22050, 24000, 44100, 48000.
14
+ """
@@ -9,3 +9,6 @@ class WebSocketRawOutputFormatParams(typing_extensions.TypedDict):
9
9
  container: typing.Literal["raw"]
10
10
  encoding: RawEncoding
11
11
  sample_rate: int
12
+ """
13
+ The sample rate of the audio in Hz. Supported sample rates are 8000, 16000, 22050, 24000, 44100, 48000.
14
+ """
@@ -7,7 +7,11 @@ import typing
7
7
 
8
8
 
9
9
  class Mp3OutputFormat(UniversalBaseModel):
10
- sample_rate: int
10
+ sample_rate: int = pydantic.Field()
11
+ """
12
+ The sample rate of the audio in Hz. Supported sample rates are 8000, 16000, 22050, 24000, 44100, 48000.
13
+ """
14
+
11
15
  bit_rate: int = pydantic.Field()
12
16
  """
13
17
  The bit rate of the audio in bits per second. Supported bit rates are 32000, 64000, 96000, 128000, 192000.
@@ -2,14 +2,18 @@
2
2
 
3
3
  from ...core.pydantic_utilities import UniversalBaseModel
4
4
  from .raw_encoding import RawEncoding
5
+ import pydantic
5
6
  import typing
6
7
  from ...core.pydantic_utilities import IS_PYDANTIC_V2
7
- import pydantic
8
8
 
9
9
 
10
10
  class RawOutputFormat(UniversalBaseModel):
11
11
  encoding: RawEncoding
12
- sample_rate: int
12
+ sample_rate: int = pydantic.Field()
13
+ """
14
+ The sample rate of the audio in Hz. Supported sample rates are 8000, 16000, 22050, 24000, 44100, 48000.
15
+ """
16
+
13
17
  bit_rate: typing.Optional[int] = None
14
18
 
15
19
  if IS_PYDANTIC_V2:
@@ -3,14 +3,17 @@
3
3
  from ...core.pydantic_utilities import UniversalBaseModel
4
4
  import typing
5
5
  from .raw_encoding import RawEncoding
6
- from ...core.pydantic_utilities import IS_PYDANTIC_V2
7
6
  import pydantic
7
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
8
8
 
9
9
 
10
10
  class SseOutputFormat(UniversalBaseModel):
11
11
  container: typing.Literal["raw"] = "raw"
12
12
  encoding: RawEncoding
13
- sample_rate: int
13
+ sample_rate: int = pydantic.Field()
14
+ """
15
+ The sample rate of the audio in Hz. Supported sample rates are 8000, 16000, 22050, 24000, 44100, 48000.
16
+ """
14
17
 
15
18
  if IS_PYDANTIC_V2:
16
19
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -3,14 +3,17 @@
3
3
  from ...core.pydantic_utilities import UniversalBaseModel
4
4
  import typing
5
5
  from .raw_encoding import RawEncoding
6
- from ...core.pydantic_utilities import IS_PYDANTIC_V2
7
6
  import pydantic
7
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
8
8
 
9
9
 
10
10
  class WebSocketRawOutputFormat(UniversalBaseModel):
11
11
  container: typing.Literal["raw"] = "raw"
12
12
  encoding: RawEncoding
13
- sample_rate: int
13
+ sample_rate: int = pydantic.Field()
14
+ """
15
+ The sample rate of the audio in Hz. Supported sample rates are 8000, 16000, 22050, 24000, 44100, 48000.
16
+ """
14
17
 
15
18
  if IS_PYDANTIC_V2:
16
19
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -47,6 +47,7 @@ class VoiceChangerClient:
47
47
  output_format_container : OutputFormatContainer
48
48
 
49
49
  output_format_sample_rate : int
50
+ The sample rate of the output audio in Hz. Supported sample rates are 8000, 16000, 22050, 24000, 44100, 48000.
50
51
 
51
52
  output_format_encoding : typing.Optional[RawEncoding]
52
53
  Required for `raw` and `wav` containers.
@@ -224,6 +225,7 @@ class AsyncVoiceChangerClient:
224
225
  output_format_container : OutputFormatContainer
225
226
 
226
227
  output_format_sample_rate : int
228
+ The sample rate of the output audio in Hz. Supported sample rates are 8000, 16000, 22050, 24000, 44100, 48000.
227
229
 
228
230
  output_format_encoding : typing.Optional[RawEncoding]
229
231
  Required for `raw` and `wav` containers.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cartesia
3
- Version: 2.0.9
3
+ Version: 2.0.11
4
4
  Summary:
5
5
  Requires-Python: >=3.8,<4.0
6
6
  Classifier: Intended Audience :: Developers
@@ -545,6 +545,7 @@ async def main():
545
545
  all_ends.extend(out.word_timestamps.end) # End time for each word (seconds)
546
546
 
547
547
  await ws.close()
548
+ await client.close()
548
549
 
549
550
  asyncio.run(main())
550
551
  ```
@@ -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=ZeQ4DT3ZKd07u6qrZFu4Z1p2uw71eeQOlfgXpmz6b0A,1854
22
+ cartesia/core/client_wrapper.py,sha256=Iww9Ft7JDV4a7w9mcWLjAOOkzJGRyla5eLGeQWtm0pQ,1855
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
@@ -49,7 +49,7 @@ cartesia/embedding/types/__init__.py,sha256=aOrEOGuiO6dlSGu7pckqVMTYEMVAR5I7qqca
49
49
  cartesia/embedding/types/embedding.py,sha256=C1OJg8M4T1Apfcv4qx79ndftg0SgH4Lfqe_iU3UF-bA,1851
50
50
  cartesia/environment.py,sha256=Qnp91BGLic7hXmKsiYub2m3nPfvDWm59aB1wWta1J6A,160
51
51
  cartesia/infill/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
52
- cartesia/infill/client.py,sha256=uEDhE3Cx47ZyG7ofR-GOR0LhHiHeTLkUcjkLSsyU2ug,12563
52
+ cartesia/infill/client.py,sha256=_S7DG_697mU9LanMuWePJthq1vFFt1DoIvmgyMXGzCY,12713
53
53
  cartesia/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
54
54
  cartesia/stt/__init__.py,sha256=UHT5OM-5phGwLCckL8BXGdC3QepJoboScW5eSXUE2S4,1763
55
55
  cartesia/stt/_async_websocket.py,sha256=6MVYvSz3d9sI5-zzT_aIPEFKxXeCQU00RYFpYSF0dio,12385
@@ -82,12 +82,12 @@ cartesia/tts/requests/__init__.py,sha256=SeITRF5QSAjOE5pNxbD6VffwwttMnQwuv0Z5n9h
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
84
  cartesia/tts/requests/generation_request.py,sha256=JQPumk0UMCHDQrcUvuqeDsdc8LCJAEolSs10LpJzK00,3083
85
- cartesia/tts/requests/mp_3_output_format.py,sha256=PGDVzC1d7-Jce12rFxtF8G1pTHmlUdiGAhykFTABg0w,316
85
+ cartesia/tts/requests/mp_3_output_format.py,sha256=HBM6452KdWD9tGa9QXNyUZcH1OlJrXt_PIwo2Jt3l2Q,441
86
86
  cartesia/tts/requests/output_format.py,sha256=8TKu9AAeHCR5L4edzYch8FIYIldn4bM7ySrsCl8W_g8,842
87
87
  cartesia/tts/requests/phoneme_timestamps.py,sha256=ft81nmqElZAnvTBT27lY6YWfF18ZGsCx3Y1XHv9J7cM,267
88
- cartesia/tts/requests/raw_output_format.py,sha256=S60Vp7DeAATCMLF3bXgxhw0zILJBWJ9GhI9irAg_UkI,316
88
+ cartesia/tts/requests/raw_output_format.py,sha256=WigDQlM_YkLk_-GK1_pNseGq8g-_POO84Su7jqSLsHQ,441
89
89
  cartesia/tts/requests/speed.py,sha256=-YGBWwh7_VtCBnYlT5EVsnrmcHFMEBTxy9LathZhkMA,259
90
- cartesia/tts/requests/sse_output_format.py,sha256=z_f7dlDYNvpheYOSnf3lOslHF40vS852pYkxHTpqAcc,293
90
+ cartesia/tts/requests/sse_output_format.py,sha256=dsRyxFCD3Qt3hTppxV7HJhphPx3jTkZhryMXUP-Soc8,417
91
91
  cartesia/tts/requests/tts_request.py,sha256=KBoahYfPbDENlEWsqnR4z1ZIhGIJwhLrzQIzkbtqtzE,1021
92
92
  cartesia/tts/requests/tts_request_embedding_specifier.py,sha256=-M54ZjV0H5LPwcKtz0bOVqlkvO1pPiMbqMbVBMko3Ns,565
93
93
  cartesia/tts/requests/tts_request_id_specifier.py,sha256=-0ClfyJnnaH0uAcF5r84s3cM_cw2wT39dp6T4JYzOQ8,536
@@ -100,7 +100,7 @@ cartesia/tts/requests/web_socket_done_response.py,sha256=YLHrT6NkmDntBSxF-JGlXSa
100
100
  cartesia/tts/requests/web_socket_error_response.py,sha256=ek2O5Whlzn5Ma40NhYviVl3aJBVeCA8BBvbJPUYxEiQ,213
101
101
  cartesia/tts/requests/web_socket_flush_done_response.py,sha256=gP3fSWhEFVzdzBweUmVKo7JvdREW3TM9R6o9-u6V6FQ,282
102
102
  cartesia/tts/requests/web_socket_phoneme_timestamps_response.py,sha256=nDRK7wo4s6R7ayJrw-LJX9WCaW4mti0HAV4X5j7cxjI,370
103
- cartesia/tts/requests/web_socket_raw_output_format.py,sha256=9BJHE5l5bzmYCYuUoACRhbZdJBijnSiwkbR8K4EzPDY,302
103
+ cartesia/tts/requests/web_socket_raw_output_format.py,sha256=dcpXwOrCkB369pJ1AFOCwa5XgAFPUh9xEojrerH52bM,426
104
104
  cartesia/tts/requests/web_socket_request.py,sha256=5xfE0NgkBEZdus_vC-3RVQkuqhNmXHxLMX4DW3ezcKc,290
105
105
  cartesia/tts/requests/web_socket_response.py,sha256=kS46YN94ilUn4qjpt1TpauZApe0N8PpAefT87jFiusY,2079
106
106
  cartesia/tts/requests/web_socket_stream_options.py,sha256=VIvblFw9hGZvDzFpOnC11G0NvrFSVt-1-0sY5rpcZPI,232
@@ -117,15 +117,15 @@ cartesia/tts/types/emotion.py,sha256=zocyDcHTiFFnNRgo2YLMi70iGyffa080B4mkg9lcqVc
117
117
  cartesia/tts/types/flush_id.py,sha256=HCIKo9o8d7YWKtaSNU3TEvfUVBju93ckGQy01Z9wLcE,79
118
118
  cartesia/tts/types/generation_request.py,sha256=ZGVXmHZLaZg7kEg1cVGXLpr8uB3btr2eZt0NEJRZnSU,3582
119
119
  cartesia/tts/types/model_speed.py,sha256=iiTj8V0piFCX2FZh5B8EkgRhZDlj4z3VFcQhp66e7y8,160
120
- cartesia/tts/types/mp_3_output_format.py,sha256=0WGblkuDUL7pZO1aRuQ_mU2Z5gN9xIabRfRKkjtzms8,731
120
+ cartesia/tts/types/mp_3_output_format.py,sha256=LQ1-rEYjkK6XXWoj_Z7bezsguPpNI_SmprlIipsyNMI,875
121
121
  cartesia/tts/types/natural_specifier.py,sha256=K526P1RRuBGy80hyd_tX8tohPrE8DR9EgTCxS5wce0o,188
122
122
  cartesia/tts/types/numerical_specifier.py,sha256=tJpIskWO545luCKMFM9JlVc7VVhBhSvqL1qurhzL9cI,92
123
123
  cartesia/tts/types/output_format.py,sha256=bi9iZVQKmddTw6RjNKG9XAVrgEB7JVNsBS_emFLlGLs,1736
124
124
  cartesia/tts/types/phoneme_timestamps.py,sha256=SrhPmE7-1-bCVi4qCgMU7QR9ezkwUfqsWfZ2PchzwN0,637
125
125
  cartesia/tts/types/raw_encoding.py,sha256=eyc2goiYOTxWcuKHAgYZ2SrnfePW22Fbmc-5fGPlV2Y,186
126
- cartesia/tts/types/raw_output_format.py,sha256=jZGVaS0KIi9mU6trfskgA3HbMKJolhrwICnuDhF01ic,673
126
+ cartesia/tts/types/raw_output_format.py,sha256=ir5QxW986P8qB14pMD5PVsAgc0bdC37i7O8JipS1svA,817
127
127
  cartesia/tts/types/speed.py,sha256=4c5WdxocBw6WSMnundSaNnceUeooU0vikhy00FW6M-w,239
128
- cartesia/tts/types/sse_output_format.py,sha256=tRb4VcYqoPJMDyjfTZMCRTblT2NjwIsQhy1oMjxQWW0,676
128
+ cartesia/tts/types/sse_output_format.py,sha256=1_GB3rftQYAsXO6WrgQmzr-tsjCntHCVgKeTjay7M9g,819
129
129
  cartesia/tts/types/supported_language.py,sha256=riDRduThMbMWAq9i2uCfxhwVTpgaFwNDZ9LhEIl4zHY,237
130
130
  cartesia/tts/types/tts_request.py,sha256=FGcxW-siiQpEzJZSHMET3nDSYHSzRt3WSTO-cCEz9u4,1376
131
131
  cartesia/tts/types/tts_request_embedding_specifier.py,sha256=eL_qCEr4pvWfy4qp9hZBuVdCincX5DBVqfv1vLt2_Vk,942
@@ -139,7 +139,7 @@ cartesia/tts/types/web_socket_done_response.py,sha256=zZ6V-_pKNifdyuuRHGlZe6Zbc-
139
139
  cartesia/tts/types/web_socket_error_response.py,sha256=Jm26GnK0axyLQI3-JLHC0buYVIU8gKWxLAJlzo-cJFQ,573
140
140
  cartesia/tts/types/web_socket_flush_done_response.py,sha256=JLiVPDftr1arl_Kvj6038yj0mnjq6x0ooihsbdXajfw,635
141
141
  cartesia/tts/types/web_socket_phoneme_timestamps_response.py,sha256=R1-Z_W3XF7L7rrPwEOK_EfXHT4FWRpSAX3g71WebM90,686
142
- cartesia/tts/types/web_socket_raw_output_format.py,sha256=9PiOVmPDfT32IDIsmU7UY_rTLOShMMEw1pNv2yZ9Kyg,685
142
+ cartesia/tts/types/web_socket_raw_output_format.py,sha256=O9ay_TwnMs4r_D_Cml6lBJ_2BwnHHo18boIXYI4wTr0,828
143
143
  cartesia/tts/types/web_socket_request.py,sha256=_xoAShkCCNTVAWKCvHw5k0Wisq60y4fOWYjG7SA8edM,260
144
144
  cartesia/tts/types/web_socket_response.py,sha256=fUQbJ6yFzZbzUZPuQWgkFdzP8-FMiKTcya-DIPWjimY,3777
145
145
  cartesia/tts/types/web_socket_stream_options.py,sha256=MhDSxBFqMuQeWjoyPqXVnTEzLjF8g6aojeigb5dQUgU,596
@@ -152,7 +152,7 @@ cartesia/tts/utils/tts.py,sha256=u7PgPxlJs6fcQTfr-jqAvBCAaK3JWLhF5QF4s-PwoMo,209
152
152
  cartesia/tts/utils/types.py,sha256=DtsiRwrYypXScLu71gNyprUiELuR1l_-ikVaj47gpg4,2047
153
153
  cartesia/version.py,sha256=xk5z2FYkgnvzyjqzmRg67rYl8fnCeHEjPpVmD08bjyE,75
154
154
  cartesia/voice_changer/__init__.py,sha256=UKA8CSAwUb41OL-dcWWUhIsKLLsyY_NQtrklPAVWf9E,685
155
- cartesia/voice_changer/client.py,sha256=w3Z3A-92Fu5k9NRrfdn7Gu2nqmOONL-xLCHknZhkANY,13509
155
+ cartesia/voice_changer/client.py,sha256=CjTuptyKNpviBB21fsobBqQSn08WuYCgC6gXAxNPCUI,13755
156
156
  cartesia/voice_changer/requests/__init__.py,sha256=MRwSUqio3mg_tvfcpAS0wIZ69HvJsc2kYJ0tUBaJ53U,390
157
157
  cartesia/voice_changer/requests/streaming_response.py,sha256=lbo7CJeuh0f5hXT4lKG_sDUZDLJWaLqxcwCuSf1IbMQ,982
158
158
  cartesia/voice_changer/types/__init__.py,sha256=qAiHsdRpnFeS0lBkYp_NRrhSJiRXCg5-uFibqDWzYVU,430
@@ -198,7 +198,7 @@ cartesia/voices/types/voice_expand_options.py,sha256=e4FroWdlxEE-LXQfT1RWlGHtswl
198
198
  cartesia/voices/types/voice_id.py,sha256=GDoXcRVeIm-V21R4suxG2zqLD3DLYkXE9kgizadzFKo,79
199
199
  cartesia/voices/types/voice_metadata.py,sha256=4KNGjXMUKm3niv-NvKIFVGtiilpH13heuzKcZYNQxk4,1181
200
200
  cartesia/voices/types/weight.py,sha256=XqDU7_JItNUb5QykIDqTbELlRYQdbt2SviRgW0w2LKo,80
201
- cartesia-2.0.9.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
202
- cartesia-2.0.9.dist-info/METADATA,sha256=GG86uKWZW4iX4S3p-QOsgPVv7yGStCHj6qHq97e9V6Q,20804
203
- cartesia-2.0.9.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
204
- cartesia-2.0.9.dist-info/RECORD,,
201
+ cartesia-2.0.11.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
202
+ cartesia-2.0.11.dist-info/METADATA,sha256=gnwMfy2FMzDo87EdMntSM9RCPZB5a4c67ItBNT98EKg,20830
203
+ cartesia-2.0.11.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
204
+ cartesia-2.0.11.dist-info/RECORD,,