cartesia 1.4.0__py3-none-any.whl → 2.0.0a0__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 +288 -3
- cartesia/api_status/__init__.py +6 -0
- cartesia/api_status/client.py +104 -0
- cartesia/api_status/requests/__init__.py +5 -0
- cartesia/api_status/requests/api_info.py +8 -0
- cartesia/api_status/types/__init__.py +5 -0
- cartesia/api_status/types/api_info.py +20 -0
- cartesia/base_client.py +160 -0
- cartesia/client.py +163 -40
- cartesia/core/__init__.py +47 -0
- cartesia/core/api_error.py +15 -0
- cartesia/core/client_wrapper.py +55 -0
- cartesia/core/datetime_utils.py +28 -0
- cartesia/core/file.py +67 -0
- cartesia/core/http_client.py +499 -0
- cartesia/core/jsonable_encoder.py +101 -0
- cartesia/core/pydantic_utilities.py +296 -0
- cartesia/core/query_encoder.py +58 -0
- cartesia/core/remove_none_from_dict.py +11 -0
- cartesia/core/request_options.py +35 -0
- cartesia/core/serialization.py +272 -0
- cartesia/datasets/__init__.py +24 -0
- cartesia/datasets/client.py +422 -0
- cartesia/datasets/requests/__init__.py +15 -0
- cartesia/datasets/requests/create_dataset_request.py +7 -0
- cartesia/datasets/requests/dataset.py +9 -0
- cartesia/datasets/requests/dataset_file.py +9 -0
- cartesia/datasets/requests/paginated_dataset_files.py +10 -0
- cartesia/datasets/requests/paginated_datasets.py +10 -0
- cartesia/datasets/types/__init__.py +17 -0
- cartesia/datasets/types/create_dataset_request.py +19 -0
- cartesia/datasets/types/dataset.py +21 -0
- cartesia/datasets/types/dataset_file.py +21 -0
- cartesia/datasets/types/file_purpose.py +5 -0
- cartesia/datasets/types/paginated_dataset_files.py +21 -0
- cartesia/datasets/types/paginated_datasets.py +21 -0
- cartesia/embedding/__init__.py +5 -0
- cartesia/embedding/types/__init__.py +5 -0
- cartesia/embedding/types/embedding.py +201 -0
- cartesia/environment.py +7 -0
- cartesia/infill/__init__.py +2 -0
- cartesia/infill/client.py +294 -0
- cartesia/tts/__init__.py +167 -0
- cartesia/{_async_websocket.py → tts/_async_websocket.py} +159 -84
- cartesia/tts/_websocket.py +430 -0
- cartesia/tts/client.py +407 -0
- cartesia/tts/requests/__init__.py +76 -0
- cartesia/tts/requests/cancel_context_request.py +17 -0
- cartesia/tts/requests/controls.py +11 -0
- cartesia/tts/requests/generation_request.py +53 -0
- cartesia/tts/requests/mp_3_output_format.py +11 -0
- cartesia/tts/requests/output_format.py +30 -0
- cartesia/tts/requests/phoneme_timestamps.py +10 -0
- cartesia/tts/requests/raw_output_format.py +11 -0
- cartesia/tts/requests/speed.py +7 -0
- cartesia/tts/requests/tts_request.py +24 -0
- cartesia/tts/requests/tts_request_embedding_specifier.py +16 -0
- cartesia/tts/requests/tts_request_id_specifier.py +16 -0
- cartesia/tts/requests/tts_request_voice_specifier.py +7 -0
- cartesia/tts/requests/wav_output_format.py +7 -0
- cartesia/tts/requests/web_socket_base_response.py +11 -0
- cartesia/tts/requests/web_socket_chunk_response.py +8 -0
- cartesia/tts/requests/web_socket_done_response.py +7 -0
- cartesia/tts/requests/web_socket_error_response.py +7 -0
- cartesia/tts/requests/web_socket_flush_done_response.py +9 -0
- cartesia/tts/requests/web_socket_phoneme_timestamps_response.py +9 -0
- cartesia/tts/requests/web_socket_raw_output_format.py +11 -0
- cartesia/tts/requests/web_socket_request.py +7 -0
- cartesia/tts/requests/web_socket_response.py +69 -0
- cartesia/tts/requests/web_socket_stream_options.py +8 -0
- cartesia/tts/requests/web_socket_timestamps_response.py +9 -0
- cartesia/tts/requests/web_socket_tts_output.py +18 -0
- cartesia/tts/requests/web_socket_tts_request.py +24 -0
- cartesia/tts/requests/word_timestamps.py +10 -0
- cartesia/tts/socket_client.py +302 -0
- cartesia/tts/types/__init__.py +90 -0
- cartesia/tts/types/cancel_context_request.py +28 -0
- cartesia/tts/types/context_id.py +3 -0
- cartesia/tts/types/controls.py +22 -0
- cartesia/tts/types/emotion.py +29 -0
- cartesia/tts/types/flush_id.py +3 -0
- cartesia/tts/types/generation_request.py +66 -0
- cartesia/tts/types/mp_3_output_format.py +23 -0
- cartesia/tts/types/natural_specifier.py +5 -0
- cartesia/tts/types/numerical_specifier.py +3 -0
- cartesia/tts/types/output_format.py +58 -0
- cartesia/tts/types/phoneme_timestamps.py +21 -0
- cartesia/tts/types/raw_encoding.py +5 -0
- cartesia/tts/types/raw_output_format.py +22 -0
- cartesia/tts/types/speed.py +7 -0
- cartesia/tts/types/supported_language.py +7 -0
- cartesia/tts/types/tts_request.py +35 -0
- cartesia/tts/types/tts_request_embedding_specifier.py +27 -0
- cartesia/tts/types/tts_request_id_specifier.py +27 -0
- cartesia/tts/types/tts_request_voice_specifier.py +7 -0
- cartesia/tts/types/wav_output_format.py +17 -0
- cartesia/tts/types/web_socket_base_response.py +22 -0
- cartesia/tts/types/web_socket_chunk_response.py +20 -0
- cartesia/tts/types/web_socket_done_response.py +17 -0
- cartesia/tts/types/web_socket_error_response.py +19 -0
- cartesia/tts/types/web_socket_flush_done_response.py +21 -0
- cartesia/tts/types/web_socket_phoneme_timestamps_response.py +20 -0
- cartesia/tts/types/web_socket_raw_output_format.py +22 -0
- cartesia/tts/types/web_socket_request.py +7 -0
- cartesia/tts/types/web_socket_response.py +124 -0
- cartesia/tts/types/web_socket_stream_options.py +19 -0
- cartesia/tts/types/web_socket_timestamps_response.py +20 -0
- cartesia/tts/types/web_socket_tts_output.py +27 -0
- cartesia/tts/types/web_socket_tts_request.py +36 -0
- cartesia/tts/types/word_timestamps.py +21 -0
- cartesia/tts/utils/tts.py +64 -0
- cartesia/tts/utils/types.py +70 -0
- cartesia/version.py +3 -1
- cartesia/voice_changer/__init__.py +27 -0
- cartesia/voice_changer/client.py +395 -0
- cartesia/voice_changer/requests/__init__.py +15 -0
- cartesia/voice_changer/requests/streaming_response.py +36 -0
- cartesia/voice_changer/types/__init__.py +17 -0
- cartesia/voice_changer/types/output_format_container.py +5 -0
- cartesia/voice_changer/types/streaming_response.py +62 -0
- cartesia/voices/__init__.py +67 -0
- cartesia/voices/client.py +1812 -0
- cartesia/voices/requests/__init__.py +27 -0
- cartesia/voices/requests/create_voice_request.py +21 -0
- cartesia/voices/requests/embedding_response.py +8 -0
- cartesia/voices/requests/embedding_specifier.py +10 -0
- cartesia/voices/requests/id_specifier.py +10 -0
- cartesia/voices/requests/localize_dialect.py +6 -0
- cartesia/voices/requests/localize_voice_request.py +15 -0
- cartesia/voices/requests/mix_voice_specifier.py +7 -0
- cartesia/voices/requests/mix_voices_request.py +9 -0
- cartesia/voices/requests/update_voice_request.py +15 -0
- cartesia/voices/requests/voice.py +39 -0
- cartesia/voices/requests/voice_metadata.py +36 -0
- cartesia/voices/types/__init__.py +41 -0
- cartesia/voices/types/base_voice_id.py +5 -0
- cartesia/voices/types/clone_mode.py +5 -0
- cartesia/voices/types/create_voice_request.py +32 -0
- cartesia/voices/types/embedding_response.py +20 -0
- cartesia/voices/types/embedding_specifier.py +22 -0
- cartesia/voices/types/gender.py +5 -0
- cartesia/voices/types/id_specifier.py +22 -0
- cartesia/voices/types/localize_dialect.py +6 -0
- cartesia/voices/types/localize_english_dialect.py +5 -0
- cartesia/voices/types/localize_target_language.py +7 -0
- cartesia/voices/types/localize_voice_request.py +26 -0
- cartesia/voices/types/mix_voice_specifier.py +7 -0
- cartesia/voices/types/mix_voices_request.py +20 -0
- cartesia/voices/types/update_voice_request.py +27 -0
- cartesia/voices/types/voice.py +50 -0
- cartesia/voices/types/voice_id.py +3 -0
- cartesia/voices/types/voice_metadata.py +48 -0
- cartesia/voices/types/weight.py +3 -0
- cartesia-2.0.0a0.dist-info/METADATA +306 -0
- cartesia-2.0.0a0.dist-info/RECORD +158 -0
- {cartesia-1.4.0.dist-info → cartesia-2.0.0a0.dist-info}/WHEEL +1 -1
- cartesia/_async_sse.py +0 -95
- cartesia/_logger.py +0 -3
- cartesia/_sse.py +0 -143
- cartesia/_types.py +0 -70
- cartesia/_websocket.py +0 -358
- cartesia/async_client.py +0 -82
- cartesia/async_tts.py +0 -176
- cartesia/resource.py +0 -44
- cartesia/tts.py +0 -292
- cartesia/utils/deprecated.py +0 -55
- cartesia/utils/retry.py +0 -87
- cartesia/utils/tts.py +0 -78
- cartesia/voices.py +0 -204
- cartesia-1.4.0.dist-info/METADATA +0 -663
- cartesia-1.4.0.dist-info/RECORD +0 -23
- cartesia-1.4.0.dist-info/licenses/LICENSE.md +0 -21
- /cartesia/{utils/__init__.py → py.typed} +0 -0
- /cartesia/{_constants.py → tts/utils/constants.py} +0 -0
@@ -0,0 +1,27 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from .create_voice_request import CreateVoiceRequestParams
|
4
|
+
from .embedding_response import EmbeddingResponseParams
|
5
|
+
from .embedding_specifier import EmbeddingSpecifierParams
|
6
|
+
from .id_specifier import IdSpecifierParams
|
7
|
+
from .localize_dialect import LocalizeDialectParams
|
8
|
+
from .localize_voice_request import LocalizeVoiceRequestParams
|
9
|
+
from .mix_voice_specifier import MixVoiceSpecifierParams
|
10
|
+
from .mix_voices_request import MixVoicesRequestParams
|
11
|
+
from .update_voice_request import UpdateVoiceRequestParams
|
12
|
+
from .voice import VoiceParams
|
13
|
+
from .voice_metadata import VoiceMetadataParams
|
14
|
+
|
15
|
+
__all__ = [
|
16
|
+
"CreateVoiceRequestParams",
|
17
|
+
"EmbeddingResponseParams",
|
18
|
+
"EmbeddingSpecifierParams",
|
19
|
+
"IdSpecifierParams",
|
20
|
+
"LocalizeDialectParams",
|
21
|
+
"LocalizeVoiceRequestParams",
|
22
|
+
"MixVoiceSpecifierParams",
|
23
|
+
"MixVoicesRequestParams",
|
24
|
+
"UpdateVoiceRequestParams",
|
25
|
+
"VoiceMetadataParams",
|
26
|
+
"VoiceParams",
|
27
|
+
]
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import typing_extensions
|
4
|
+
from ...embedding.types.embedding import Embedding
|
5
|
+
import typing_extensions
|
6
|
+
from ...tts.types.supported_language import SupportedLanguage
|
7
|
+
|
8
|
+
|
9
|
+
class CreateVoiceRequestParams(typing_extensions.TypedDict):
|
10
|
+
name: str
|
11
|
+
"""
|
12
|
+
The name of the voice.
|
13
|
+
"""
|
14
|
+
|
15
|
+
description: str
|
16
|
+
"""
|
17
|
+
The description of the voice.
|
18
|
+
"""
|
19
|
+
|
20
|
+
embedding: Embedding
|
21
|
+
language: typing_extensions.NotRequired[SupportedLanguage]
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import typing_extensions
|
4
|
+
from ...embedding.types.embedding import Embedding
|
5
|
+
from ..types.weight import Weight
|
6
|
+
|
7
|
+
|
8
|
+
class EmbeddingSpecifierParams(typing_extensions.TypedDict):
|
9
|
+
embedding: Embedding
|
10
|
+
weight: Weight
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import typing_extensions
|
4
|
+
from ...embedding.types.embedding import Embedding
|
5
|
+
from ..types.localize_target_language import LocalizeTargetLanguage
|
6
|
+
from ..types.gender import Gender
|
7
|
+
import typing_extensions
|
8
|
+
from .localize_dialect import LocalizeDialectParams
|
9
|
+
|
10
|
+
|
11
|
+
class LocalizeVoiceRequestParams(typing_extensions.TypedDict):
|
12
|
+
embedding: Embedding
|
13
|
+
language: LocalizeTargetLanguage
|
14
|
+
original_speaker_gender: Gender
|
15
|
+
dialect: typing_extensions.NotRequired[LocalizeDialectParams]
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import typing
|
4
|
+
from .id_specifier import IdSpecifierParams
|
5
|
+
from .embedding_specifier import EmbeddingSpecifierParams
|
6
|
+
|
7
|
+
MixVoiceSpecifierParams = typing.Union[IdSpecifierParams, EmbeddingSpecifierParams]
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import typing_extensions
|
4
|
+
import typing
|
5
|
+
from .mix_voice_specifier import MixVoiceSpecifierParams
|
6
|
+
|
7
|
+
|
8
|
+
class MixVoicesRequestParams(typing_extensions.TypedDict):
|
9
|
+
voices: typing.Sequence[MixVoiceSpecifierParams]
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import typing_extensions
|
4
|
+
|
5
|
+
|
6
|
+
class UpdateVoiceRequestParams(typing_extensions.TypedDict):
|
7
|
+
name: str
|
8
|
+
"""
|
9
|
+
The name of the voice.
|
10
|
+
"""
|
11
|
+
|
12
|
+
description: str
|
13
|
+
"""
|
14
|
+
The description of the voice.
|
15
|
+
"""
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import typing_extensions
|
4
|
+
from ..types.voice_id import VoiceId
|
5
|
+
import typing_extensions
|
6
|
+
import datetime as dt
|
7
|
+
from ...embedding.types.embedding import Embedding
|
8
|
+
from ...tts.types.supported_language import SupportedLanguage
|
9
|
+
|
10
|
+
|
11
|
+
class VoiceParams(typing_extensions.TypedDict):
|
12
|
+
id: VoiceId
|
13
|
+
user_id: typing_extensions.NotRequired[str]
|
14
|
+
"""
|
15
|
+
The ID of the user who owns the voice.
|
16
|
+
"""
|
17
|
+
|
18
|
+
is_public: bool
|
19
|
+
"""
|
20
|
+
Whether the voice is publicly accessible.
|
21
|
+
"""
|
22
|
+
|
23
|
+
name: str
|
24
|
+
"""
|
25
|
+
The name of the voice.
|
26
|
+
"""
|
27
|
+
|
28
|
+
description: str
|
29
|
+
"""
|
30
|
+
The description of the voice.
|
31
|
+
"""
|
32
|
+
|
33
|
+
created_at: dt.datetime
|
34
|
+
"""
|
35
|
+
The date and time the voice was created.
|
36
|
+
"""
|
37
|
+
|
38
|
+
embedding: Embedding
|
39
|
+
language: SupportedLanguage
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import typing_extensions
|
4
|
+
from ..types.voice_id import VoiceId
|
5
|
+
import datetime as dt
|
6
|
+
from ...tts.types.supported_language import SupportedLanguage
|
7
|
+
|
8
|
+
|
9
|
+
class VoiceMetadataParams(typing_extensions.TypedDict):
|
10
|
+
id: VoiceId
|
11
|
+
user_id: str
|
12
|
+
"""
|
13
|
+
The ID of the user who owns the voice.
|
14
|
+
"""
|
15
|
+
|
16
|
+
is_public: bool
|
17
|
+
"""
|
18
|
+
Whether the voice is publicly accessible.
|
19
|
+
"""
|
20
|
+
|
21
|
+
name: str
|
22
|
+
"""
|
23
|
+
The name of the voice.
|
24
|
+
"""
|
25
|
+
|
26
|
+
description: str
|
27
|
+
"""
|
28
|
+
The description of the voice.
|
29
|
+
"""
|
30
|
+
|
31
|
+
created_at: dt.datetime
|
32
|
+
"""
|
33
|
+
The date and time the voice was created.
|
34
|
+
"""
|
35
|
+
|
36
|
+
language: SupportedLanguage
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from .base_voice_id import BaseVoiceId
|
4
|
+
from .clone_mode import CloneMode
|
5
|
+
from .create_voice_request import CreateVoiceRequest
|
6
|
+
from .embedding_response import EmbeddingResponse
|
7
|
+
from .embedding_specifier import EmbeddingSpecifier
|
8
|
+
from .gender import Gender
|
9
|
+
from .id_specifier import IdSpecifier
|
10
|
+
from .localize_dialect import LocalizeDialect
|
11
|
+
from .localize_english_dialect import LocalizeEnglishDialect
|
12
|
+
from .localize_target_language import LocalizeTargetLanguage
|
13
|
+
from .localize_voice_request import LocalizeVoiceRequest
|
14
|
+
from .mix_voice_specifier import MixVoiceSpecifier
|
15
|
+
from .mix_voices_request import MixVoicesRequest
|
16
|
+
from .update_voice_request import UpdateVoiceRequest
|
17
|
+
from .voice import Voice
|
18
|
+
from .voice_id import VoiceId
|
19
|
+
from .voice_metadata import VoiceMetadata
|
20
|
+
from .weight import Weight
|
21
|
+
|
22
|
+
__all__ = [
|
23
|
+
"BaseVoiceId",
|
24
|
+
"CloneMode",
|
25
|
+
"CreateVoiceRequest",
|
26
|
+
"EmbeddingResponse",
|
27
|
+
"EmbeddingSpecifier",
|
28
|
+
"Gender",
|
29
|
+
"IdSpecifier",
|
30
|
+
"LocalizeDialect",
|
31
|
+
"LocalizeEnglishDialect",
|
32
|
+
"LocalizeTargetLanguage",
|
33
|
+
"LocalizeVoiceRequest",
|
34
|
+
"MixVoiceSpecifier",
|
35
|
+
"MixVoicesRequest",
|
36
|
+
"UpdateVoiceRequest",
|
37
|
+
"Voice",
|
38
|
+
"VoiceId",
|
39
|
+
"VoiceMetadata",
|
40
|
+
"Weight",
|
41
|
+
]
|
@@ -0,0 +1,32 @@
|
|
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 ...embedding.types.embedding import Embedding
|
6
|
+
import typing
|
7
|
+
from ...tts.types.supported_language import SupportedLanguage
|
8
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2
|
9
|
+
|
10
|
+
|
11
|
+
class CreateVoiceRequest(UniversalBaseModel):
|
12
|
+
name: str = pydantic.Field()
|
13
|
+
"""
|
14
|
+
The name of the voice.
|
15
|
+
"""
|
16
|
+
|
17
|
+
description: str = pydantic.Field()
|
18
|
+
"""
|
19
|
+
The description of the voice.
|
20
|
+
"""
|
21
|
+
|
22
|
+
embedding: Embedding
|
23
|
+
language: typing.Optional[SupportedLanguage] = None
|
24
|
+
|
25
|
+
if IS_PYDANTIC_V2:
|
26
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
27
|
+
else:
|
28
|
+
|
29
|
+
class Config:
|
30
|
+
frozen = True
|
31
|
+
smart_union = True
|
32
|
+
extra = pydantic.Extra.allow
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from ...core.pydantic_utilities import UniversalBaseModel
|
4
|
+
from ...embedding.types.embedding import Embedding
|
5
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2
|
6
|
+
import typing
|
7
|
+
import pydantic
|
8
|
+
|
9
|
+
|
10
|
+
class EmbeddingResponse(UniversalBaseModel):
|
11
|
+
embedding: Embedding
|
12
|
+
|
13
|
+
if IS_PYDANTIC_V2:
|
14
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
15
|
+
else:
|
16
|
+
|
17
|
+
class Config:
|
18
|
+
frozen = True
|
19
|
+
smart_union = True
|
20
|
+
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
|
+
from ...embedding.types.embedding import Embedding
|
5
|
+
from .weight import Weight
|
6
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2
|
7
|
+
import typing
|
8
|
+
import pydantic
|
9
|
+
|
10
|
+
|
11
|
+
class EmbeddingSpecifier(UniversalBaseModel):
|
12
|
+
embedding: Embedding
|
13
|
+
weight: Weight
|
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,22 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from ...core.pydantic_utilities import UniversalBaseModel
|
4
|
+
from .voice_id import VoiceId
|
5
|
+
from .weight import Weight
|
6
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2
|
7
|
+
import typing
|
8
|
+
import pydantic
|
9
|
+
|
10
|
+
|
11
|
+
class IdSpecifier(UniversalBaseModel):
|
12
|
+
id: VoiceId
|
13
|
+
weight: Weight
|
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,26 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from ...core.pydantic_utilities import UniversalBaseModel
|
4
|
+
from ...embedding.types.embedding import Embedding
|
5
|
+
from .localize_target_language import LocalizeTargetLanguage
|
6
|
+
from .gender import Gender
|
7
|
+
import typing
|
8
|
+
from .localize_dialect import LocalizeDialect
|
9
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2
|
10
|
+
import pydantic
|
11
|
+
|
12
|
+
|
13
|
+
class LocalizeVoiceRequest(UniversalBaseModel):
|
14
|
+
embedding: Embedding
|
15
|
+
language: LocalizeTargetLanguage
|
16
|
+
original_speaker_gender: Gender
|
17
|
+
dialect: typing.Optional[LocalizeDialect] = None
|
18
|
+
|
19
|
+
if IS_PYDANTIC_V2:
|
20
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
21
|
+
else:
|
22
|
+
|
23
|
+
class Config:
|
24
|
+
frozen = True
|
25
|
+
smart_union = True
|
26
|
+
extra = pydantic.Extra.allow
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from ...core.pydantic_utilities import UniversalBaseModel
|
4
|
+
import typing
|
5
|
+
from .mix_voice_specifier import MixVoiceSpecifier
|
6
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2
|
7
|
+
import pydantic
|
8
|
+
|
9
|
+
|
10
|
+
class MixVoicesRequest(UniversalBaseModel):
|
11
|
+
voices: typing.List[MixVoiceSpecifier]
|
12
|
+
|
13
|
+
if IS_PYDANTIC_V2:
|
14
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
15
|
+
else:
|
16
|
+
|
17
|
+
class Config:
|
18
|
+
frozen = True
|
19
|
+
smart_union = True
|
20
|
+
extra = pydantic.Extra.allow
|
@@ -0,0 +1,27 @@
|
|
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 UpdateVoiceRequest(UniversalBaseModel):
|
10
|
+
name: str = pydantic.Field()
|
11
|
+
"""
|
12
|
+
The name of the voice.
|
13
|
+
"""
|
14
|
+
|
15
|
+
description: str = pydantic.Field()
|
16
|
+
"""
|
17
|
+
The description of the voice.
|
18
|
+
"""
|
19
|
+
|
20
|
+
if IS_PYDANTIC_V2:
|
21
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
22
|
+
else:
|
23
|
+
|
24
|
+
class Config:
|
25
|
+
frozen = True
|
26
|
+
smart_union = True
|
27
|
+
extra = pydantic.Extra.allow
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from ...core.pydantic_utilities import UniversalBaseModel
|
4
|
+
from .voice_id import VoiceId
|
5
|
+
import typing
|
6
|
+
import pydantic
|
7
|
+
import datetime as dt
|
8
|
+
from ...embedding.types.embedding import Embedding
|
9
|
+
from ...tts.types.supported_language import SupportedLanguage
|
10
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2
|
11
|
+
|
12
|
+
|
13
|
+
class Voice(UniversalBaseModel):
|
14
|
+
id: VoiceId
|
15
|
+
user_id: typing.Optional[str] = pydantic.Field(default=None)
|
16
|
+
"""
|
17
|
+
The ID of the user who owns the voice.
|
18
|
+
"""
|
19
|
+
|
20
|
+
is_public: bool = pydantic.Field()
|
21
|
+
"""
|
22
|
+
Whether the voice is publicly accessible.
|
23
|
+
"""
|
24
|
+
|
25
|
+
name: str = pydantic.Field()
|
26
|
+
"""
|
27
|
+
The name of the voice.
|
28
|
+
"""
|
29
|
+
|
30
|
+
description: str = pydantic.Field()
|
31
|
+
"""
|
32
|
+
The description of the voice.
|
33
|
+
"""
|
34
|
+
|
35
|
+
created_at: dt.datetime = pydantic.Field()
|
36
|
+
"""
|
37
|
+
The date and time the voice was created.
|
38
|
+
"""
|
39
|
+
|
40
|
+
embedding: Embedding
|
41
|
+
language: SupportedLanguage
|
42
|
+
|
43
|
+
if IS_PYDANTIC_V2:
|
44
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
45
|
+
else:
|
46
|
+
|
47
|
+
class Config:
|
48
|
+
frozen = True
|
49
|
+
smart_union = True
|
50
|
+
extra = pydantic.Extra.allow
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from ...core.pydantic_utilities import UniversalBaseModel
|
4
|
+
from .voice_id import VoiceId
|
5
|
+
import pydantic
|
6
|
+
import datetime as dt
|
7
|
+
from ...tts.types.supported_language import SupportedLanguage
|
8
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2
|
9
|
+
import typing
|
10
|
+
|
11
|
+
|
12
|
+
class VoiceMetadata(UniversalBaseModel):
|
13
|
+
id: VoiceId
|
14
|
+
user_id: str = pydantic.Field()
|
15
|
+
"""
|
16
|
+
The ID of the user who owns the voice.
|
17
|
+
"""
|
18
|
+
|
19
|
+
is_public: bool = pydantic.Field()
|
20
|
+
"""
|
21
|
+
Whether the voice is publicly accessible.
|
22
|
+
"""
|
23
|
+
|
24
|
+
name: str = pydantic.Field()
|
25
|
+
"""
|
26
|
+
The name of the voice.
|
27
|
+
"""
|
28
|
+
|
29
|
+
description: str = pydantic.Field()
|
30
|
+
"""
|
31
|
+
The description of the voice.
|
32
|
+
"""
|
33
|
+
|
34
|
+
created_at: dt.datetime = pydantic.Field()
|
35
|
+
"""
|
36
|
+
The date and time the voice was created.
|
37
|
+
"""
|
38
|
+
|
39
|
+
language: SupportedLanguage
|
40
|
+
|
41
|
+
if IS_PYDANTIC_V2:
|
42
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
43
|
+
else:
|
44
|
+
|
45
|
+
class Config:
|
46
|
+
frozen = True
|
47
|
+
smart_union = True
|
48
|
+
extra = pydantic.Extra.allow
|