cartesia 2.0.0b2__tar.gz → 2.0.0b7__tar.gz
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-2.0.0b2 → cartesia-2.0.0b7}/PKG-INFO +85 -14
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/README.md +84 -13
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/pyproject.toml +1 -1
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/__init__.py +8 -4
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/base_client.py +0 -4
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/core/__init__.py +3 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/core/client_wrapper.py +2 -2
- cartesia-2.0.0b7/src/cartesia/core/pagination.py +88 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/infill/client.py +4 -4
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/_async_websocket.py +48 -1
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/_websocket.py +44 -3
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/client.py +4 -4
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/requests/generation_request.py +5 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/requests/web_socket_chunk_response.py +3 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/requests/web_socket_response.py +2 -1
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/requests/web_socket_tts_request.py +1 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/types/emotion.py +5 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/types/generation_request.py +5 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/types/web_socket_chunk_response.py +3 -1
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/types/web_socket_response.py +2 -1
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/types/web_socket_tts_output.py +2 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/types/web_socket_tts_request.py +1 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/utils/constants.py +2 -2
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voice_changer/requests/streaming_response.py +2 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voice_changer/types/streaming_response.py +2 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voices/__init__.py +8 -4
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voices/client.py +285 -169
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voices/requests/__init__.py +2 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voices/requests/create_voice_request.py +0 -2
- cartesia-2.0.0b7/src/cartesia/voices/requests/get_voices_response.py +24 -0
- cartesia-2.0.0b7/src/cartesia/voices/requests/localize_dialect.py +6 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voices/requests/voice.py +13 -9
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voices/types/__init__.py +6 -4
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voices/types/create_voice_request.py +0 -2
- cartesia-2.0.0b7/src/cartesia/voices/types/gender_presentation.py +5 -0
- cartesia-2.0.0b7/src/cartesia/voices/types/get_voices_response.py +34 -0
- cartesia-2.0.0b7/src/cartesia/voices/types/localize_dialect.py +6 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voices/types/voice.py +13 -9
- cartesia-2.0.0b7/src/cartesia/voices/types/voice_expand_options.py +5 -0
- cartesia-2.0.0b2/src/cartesia/datasets/client.py +0 -392
- cartesia-2.0.0b2/src/cartesia/voices/requests/localize_dialect.py +0 -8
- cartesia-2.0.0b2/src/cartesia/voices/types/localize_dialect.py +0 -8
- cartesia-2.0.0b2/src/cartesia/voices/types/localize_portuguese_dialect.py +0 -5
- cartesia-2.0.0b2/src/cartesia/voices/types/localize_spanish_dialect.py +0 -5
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/api_status/__init__.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/api_status/client.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/api_status/requests/__init__.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/api_status/requests/api_info.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/api_status/types/__init__.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/api_status/types/api_info.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/client.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/core/api_error.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/core/datetime_utils.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/core/file.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/core/http_client.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/core/jsonable_encoder.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/core/pydantic_utilities.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/core/query_encoder.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/core/remove_none_from_dict.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/core/request_options.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/core/serialization.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/datasets/__init__.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/datasets/requests/__init__.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/datasets/requests/create_dataset_request.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/datasets/requests/dataset.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/datasets/requests/dataset_file.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/datasets/requests/paginated_dataset_files.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/datasets/requests/paginated_datasets.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/datasets/types/__init__.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/datasets/types/create_dataset_request.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/datasets/types/dataset.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/datasets/types/dataset_file.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/datasets/types/file_purpose.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/datasets/types/paginated_dataset_files.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/datasets/types/paginated_datasets.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/embedding/__init__.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/embedding/types/__init__.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/embedding/types/embedding.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/environment.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/infill/__init__.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/py.typed +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/__init__.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/requests/__init__.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/requests/cancel_context_request.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/requests/controls.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/requests/mp_3_output_format.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/requests/output_format.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/requests/phoneme_timestamps.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/requests/raw_output_format.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/requests/speed.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/requests/tts_request.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/requests/tts_request_embedding_specifier.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/requests/tts_request_id_specifier.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/requests/tts_request_voice_specifier.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/requests/wav_output_format.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/requests/web_socket_base_response.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/requests/web_socket_done_response.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/requests/web_socket_error_response.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/requests/web_socket_flush_done_response.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/requests/web_socket_phoneme_timestamps_response.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/requests/web_socket_raw_output_format.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/requests/web_socket_request.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/requests/web_socket_stream_options.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/requests/web_socket_timestamps_response.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/requests/web_socket_tts_output.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/requests/word_timestamps.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/socket_client.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/types/__init__.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/types/cancel_context_request.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/types/context_id.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/types/controls.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/types/flush_id.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/types/mp_3_output_format.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/types/natural_specifier.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/types/numerical_specifier.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/types/output_format.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/types/phoneme_timestamps.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/types/raw_encoding.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/types/raw_output_format.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/types/speed.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/types/supported_language.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/types/tts_request.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/types/tts_request_embedding_specifier.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/types/tts_request_id_specifier.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/types/tts_request_voice_specifier.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/types/wav_output_format.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/types/web_socket_base_response.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/types/web_socket_done_response.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/types/web_socket_error_response.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/types/web_socket_flush_done_response.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/types/web_socket_phoneme_timestamps_response.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/types/web_socket_raw_output_format.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/types/web_socket_request.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/types/web_socket_stream_options.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/types/web_socket_timestamps_response.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/types/word_timestamps.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/utils/tts.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/tts/utils/types.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/version.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voice_changer/__init__.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voice_changer/client.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voice_changer/requests/__init__.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voice_changer/types/__init__.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voice_changer/types/output_format_container.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voices/requests/embedding_response.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voices/requests/embedding_specifier.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voices/requests/id_specifier.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voices/requests/localize_voice_request.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voices/requests/mix_voice_specifier.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voices/requests/mix_voices_request.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voices/requests/update_voice_request.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voices/requests/voice_metadata.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voices/types/base_voice_id.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voices/types/clone_mode.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voices/types/embedding_response.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voices/types/embedding_specifier.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voices/types/gender.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voices/types/id_specifier.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voices/types/localize_english_dialect.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voices/types/localize_target_language.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voices/types/localize_voice_request.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voices/types/mix_voice_specifier.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voices/types/mix_voices_request.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voices/types/update_voice_request.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voices/types/voice_id.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voices/types/voice_metadata.py +0 -0
- {cartesia-2.0.0b2 → cartesia-2.0.0b7}/src/cartesia/voices/types/weight.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: cartesia
|
3
|
-
Version: 2.0.
|
3
|
+
Version: 2.0.0b7
|
4
4
|
Summary:
|
5
5
|
Requires-Python: >=3.8,<4.0
|
6
6
|
Classifier: Intended Audience :: Developers
|
@@ -70,7 +70,7 @@ print("The embedding for", voice.name, "is", voice.embedding)
|
|
70
70
|
# Clone a voice using file data
|
71
71
|
cloned_voice = client.voices.clone(
|
72
72
|
clip=open("path/to/voice.wav", "rb"),
|
73
|
-
name="Test cloned voice",
|
73
|
+
name="Test cloned voice",
|
74
74
|
language="en",
|
75
75
|
mode="similarity", # or "stability"
|
76
76
|
enhance=False, # use enhance=True to clean and denoise the cloning audio
|
@@ -107,7 +107,7 @@ client = Cartesia(
|
|
107
107
|
api_key=os.getenv("CARTESIA_API_KEY"),
|
108
108
|
)
|
109
109
|
client.tts.bytes(
|
110
|
-
model_id="sonic-
|
110
|
+
model_id="sonic-2",
|
111
111
|
transcript="Hello, world!",
|
112
112
|
voice={
|
113
113
|
"mode": "id",
|
@@ -143,7 +143,7 @@ client = AsyncCartesia(
|
|
143
143
|
|
144
144
|
async def main() -> None:
|
145
145
|
async for output in client.tts.bytes(
|
146
|
-
model_id="sonic-
|
146
|
+
model_id="sonic-2",
|
147
147
|
transcript="Hello, world!",
|
148
148
|
voice={"id": "694f9389-aac1-45b6-b726-9d9369183238"},
|
149
149
|
language="en",
|
@@ -188,7 +188,7 @@ def get_tts_chunks():
|
|
188
188
|
api_key=os.getenv("CARTESIA_API_KEY"),
|
189
189
|
)
|
190
190
|
response = client.tts.sse(
|
191
|
-
model_id="sonic",
|
191
|
+
model_id="sonic-2",
|
192
192
|
transcript="Hello world!",
|
193
193
|
voice={
|
194
194
|
"id": "f9836c6e-a0bd-460e-9d3c-f7299fa60f94",
|
@@ -204,7 +204,7 @@ def get_tts_chunks():
|
|
204
204
|
"sample_rate": 44100,
|
205
205
|
},
|
206
206
|
)
|
207
|
-
|
207
|
+
|
208
208
|
audio_chunks = []
|
209
209
|
for chunk in response:
|
210
210
|
audio_chunks.append(chunk)
|
@@ -230,7 +230,7 @@ voice_id = "a0e99841-438c-4a64-b679-ae501e7d6091"
|
|
230
230
|
transcript = "Hello! Welcome to Cartesia"
|
231
231
|
|
232
232
|
# You can check out our models at https://docs.cartesia.ai/getting-started/available-models
|
233
|
-
model_id = "sonic"
|
233
|
+
model_id = "sonic-2"
|
234
234
|
|
235
235
|
p = pyaudio.PyAudio()
|
236
236
|
rate = 22050
|
@@ -248,7 +248,7 @@ for output in ws.send(
|
|
248
248
|
stream=True,
|
249
249
|
output_format={
|
250
250
|
"container": "raw",
|
251
|
-
"encoding": "pcm_f32le",
|
251
|
+
"encoding": "pcm_f32le",
|
252
252
|
"sample_rate": 22050
|
253
253
|
},
|
254
254
|
):
|
@@ -267,6 +267,55 @@ p.terminate()
|
|
267
267
|
ws.close() # Close the websocket connection
|
268
268
|
```
|
269
269
|
|
270
|
+
## Requesting Timestamps
|
271
|
+
|
272
|
+
```python
|
273
|
+
import asyncio
|
274
|
+
from cartesia import AsyncCartesia
|
275
|
+
import os
|
276
|
+
|
277
|
+
async def main():
|
278
|
+
client = AsyncCartesia(api_key=os.getenv("CARTESIA_API_KEY"))
|
279
|
+
|
280
|
+
# Connect to the websocket
|
281
|
+
ws = await client.tts.websocket()
|
282
|
+
|
283
|
+
# Generate speech with timestamps
|
284
|
+
output_generate = await ws.send(
|
285
|
+
model_id="sonic-2",
|
286
|
+
transcript="Hello! Welcome to Cartesia's text-to-speech.",
|
287
|
+
voice={"id": "f9836c6e-a0bd-460e-9d3c-f7299fa60f94"},
|
288
|
+
output_format={
|
289
|
+
"container": "raw",
|
290
|
+
"encoding": "pcm_f32le",
|
291
|
+
"sample_rate": 44100
|
292
|
+
},
|
293
|
+
add_timestamps=True, # Enable word-level timestamps
|
294
|
+
stream=True
|
295
|
+
)
|
296
|
+
|
297
|
+
# Process the streaming response with timestamps
|
298
|
+
all_words = []
|
299
|
+
all_starts = []
|
300
|
+
all_ends = []
|
301
|
+
audio_chunks = []
|
302
|
+
|
303
|
+
async for out in output_generate:
|
304
|
+
# Collect audio data
|
305
|
+
if out.audio is not None:
|
306
|
+
audio_chunks.append(out.audio)
|
307
|
+
|
308
|
+
# Process timestamp data
|
309
|
+
if out.word_timestamps is not None:
|
310
|
+
all_words.extend(out.word_timestamps.words) # List of words
|
311
|
+
all_starts.extend(out.word_timestamps.start) # Start time for each word (seconds)
|
312
|
+
all_ends.extend(out.word_timestamps.end) # End time for each word (seconds)
|
313
|
+
|
314
|
+
await ws.close()
|
315
|
+
|
316
|
+
asyncio.run(main())
|
317
|
+
```
|
318
|
+
|
270
319
|
## Advanced
|
271
320
|
|
272
321
|
### Retries
|
@@ -328,11 +377,33 @@ client = Cartesia(
|
|
328
377
|
|
329
378
|
## Contributing
|
330
379
|
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
380
|
+
Note that most of this library is generated programmatically from
|
381
|
+
<https://github.com/cartesia-ai/docs> — before making edits to a file, verify it's not autogenerated
|
382
|
+
by checking for this comment at the top of the file:
|
383
|
+
|
384
|
+
```
|
385
|
+
# This file was auto-generated by Fern from our API Definition.
|
386
|
+
```
|
387
|
+
|
388
|
+
### Running tests
|
389
|
+
|
390
|
+
```sh
|
391
|
+
uv pip install -r requirements.txt
|
392
|
+
uv run pytest -rP -vv tests/custom/test_client.py::test_get_voices
|
393
|
+
```
|
394
|
+
### Manually generating SDK code from docs
|
395
|
+
|
396
|
+
Assuming all your repos are cloned into your home directory:
|
397
|
+
|
398
|
+
```sh
|
399
|
+
$ cd ~/docs
|
400
|
+
$ fern generate --group python-sdk --log-level debug --api version-2024-11-13 --preview
|
401
|
+
$ cd ~/cartesia-python
|
402
|
+
$ git pull ~/docs/fern/apis/version-2024-11-13/.preview/fern-python-sdk
|
403
|
+
$ git commit --amend -m "manually regenerate from docs" # optional
|
404
|
+
```
|
405
|
+
|
406
|
+
### Automatically generating new SDK releases
|
336
407
|
|
337
|
-
|
408
|
+
From https://github.com/cartesia-ai/docs click `Actions` then `Release Python SDK`. (Requires permissions.)
|
338
409
|
|
@@ -38,7 +38,7 @@ print("The embedding for", voice.name, "is", voice.embedding)
|
|
38
38
|
# Clone a voice using file data
|
39
39
|
cloned_voice = client.voices.clone(
|
40
40
|
clip=open("path/to/voice.wav", "rb"),
|
41
|
-
name="Test cloned voice",
|
41
|
+
name="Test cloned voice",
|
42
42
|
language="en",
|
43
43
|
mode="similarity", # or "stability"
|
44
44
|
enhance=False, # use enhance=True to clean and denoise the cloning audio
|
@@ -75,7 +75,7 @@ client = Cartesia(
|
|
75
75
|
api_key=os.getenv("CARTESIA_API_KEY"),
|
76
76
|
)
|
77
77
|
client.tts.bytes(
|
78
|
-
model_id="sonic-
|
78
|
+
model_id="sonic-2",
|
79
79
|
transcript="Hello, world!",
|
80
80
|
voice={
|
81
81
|
"mode": "id",
|
@@ -111,7 +111,7 @@ client = AsyncCartesia(
|
|
111
111
|
|
112
112
|
async def main() -> None:
|
113
113
|
async for output in client.tts.bytes(
|
114
|
-
model_id="sonic-
|
114
|
+
model_id="sonic-2",
|
115
115
|
transcript="Hello, world!",
|
116
116
|
voice={"id": "694f9389-aac1-45b6-b726-9d9369183238"},
|
117
117
|
language="en",
|
@@ -156,7 +156,7 @@ def get_tts_chunks():
|
|
156
156
|
api_key=os.getenv("CARTESIA_API_KEY"),
|
157
157
|
)
|
158
158
|
response = client.tts.sse(
|
159
|
-
model_id="sonic",
|
159
|
+
model_id="sonic-2",
|
160
160
|
transcript="Hello world!",
|
161
161
|
voice={
|
162
162
|
"id": "f9836c6e-a0bd-460e-9d3c-f7299fa60f94",
|
@@ -172,7 +172,7 @@ def get_tts_chunks():
|
|
172
172
|
"sample_rate": 44100,
|
173
173
|
},
|
174
174
|
)
|
175
|
-
|
175
|
+
|
176
176
|
audio_chunks = []
|
177
177
|
for chunk in response:
|
178
178
|
audio_chunks.append(chunk)
|
@@ -198,7 +198,7 @@ voice_id = "a0e99841-438c-4a64-b679-ae501e7d6091"
|
|
198
198
|
transcript = "Hello! Welcome to Cartesia"
|
199
199
|
|
200
200
|
# You can check out our models at https://docs.cartesia.ai/getting-started/available-models
|
201
|
-
model_id = "sonic"
|
201
|
+
model_id = "sonic-2"
|
202
202
|
|
203
203
|
p = pyaudio.PyAudio()
|
204
204
|
rate = 22050
|
@@ -216,7 +216,7 @@ for output in ws.send(
|
|
216
216
|
stream=True,
|
217
217
|
output_format={
|
218
218
|
"container": "raw",
|
219
|
-
"encoding": "pcm_f32le",
|
219
|
+
"encoding": "pcm_f32le",
|
220
220
|
"sample_rate": 22050
|
221
221
|
},
|
222
222
|
):
|
@@ -235,6 +235,55 @@ p.terminate()
|
|
235
235
|
ws.close() # Close the websocket connection
|
236
236
|
```
|
237
237
|
|
238
|
+
## Requesting Timestamps
|
239
|
+
|
240
|
+
```python
|
241
|
+
import asyncio
|
242
|
+
from cartesia import AsyncCartesia
|
243
|
+
import os
|
244
|
+
|
245
|
+
async def main():
|
246
|
+
client = AsyncCartesia(api_key=os.getenv("CARTESIA_API_KEY"))
|
247
|
+
|
248
|
+
# Connect to the websocket
|
249
|
+
ws = await client.tts.websocket()
|
250
|
+
|
251
|
+
# Generate speech with timestamps
|
252
|
+
output_generate = await ws.send(
|
253
|
+
model_id="sonic-2",
|
254
|
+
transcript="Hello! Welcome to Cartesia's text-to-speech.",
|
255
|
+
voice={"id": "f9836c6e-a0bd-460e-9d3c-f7299fa60f94"},
|
256
|
+
output_format={
|
257
|
+
"container": "raw",
|
258
|
+
"encoding": "pcm_f32le",
|
259
|
+
"sample_rate": 44100
|
260
|
+
},
|
261
|
+
add_timestamps=True, # Enable word-level timestamps
|
262
|
+
stream=True
|
263
|
+
)
|
264
|
+
|
265
|
+
# Process the streaming response with timestamps
|
266
|
+
all_words = []
|
267
|
+
all_starts = []
|
268
|
+
all_ends = []
|
269
|
+
audio_chunks = []
|
270
|
+
|
271
|
+
async for out in output_generate:
|
272
|
+
# Collect audio data
|
273
|
+
if out.audio is not None:
|
274
|
+
audio_chunks.append(out.audio)
|
275
|
+
|
276
|
+
# Process timestamp data
|
277
|
+
if out.word_timestamps is not None:
|
278
|
+
all_words.extend(out.word_timestamps.words) # List of words
|
279
|
+
all_starts.extend(out.word_timestamps.start) # Start time for each word (seconds)
|
280
|
+
all_ends.extend(out.word_timestamps.end) # End time for each word (seconds)
|
281
|
+
|
282
|
+
await ws.close()
|
283
|
+
|
284
|
+
asyncio.run(main())
|
285
|
+
```
|
286
|
+
|
238
287
|
## Advanced
|
239
288
|
|
240
289
|
### Retries
|
@@ -296,10 +345,32 @@ client = Cartesia(
|
|
296
345
|
|
297
346
|
## Contributing
|
298
347
|
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
348
|
+
Note that most of this library is generated programmatically from
|
349
|
+
<https://github.com/cartesia-ai/docs> — before making edits to a file, verify it's not autogenerated
|
350
|
+
by checking for this comment at the top of the file:
|
351
|
+
|
352
|
+
```
|
353
|
+
# This file was auto-generated by Fern from our API Definition.
|
354
|
+
```
|
355
|
+
|
356
|
+
### Running tests
|
357
|
+
|
358
|
+
```sh
|
359
|
+
uv pip install -r requirements.txt
|
360
|
+
uv run pytest -rP -vv tests/custom/test_client.py::test_get_voices
|
361
|
+
```
|
362
|
+
### Manually generating SDK code from docs
|
363
|
+
|
364
|
+
Assuming all your repos are cloned into your home directory:
|
365
|
+
|
366
|
+
```sh
|
367
|
+
$ cd ~/docs
|
368
|
+
$ fern generate --group python-sdk --log-level debug --api version-2024-11-13 --preview
|
369
|
+
$ cd ~/cartesia-python
|
370
|
+
$ git pull ~/docs/fern/apis/version-2024-11-13/.preview/fern-python-sdk
|
371
|
+
$ git commit --amend -m "manually regenerate from docs" # optional
|
372
|
+
```
|
373
|
+
|
374
|
+
### Automatically generating new SDK releases
|
304
375
|
|
305
|
-
|
376
|
+
From https://github.com/cartesia-ai/docs click `Actions` then `Release Python SDK`. (Requires permissions.)
|
@@ -121,13 +121,14 @@ from .voices import (
|
|
121
121
|
EmbeddingSpecifier,
|
122
122
|
EmbeddingSpecifierParams,
|
123
123
|
Gender,
|
124
|
+
GenderPresentation,
|
125
|
+
GetVoicesResponse,
|
126
|
+
GetVoicesResponseParams,
|
124
127
|
IdSpecifier,
|
125
128
|
IdSpecifierParams,
|
126
129
|
LocalizeDialect,
|
127
130
|
LocalizeDialectParams,
|
128
131
|
LocalizeEnglishDialect,
|
129
|
-
LocalizePortugueseDialect,
|
130
|
-
LocalizeSpanishDialect,
|
131
132
|
LocalizeTargetLanguage,
|
132
133
|
LocalizeVoiceRequest,
|
133
134
|
LocalizeVoiceRequestParams,
|
@@ -138,6 +139,7 @@ from .voices import (
|
|
138
139
|
UpdateVoiceRequest,
|
139
140
|
UpdateVoiceRequestParams,
|
140
141
|
Voice,
|
142
|
+
VoiceExpandOptions,
|
141
143
|
VoiceId,
|
142
144
|
VoiceMetadata,
|
143
145
|
VoiceMetadataParams,
|
@@ -175,15 +177,16 @@ __all__ = [
|
|
175
177
|
"FilePurpose",
|
176
178
|
"FlushId",
|
177
179
|
"Gender",
|
180
|
+
"GenderPresentation",
|
178
181
|
"GenerationRequest",
|
179
182
|
"GenerationRequestParams",
|
183
|
+
"GetVoicesResponse",
|
184
|
+
"GetVoicesResponseParams",
|
180
185
|
"IdSpecifier",
|
181
186
|
"IdSpecifierParams",
|
182
187
|
"LocalizeDialect",
|
183
188
|
"LocalizeDialectParams",
|
184
189
|
"LocalizeEnglishDialect",
|
185
|
-
"LocalizePortugueseDialect",
|
186
|
-
"LocalizeSpanishDialect",
|
187
190
|
"LocalizeTargetLanguage",
|
188
191
|
"LocalizeVoiceRequest",
|
189
192
|
"LocalizeVoiceRequestParams",
|
@@ -235,6 +238,7 @@ __all__ = [
|
|
235
238
|
"UpdateVoiceRequest",
|
236
239
|
"UpdateVoiceRequestParams",
|
237
240
|
"Voice",
|
241
|
+
"VoiceExpandOptions",
|
238
242
|
"VoiceId",
|
239
243
|
"VoiceMetadata",
|
240
244
|
"VoiceMetadataParams",
|
@@ -5,14 +5,12 @@ 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 .datasets.client import DatasetsClient
|
9
8
|
from .infill.client import InfillClient
|
10
9
|
from .tts.client import TtsClient
|
11
10
|
from .voice_changer.client import VoiceChangerClient
|
12
11
|
from .voices.client import VoicesClient
|
13
12
|
from .core.client_wrapper import AsyncClientWrapper
|
14
13
|
from .api_status.client import AsyncApiStatusClient
|
15
|
-
from .datasets.client import AsyncDatasetsClient
|
16
14
|
from .infill.client import AsyncInfillClient
|
17
15
|
from .tts.client import AsyncTtsClient
|
18
16
|
from .voice_changer.client import AsyncVoiceChangerClient
|
@@ -78,7 +76,6 @@ class BaseCartesia:
|
|
78
76
|
timeout=_defaulted_timeout,
|
79
77
|
)
|
80
78
|
self.api_status = ApiStatusClient(client_wrapper=self._client_wrapper)
|
81
|
-
self.datasets = DatasetsClient(client_wrapper=self._client_wrapper)
|
82
79
|
self.infill = InfillClient(client_wrapper=self._client_wrapper)
|
83
80
|
self.tts = TtsClient(client_wrapper=self._client_wrapper)
|
84
81
|
self.voice_changer = VoiceChangerClient(client_wrapper=self._client_wrapper)
|
@@ -144,7 +141,6 @@ class AsyncBaseCartesia:
|
|
144
141
|
timeout=_defaulted_timeout,
|
145
142
|
)
|
146
143
|
self.api_status = AsyncApiStatusClient(client_wrapper=self._client_wrapper)
|
147
|
-
self.datasets = AsyncDatasetsClient(client_wrapper=self._client_wrapper)
|
148
144
|
self.infill = AsyncInfillClient(client_wrapper=self._client_wrapper)
|
149
145
|
self.tts = AsyncTtsClient(client_wrapper=self._client_wrapper)
|
150
146
|
self.voice_changer = AsyncVoiceChangerClient(client_wrapper=self._client_wrapper)
|
@@ -6,6 +6,7 @@ from .datetime_utils import serialize_datetime
|
|
6
6
|
from .file import File, convert_file_dict_to_httpx_tuples, with_content_type
|
7
7
|
from .http_client import AsyncHttpClient, HttpClient
|
8
8
|
from .jsonable_encoder import jsonable_encoder
|
9
|
+
from .pagination import AsyncPager, SyncPager
|
9
10
|
from .pydantic_utilities import (
|
10
11
|
IS_PYDANTIC_V2,
|
11
12
|
UniversalBaseModel,
|
@@ -24,6 +25,7 @@ __all__ = [
|
|
24
25
|
"ApiError",
|
25
26
|
"AsyncClientWrapper",
|
26
27
|
"AsyncHttpClient",
|
28
|
+
"AsyncPager",
|
27
29
|
"BaseClientWrapper",
|
28
30
|
"FieldMetadata",
|
29
31
|
"File",
|
@@ -31,6 +33,7 @@ __all__ = [
|
|
31
33
|
"IS_PYDANTIC_V2",
|
32
34
|
"RequestOptions",
|
33
35
|
"SyncClientWrapper",
|
36
|
+
"SyncPager",
|
34
37
|
"UniversalBaseModel",
|
35
38
|
"UniversalRootModel",
|
36
39
|
"convert_and_respect_annotation_metadata",
|
@@ -16,10 +16,10 @@ 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.0b7",
|
20
20
|
}
|
21
21
|
headers["X-API-Key"] = self.api_key
|
22
|
-
headers["Cartesia-Version"] = "2024-
|
22
|
+
headers["Cartesia-Version"] = "2024-11-13"
|
23
23
|
return headers
|
24
24
|
|
25
25
|
def get_base_url(self) -> str:
|
@@ -0,0 +1,88 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import typing
|
4
|
+
|
5
|
+
from typing_extensions import Self
|
6
|
+
|
7
|
+
import pydantic
|
8
|
+
|
9
|
+
# Generic to represent the underlying type of the results within a page
|
10
|
+
T = typing.TypeVar("T")
|
11
|
+
|
12
|
+
|
13
|
+
# SDKs implement a Page ABC per-pagination request, the endpoint then returns a pager that wraps this type
|
14
|
+
# for example, an endpoint will return SyncPager[UserPage] where UserPage implements the Page ABC. ex:
|
15
|
+
#
|
16
|
+
# SyncPager<InnerListType>(
|
17
|
+
# has_next=response.list_metadata.after is not None,
|
18
|
+
# items=response.data,
|
19
|
+
# # This should be the outer function that returns the SyncPager again
|
20
|
+
# get_next=lambda: list(..., cursor: response.cursor) (or list(..., offset: offset + 1))
|
21
|
+
# )
|
22
|
+
class BasePage(pydantic.BaseModel, typing.Generic[T]):
|
23
|
+
has_next: bool
|
24
|
+
items: typing.Optional[typing.List[T]]
|
25
|
+
|
26
|
+
|
27
|
+
class SyncPage(BasePage[T], typing.Generic[T]):
|
28
|
+
get_next: typing.Optional[typing.Callable[[], typing.Optional[Self]]]
|
29
|
+
|
30
|
+
|
31
|
+
class AsyncPage(BasePage[T], typing.Generic[T]):
|
32
|
+
get_next: typing.Optional[typing.Callable[[], typing.Awaitable[typing.Optional[Self]]]]
|
33
|
+
|
34
|
+
|
35
|
+
# ----------------------------
|
36
|
+
|
37
|
+
|
38
|
+
class SyncPager(SyncPage[T], typing.Generic[T]):
|
39
|
+
# Here we type ignore the iterator to avoid a mypy error
|
40
|
+
# caused by the type conflict with Pydanitc's __iter__ method
|
41
|
+
# brought in by extending the base model
|
42
|
+
def __iter__(self) -> typing.Iterator[T]: # type: ignore
|
43
|
+
for page in self.iter_pages():
|
44
|
+
if page.items is not None:
|
45
|
+
for item in page.items:
|
46
|
+
yield item
|
47
|
+
|
48
|
+
def iter_pages(self) -> typing.Iterator[SyncPage[T]]:
|
49
|
+
page: typing.Union[SyncPager[T], None] = self
|
50
|
+
while True:
|
51
|
+
if page is not None:
|
52
|
+
yield page
|
53
|
+
if page.has_next and page.get_next is not None:
|
54
|
+
page = page.get_next()
|
55
|
+
if page is None or page.items is None or len(page.items) == 0:
|
56
|
+
return
|
57
|
+
else:
|
58
|
+
return
|
59
|
+
else:
|
60
|
+
return
|
61
|
+
|
62
|
+
def next_page(self) -> typing.Optional[SyncPage[T]]:
|
63
|
+
return self.get_next() if self.get_next is not None else None
|
64
|
+
|
65
|
+
|
66
|
+
class AsyncPager(AsyncPage[T], typing.Generic[T]):
|
67
|
+
async def __aiter__(self) -> typing.AsyncIterator[T]: # type: ignore
|
68
|
+
async for page in self.iter_pages():
|
69
|
+
if page.items is not None:
|
70
|
+
for item in page.items:
|
71
|
+
yield item
|
72
|
+
|
73
|
+
async def iter_pages(self) -> typing.AsyncIterator[AsyncPage[T]]:
|
74
|
+
page: typing.Union[AsyncPager[T], None] = self
|
75
|
+
while True:
|
76
|
+
if page is not None:
|
77
|
+
yield page
|
78
|
+
if page is not None and page.has_next and page.get_next is not None:
|
79
|
+
page = await page.get_next()
|
80
|
+
if page is None or page.items is None or len(page.items) == 0:
|
81
|
+
return
|
82
|
+
else:
|
83
|
+
return
|
84
|
+
else:
|
85
|
+
return
|
86
|
+
|
87
|
+
async def next_page(self) -> typing.Optional[AsyncPage[T]]:
|
88
|
+
return await self.get_next() if self.get_next is not None else None
|
@@ -42,7 +42,7 @@ class InfillClient:
|
|
42
42
|
|
43
43
|
**The cost is 1 credit per character of the infill text plus a fixed cost of 300 credits.**
|
44
44
|
|
45
|
-
|
45
|
+
Infilling is only available on `sonic-2` at this time.
|
46
46
|
|
47
47
|
At least one of `left_audio` or `right_audio` must be provided.
|
48
48
|
|
@@ -117,7 +117,7 @@ class InfillClient:
|
|
117
117
|
api_key="YOUR_API_KEY",
|
118
118
|
)
|
119
119
|
client.infill.bytes(
|
120
|
-
model_id="sonic-
|
120
|
+
model_id="sonic-2",
|
121
121
|
language="en",
|
122
122
|
transcript="middle segment",
|
123
123
|
voice_id="694f9389-aac1-45b6-b726-9d9369183238",
|
@@ -189,7 +189,7 @@ class AsyncInfillClient:
|
|
189
189
|
|
190
190
|
**The cost is 1 credit per character of the infill text plus a fixed cost of 300 credits.**
|
191
191
|
|
192
|
-
|
192
|
+
Infilling is only available on `sonic-2` at this time.
|
193
193
|
|
194
194
|
At least one of `left_audio` or `right_audio` must be provided.
|
195
195
|
|
@@ -269,7 +269,7 @@ class AsyncInfillClient:
|
|
269
269
|
|
270
270
|
async def main() -> None:
|
271
271
|
await client.infill.bytes(
|
272
|
-
model_id="sonic-
|
272
|
+
model_id="sonic-2",
|
273
273
|
language="en",
|
274
274
|
transcript="middle segment",
|
275
275
|
voice_id="694f9389-aac1-45b6-b726-9d9369183238",
|