cartesia 2.0.0b2__py3-none-any.whl → 2.0.0b7__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 +8 -4
- cartesia/base_client.py +0 -4
- cartesia/core/__init__.py +3 -0
- cartesia/core/client_wrapper.py +2 -2
- cartesia/core/pagination.py +88 -0
- cartesia/infill/client.py +4 -4
- cartesia/tts/_async_websocket.py +48 -1
- cartesia/tts/_websocket.py +44 -3
- cartesia/tts/client.py +4 -4
- cartesia/tts/requests/generation_request.py +5 -0
- cartesia/tts/requests/web_socket_chunk_response.py +3 -0
- cartesia/tts/requests/web_socket_response.py +2 -1
- cartesia/tts/requests/web_socket_tts_request.py +1 -0
- cartesia/tts/types/emotion.py +5 -0
- cartesia/tts/types/generation_request.py +5 -0
- cartesia/tts/types/web_socket_chunk_response.py +3 -1
- cartesia/tts/types/web_socket_response.py +2 -1
- cartesia/tts/types/web_socket_tts_output.py +2 -0
- cartesia/tts/types/web_socket_tts_request.py +1 -0
- cartesia/tts/utils/constants.py +2 -2
- cartesia/voice_changer/requests/streaming_response.py +2 -0
- cartesia/voice_changer/types/streaming_response.py +2 -0
- cartesia/voices/__init__.py +8 -4
- cartesia/voices/client.py +285 -169
- cartesia/voices/requests/__init__.py +2 -0
- cartesia/voices/requests/create_voice_request.py +0 -2
- cartesia/voices/requests/get_voices_response.py +24 -0
- cartesia/voices/requests/localize_dialect.py +1 -3
- cartesia/voices/requests/voice.py +13 -9
- cartesia/voices/types/__init__.py +6 -4
- cartesia/voices/types/create_voice_request.py +0 -2
- cartesia/voices/types/gender_presentation.py +5 -0
- cartesia/voices/types/get_voices_response.py +34 -0
- cartesia/voices/types/localize_dialect.py +1 -3
- cartesia/voices/types/voice.py +13 -9
- cartesia/voices/types/voice_expand_options.py +5 -0
- {cartesia-2.0.0b2.dist-info → cartesia-2.0.0b7.dist-info}/METADATA +85 -14
- {cartesia-2.0.0b2.dist-info → cartesia-2.0.0b7.dist-info}/RECORD +39 -37
- cartesia/datasets/client.py +0 -392
- cartesia/voices/types/localize_portuguese_dialect.py +0 -5
- cartesia/voices/types/localize_spanish_dialect.py +0 -5
- {cartesia-2.0.0b2.dist-info → cartesia-2.0.0b7.dist-info}/WHEEL +0 -0
cartesia/tts/utils/constants.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
DEFAULT_MODEL_ID = "sonic-
|
2
|
-
MULTILINGUAL_MODEL_ID = "sonic-
|
1
|
+
DEFAULT_MODEL_ID = "sonic-2" # latest default model
|
2
|
+
MULTILINGUAL_MODEL_ID = "sonic-2" # latest multilingual model
|
3
3
|
DEFAULT_BASE_URL = "api.cartesia.ai"
|
4
4
|
DEFAULT_CARTESIA_VERSION = "2024-06-10" # latest version
|
5
5
|
DEFAULT_OUTPUT_FORMAT = "raw_pcm_f32le_44100"
|
@@ -4,6 +4,7 @@ from __future__ import annotations
|
|
4
4
|
import typing_extensions
|
5
5
|
import typing
|
6
6
|
import typing_extensions
|
7
|
+
from ...tts.types.flush_id import FlushId
|
7
8
|
from ...tts.types.context_id import ContextId
|
8
9
|
|
9
10
|
|
@@ -11,6 +12,7 @@ class StreamingResponse_ChunkParams(typing_extensions.TypedDict):
|
|
11
12
|
type: typing.Literal["chunk"]
|
12
13
|
data: str
|
13
14
|
step_time: float
|
15
|
+
flush_id: typing_extensions.NotRequired[FlushId]
|
14
16
|
context_id: typing_extensions.NotRequired[ContextId]
|
15
17
|
status_code: int
|
16
18
|
done: bool
|
@@ -3,6 +3,7 @@
|
|
3
3
|
from __future__ import annotations
|
4
4
|
from ...core.pydantic_utilities import UniversalBaseModel
|
5
5
|
import typing
|
6
|
+
from ...tts.types.flush_id import FlushId
|
6
7
|
from ...tts.types.context_id import ContextId
|
7
8
|
from ...core.pydantic_utilities import IS_PYDANTIC_V2
|
8
9
|
import pydantic
|
@@ -12,6 +13,7 @@ class StreamingResponse_Chunk(UniversalBaseModel):
|
|
12
13
|
type: typing.Literal["chunk"] = "chunk"
|
13
14
|
data: str
|
14
15
|
step_time: float
|
16
|
+
flush_id: typing.Optional[FlushId] = None
|
15
17
|
context_id: typing.Optional[ContextId] = None
|
16
18
|
status_code: int
|
17
19
|
done: bool
|
cartesia/voices/__init__.py
CHANGED
@@ -7,17 +7,18 @@ from .types import (
|
|
7
7
|
EmbeddingResponse,
|
8
8
|
EmbeddingSpecifier,
|
9
9
|
Gender,
|
10
|
+
GenderPresentation,
|
11
|
+
GetVoicesResponse,
|
10
12
|
IdSpecifier,
|
11
13
|
LocalizeDialect,
|
12
14
|
LocalizeEnglishDialect,
|
13
|
-
LocalizePortugueseDialect,
|
14
|
-
LocalizeSpanishDialect,
|
15
15
|
LocalizeTargetLanguage,
|
16
16
|
LocalizeVoiceRequest,
|
17
17
|
MixVoiceSpecifier,
|
18
18
|
MixVoicesRequest,
|
19
19
|
UpdateVoiceRequest,
|
20
20
|
Voice,
|
21
|
+
VoiceExpandOptions,
|
21
22
|
VoiceId,
|
22
23
|
VoiceMetadata,
|
23
24
|
Weight,
|
@@ -26,6 +27,7 @@ from .requests import (
|
|
26
27
|
CreateVoiceRequestParams,
|
27
28
|
EmbeddingResponseParams,
|
28
29
|
EmbeddingSpecifierParams,
|
30
|
+
GetVoicesResponseParams,
|
29
31
|
IdSpecifierParams,
|
30
32
|
LocalizeDialectParams,
|
31
33
|
LocalizeVoiceRequestParams,
|
@@ -46,13 +48,14 @@ __all__ = [
|
|
46
48
|
"EmbeddingSpecifier",
|
47
49
|
"EmbeddingSpecifierParams",
|
48
50
|
"Gender",
|
51
|
+
"GenderPresentation",
|
52
|
+
"GetVoicesResponse",
|
53
|
+
"GetVoicesResponseParams",
|
49
54
|
"IdSpecifier",
|
50
55
|
"IdSpecifierParams",
|
51
56
|
"LocalizeDialect",
|
52
57
|
"LocalizeDialectParams",
|
53
58
|
"LocalizeEnglishDialect",
|
54
|
-
"LocalizePortugueseDialect",
|
55
|
-
"LocalizeSpanishDialect",
|
56
59
|
"LocalizeTargetLanguage",
|
57
60
|
"LocalizeVoiceRequest",
|
58
61
|
"LocalizeVoiceRequestParams",
|
@@ -63,6 +66,7 @@ __all__ = [
|
|
63
66
|
"UpdateVoiceRequest",
|
64
67
|
"UpdateVoiceRequestParams",
|
65
68
|
"Voice",
|
69
|
+
"VoiceExpandOptions",
|
66
70
|
"VoiceId",
|
67
71
|
"VoiceMetadata",
|
68
72
|
"VoiceMetadataParams",
|