You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
language (str, optional): The language code for synthesis. Defaults to "en".
105
108
encoding (TTSEncoding, optional): The audio encoding format. Defaults to "pcm_s16le".
106
109
voice (str | list[float], optional): The voice ID or embedding array.
107
-
speed (TTSVoiceSpeed | float, optional): Voice Control - Speed (https://docs.cartesia.ai/user-guides/voice-control)
108
-
emotion (list[TTSVoiceEmotion], optional): Voice Control - Emotion (https://docs.cartesia.ai/user-guides/voice-control)
110
+
speed (TTSVoiceSpeed | float, optional): Speed of speech, with sonic-3, the value is valid between 0.6 and 2.0 (https://docs.cartesia.ai/api-reference/tts/bytes#body-generation-config-speed)
111
+
emotion (list[TTSVoiceEmotion], optional): Emotion of the speech (https://docs.cartesia.ai/api-reference/tts/bytes#body-generation-config-emotion)
112
+
volume (float, optional): Volume of the speech, with sonic-3, the value is valid between 0.5 and 2.0
109
113
sample_rate (int, optional): The audio sample rate in Hz. Defaults to 24000.
110
114
word_timestamps (bool, optional): Whether to add word timestamps to the output. Defaults to True.
111
115
api_key (str, optional): The Cartesia API key. If not provided, it will be read from the CARTESIA_API_KEY environment variable.
f"speed and emotion controls are only supported for model '{MODEL_ID_WITH_EMBEDDINGS_AND_EXPERIMENTAL_CONTROLS}', and API version '{API_VERSION_WITH_EMBEDDINGS_AND_EXPERIMENTAL_CONTROLS}', "
137
-
"see https://docs.cartesia.ai/developer-tools/changelog for details",
f"speed and emotion controls are only supported for model '{MODEL_ID_WITH_EMBEDDINGS_AND_EXPERIMENTAL_CONTROLS}', and API version '{API_VERSION_WITH_EMBEDDINGS_AND_EXPERIMENTAL_CONTROLS}', "
241
-
"see https://docs.cartesia.ai/developer-tools/changelog for details",
f"speed and emotion controls are only supported for model '{MODEL_ID_WITH_EMBEDDINGS_AND_EXPERIMENTAL_CONTROLS}', and API version '{API_VERSION_WITH_EMBEDDINGS_AND_EXPERIMENTAL_CONTROLS}', "
276
+
"see https://docs.cartesia.ai/developer-tools/changelog for details",
277
+
extra={
278
+
"model": self._opts.model,
279
+
"speed": self._opts.speed,
280
+
"emotion": self._opts.emotion,
281
+
},
282
+
)
283
+
264
284
265
285
classChunkedStream(tts.ChunkedStream):
266
286
"""Synthesize chunked text using the bytes endpoint"""
0 commit comments