cartesia 1.0.12__tar.gz → 1.0.13__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cartesia
3
- Version: 1.0.12
3
+ Version: 1.0.13
4
4
  Summary: The official Python library for the Cartesia API.
5
5
  Home-page:
6
6
  Author: Cartesia, Inc.
@@ -49,6 +49,7 @@ DEFAULT_BASE_URL = "api.cartesia.ai"
49
49
  DEFAULT_CARTESIA_VERSION = "2024-06-10" # latest version
50
50
  DEFAULT_TIMEOUT = 30 # seconds
51
51
  DEFAULT_NUM_CONNECTIONS = 10 # connections per client
52
+ DEFAULT_VOICE_EMBEDDING = [1.0] * 192 # Default voice embedding is a 192 sized float array
52
53
 
53
54
  BACKOFF_FACTOR = 1
54
55
  MAX_RETRIES = 3
@@ -890,15 +891,17 @@ class TTS(Resource):
890
891
  if voice_id is None and voice_embedding is None:
891
892
  raise ValueError("Either voice_id or voice_embedding must be specified.")
892
893
 
893
- if voice_id is not None and voice_embedding is not None:
894
- raise ValueError("Only one of voice_id or voice_embedding should be specified.")
894
+ voice = {}
895
+
896
+ if voice_id is not None:
897
+ voice["id"] = voice_id
898
+
899
+ if voice_embedding is not None:
900
+ voice["embedding"] = voice_embedding
895
901
 
896
- if voice_id:
897
- voice = {"id": voice_id}
898
- else:
899
- voice = {"embedding": voice_embedding}
900
902
  if experimental_voice_controls is not None:
901
903
  voice["__experimental_controls"] = experimental_voice_controls
904
+
902
905
  return voice
903
906
 
904
907
 
@@ -1162,7 +1165,7 @@ class _AsyncTTSContext:
1162
1165
  model_id=DEFAULT_MODEL_ID,
1163
1166
  transcript="",
1164
1167
  output_format=TTS.get_output_format("raw_pcm_f32le_44100"),
1165
- voice_id="a0e99841-438c-4a64-b679-ae501e7d6091", # Default voice ID since it's a required input for now
1168
+ voice_embedding=DEFAULT_VOICE_EMBEDDING, # Default voice embedding since it's a required input for now.
1166
1169
  context_id=self._context_id,
1167
1170
  continue_=False,
1168
1171
  )
@@ -0,0 +1 @@
1
+ __version__ = "1.0.13"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cartesia
3
- Version: 1.0.12
3
+ Version: 1.0.13
4
4
  Summary: The official Python library for the Cartesia API.
5
5
  Home-page:
6
6
  Author: Cartesia, Inc.