cartesia 2.0.6__tar.gz → 2.0.7__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.
Files changed (208) hide show
  1. cartesia-2.0.7/LICENSE +201 -0
  2. {cartesia-2.0.6 → cartesia-2.0.7}/PKG-INFO +4 -2
  3. {cartesia-2.0.6 → cartesia-2.0.7}/pyproject.toml +1 -1
  4. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/__init__.py +8 -0
  5. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/core/client_wrapper.py +1 -1
  6. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/infill/client.py +0 -8
  7. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/stt/client.py +0 -6
  8. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/__init__.py +8 -0
  9. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/client.py +13 -0
  10. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/requests/__init__.py +4 -0
  11. cartesia-2.0.7/src/cartesia/tts/requests/experimental_model_controls.py +17 -0
  12. cartesia-2.0.7/src/cartesia/tts/requests/generation_config.py +23 -0
  13. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/requests/tts_request.py +2 -0
  14. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/__init__.py +4 -0
  15. cartesia-2.0.7/src/cartesia/tts/types/experimental_model_controls.py +28 -0
  16. cartesia-2.0.7/src/cartesia/tts/types/generation_config.py +34 -0
  17. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/tts_request.py +2 -0
  18. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voice_changer/client.py +0 -8
  19. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/client.py +0 -12
  20. {cartesia-2.0.6 → cartesia-2.0.7}/README.md +0 -0
  21. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/api_status/__init__.py +0 -0
  22. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/api_status/client.py +0 -0
  23. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/api_status/requests/__init__.py +0 -0
  24. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/api_status/requests/api_info.py +0 -0
  25. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/api_status/types/__init__.py +0 -0
  26. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/api_status/types/api_info.py +0 -0
  27. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/auth/__init__.py +0 -0
  28. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/auth/client.py +0 -0
  29. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/auth/requests/__init__.py +0 -0
  30. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/auth/requests/token_grant.py +0 -0
  31. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/auth/requests/token_request.py +0 -0
  32. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/auth/requests/token_response.py +0 -0
  33. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/auth/types/__init__.py +0 -0
  34. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/auth/types/token_grant.py +0 -0
  35. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/auth/types/token_request.py +0 -0
  36. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/auth/types/token_response.py +0 -0
  37. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/base_client.py +0 -0
  38. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/client.py +0 -0
  39. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/core/__init__.py +0 -0
  40. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/core/api_error.py +0 -0
  41. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/core/datetime_utils.py +0 -0
  42. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/core/file.py +0 -0
  43. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/core/http_client.py +0 -0
  44. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/core/jsonable_encoder.py +0 -0
  45. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/core/pagination.py +0 -0
  46. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/core/pydantic_utilities.py +0 -0
  47. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/core/query_encoder.py +0 -0
  48. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/core/remove_none_from_dict.py +0 -0
  49. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/core/request_options.py +0 -0
  50. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/core/serialization.py +0 -0
  51. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/datasets/__init__.py +0 -0
  52. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/datasets/requests/__init__.py +0 -0
  53. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/datasets/requests/create_dataset_request.py +0 -0
  54. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/datasets/requests/dataset.py +0 -0
  55. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/datasets/requests/dataset_file.py +0 -0
  56. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/datasets/requests/paginated_dataset_files.py +0 -0
  57. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/datasets/requests/paginated_datasets.py +0 -0
  58. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/datasets/types/__init__.py +0 -0
  59. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/datasets/types/create_dataset_request.py +0 -0
  60. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/datasets/types/dataset.py +0 -0
  61. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/datasets/types/dataset_file.py +0 -0
  62. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/datasets/types/file_purpose.py +0 -0
  63. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/datasets/types/paginated_dataset_files.py +0 -0
  64. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/datasets/types/paginated_datasets.py +0 -0
  65. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/embedding/__init__.py +0 -0
  66. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/embedding/types/__init__.py +0 -0
  67. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/embedding/types/embedding.py +0 -0
  68. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/environment.py +0 -0
  69. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/infill/__init__.py +0 -0
  70. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/py.typed +0 -0
  71. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/stt/__init__.py +0 -0
  72. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/stt/_async_websocket.py +0 -0
  73. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/stt/_websocket.py +0 -0
  74. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/stt/requests/__init__.py +0 -0
  75. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/stt/requests/done_message.py +0 -0
  76. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/stt/requests/error_message.py +0 -0
  77. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/stt/requests/flush_done_message.py +0 -0
  78. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/stt/requests/streaming_transcription_response.py +0 -0
  79. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/stt/requests/transcript_message.py +0 -0
  80. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/stt/requests/transcription_response.py +0 -0
  81. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/stt/requests/transcription_word.py +0 -0
  82. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/stt/socket_client.py +0 -0
  83. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/stt/types/__init__.py +0 -0
  84. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/stt/types/done_message.py +0 -0
  85. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/stt/types/error_message.py +0 -0
  86. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/stt/types/flush_done_message.py +0 -0
  87. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/stt/types/streaming_transcription_response.py +0 -0
  88. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/stt/types/stt_encoding.py +0 -0
  89. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/stt/types/timestamp_granularity.py +0 -0
  90. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/stt/types/transcript_message.py +0 -0
  91. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/stt/types/transcription_response.py +0 -0
  92. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/stt/types/transcription_word.py +0 -0
  93. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/_async_websocket.py +0 -0
  94. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/_websocket.py +0 -0
  95. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/requests/cancel_context_request.py +0 -0
  96. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/requests/controls.py +0 -0
  97. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/requests/generation_request.py +0 -0
  98. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/requests/mp_3_output_format.py +0 -0
  99. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/requests/output_format.py +0 -0
  100. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/requests/phoneme_timestamps.py +0 -0
  101. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/requests/raw_output_format.py +0 -0
  102. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/requests/speed.py +0 -0
  103. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/requests/sse_output_format.py +0 -0
  104. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/requests/tts_request_embedding_specifier.py +0 -0
  105. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/requests/tts_request_id_specifier.py +0 -0
  106. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/requests/tts_request_voice_specifier.py +0 -0
  107. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/requests/ttssse_request.py +0 -0
  108. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/requests/wav_output_format.py +0 -0
  109. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/requests/web_socket_base_response.py +0 -0
  110. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/requests/web_socket_chunk_response.py +0 -0
  111. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/requests/web_socket_done_response.py +0 -0
  112. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/requests/web_socket_error_response.py +0 -0
  113. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/requests/web_socket_flush_done_response.py +0 -0
  114. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/requests/web_socket_phoneme_timestamps_response.py +0 -0
  115. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/requests/web_socket_raw_output_format.py +0 -0
  116. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/requests/web_socket_request.py +0 -0
  117. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/requests/web_socket_response.py +0 -0
  118. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/requests/web_socket_stream_options.py +0 -0
  119. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/requests/web_socket_timestamps_response.py +0 -0
  120. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/requests/web_socket_tts_output.py +0 -0
  121. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/requests/web_socket_tts_request.py +0 -0
  122. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/requests/word_timestamps.py +0 -0
  123. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/socket_client.py +0 -0
  124. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/cancel_context_request.py +0 -0
  125. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/context_id.py +0 -0
  126. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/controls.py +0 -0
  127. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/emotion.py +0 -0
  128. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/flush_id.py +0 -0
  129. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/generation_request.py +0 -0
  130. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/model_speed.py +0 -0
  131. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/mp_3_output_format.py +0 -0
  132. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/natural_specifier.py +0 -0
  133. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/numerical_specifier.py +0 -0
  134. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/output_format.py +0 -0
  135. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/phoneme_timestamps.py +0 -0
  136. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/raw_encoding.py +0 -0
  137. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/raw_output_format.py +0 -0
  138. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/speed.py +0 -0
  139. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/sse_output_format.py +0 -0
  140. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/supported_language.py +0 -0
  141. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/tts_request_embedding_specifier.py +0 -0
  142. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/tts_request_id_specifier.py +0 -0
  143. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/tts_request_voice_specifier.py +0 -0
  144. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/ttssse_request.py +0 -0
  145. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/wav_output_format.py +0 -0
  146. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/web_socket_base_response.py +0 -0
  147. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/web_socket_chunk_response.py +0 -0
  148. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/web_socket_done_response.py +0 -0
  149. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/web_socket_error_response.py +0 -0
  150. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/web_socket_flush_done_response.py +0 -0
  151. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/web_socket_phoneme_timestamps_response.py +0 -0
  152. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/web_socket_raw_output_format.py +0 -0
  153. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/web_socket_request.py +0 -0
  154. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/web_socket_response.py +0 -0
  155. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/web_socket_stream_options.py +0 -0
  156. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/web_socket_timestamps_response.py +0 -0
  157. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/web_socket_tts_output.py +0 -0
  158. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/web_socket_tts_request.py +0 -0
  159. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/types/word_timestamps.py +0 -0
  160. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/utils/constants.py +0 -0
  161. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/utils/tts.py +0 -0
  162. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/tts/utils/types.py +0 -0
  163. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/version.py +0 -0
  164. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voice_changer/__init__.py +0 -0
  165. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voice_changer/requests/__init__.py +0 -0
  166. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voice_changer/requests/streaming_response.py +0 -0
  167. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voice_changer/types/__init__.py +0 -0
  168. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voice_changer/types/output_format_container.py +0 -0
  169. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voice_changer/types/streaming_response.py +0 -0
  170. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/__init__.py +0 -0
  171. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/requests/__init__.py +0 -0
  172. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/requests/create_voice_request.py +0 -0
  173. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/requests/embedding_response.py +0 -0
  174. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/requests/embedding_specifier.py +0 -0
  175. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/requests/get_voices_response.py +0 -0
  176. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/requests/id_specifier.py +0 -0
  177. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/requests/localize_dialect.py +0 -0
  178. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/requests/localize_voice_request.py +0 -0
  179. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/requests/mix_voice_specifier.py +0 -0
  180. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/requests/mix_voices_request.py +0 -0
  181. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/requests/update_voice_request.py +0 -0
  182. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/requests/voice.py +0 -0
  183. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/requests/voice_metadata.py +0 -0
  184. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/types/__init__.py +0 -0
  185. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/types/base_voice_id.py +0 -0
  186. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/types/clone_mode.py +0 -0
  187. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/types/create_voice_request.py +0 -0
  188. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/types/embedding_response.py +0 -0
  189. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/types/embedding_specifier.py +0 -0
  190. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/types/gender.py +0 -0
  191. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/types/gender_presentation.py +0 -0
  192. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/types/get_voices_response.py +0 -0
  193. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/types/id_specifier.py +0 -0
  194. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/types/localize_dialect.py +0 -0
  195. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/types/localize_english_dialect.py +0 -0
  196. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/types/localize_french_dialect.py +0 -0
  197. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/types/localize_portuguese_dialect.py +0 -0
  198. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/types/localize_spanish_dialect.py +0 -0
  199. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/types/localize_target_language.py +0 -0
  200. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/types/localize_voice_request.py +0 -0
  201. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/types/mix_voice_specifier.py +0 -0
  202. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/types/mix_voices_request.py +0 -0
  203. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/types/update_voice_request.py +0 -0
  204. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/types/voice.py +0 -0
  205. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/types/voice_expand_options.py +0 -0
  206. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/types/voice_id.py +0 -0
  207. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/types/voice_metadata.py +0 -0
  208. {cartesia-2.0.6 → cartesia-2.0.7}/src/cartesia/voices/types/weight.py +0 -0
cartesia-2.0.7/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: cartesia
3
- Version: 2.0.6
3
+ Version: 2.0.7
4
4
  Summary:
5
5
  Requires-Python: >=3.8,<4.0
6
6
  Classifier: Intended Audience :: Developers
@@ -16,6 +16,7 @@ Classifier: Programming Language :: Python :: 3.9
16
16
  Classifier: Programming Language :: Python :: 3.10
17
17
  Classifier: Programming Language :: Python :: 3.11
18
18
  Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
19
20
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
20
21
  Classifier: Typing :: Typed
21
22
  Requires-Dist: aiohttp (>=3.10.10)
@@ -28,6 +29,7 @@ Requires-Dist: pydantic-core (>=2.18.2,<3.0.0)
28
29
  Requires-Dist: pydub (>=0.25.1)
29
30
  Requires-Dist: typing_extensions (>=4.0.0)
30
31
  Requires-Dist: websockets (>=10.4)
32
+ Project-URL: Repository, https://github.com/cartesia-ai/cartesia-python
31
33
  Description-Content-Type: text/markdown
32
34
 
33
35
  # Cartesia Python Library
@@ -3,7 +3,7 @@ name = "cartesia"
3
3
 
4
4
  [tool.poetry]
5
5
  name = "cartesia"
6
- version = "2.0.6"
6
+ version = "2.0.7"
7
7
  description = ""
8
8
  readme = "README.md"
9
9
  authors = []
@@ -52,7 +52,11 @@ from .tts import (
52
52
  Controls,
53
53
  ControlsParams,
54
54
  Emotion,
55
+ ExperimentalModelControls,
56
+ ExperimentalModelControlsParams,
55
57
  FlushId,
58
+ GenerationConfig,
59
+ GenerationConfigParams,
56
60
  GenerationRequest,
57
61
  GenerationRequestParams,
58
62
  ModelSpeed,
@@ -213,12 +217,16 @@ __all__ = [
213
217
  "Emotion",
214
218
  "ErrorMessage",
215
219
  "ErrorMessageParams",
220
+ "ExperimentalModelControls",
221
+ "ExperimentalModelControlsParams",
216
222
  "FilePurpose",
217
223
  "FlushDoneMessage",
218
224
  "FlushDoneMessageParams",
219
225
  "FlushId",
220
226
  "Gender",
221
227
  "GenderPresentation",
228
+ "GenerationConfig",
229
+ "GenerationConfigParams",
222
230
  "GenerationRequest",
223
231
  "GenerationRequestParams",
224
232
  "GetVoicesResponse",
@@ -16,7 +16,7 @@ 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.6",
19
+ "X-Fern-SDK-Version": "2.0.7",
20
20
  }
21
21
  headers["X-API-Key"] = self.api_key
22
22
  headers["Cartesia-Version"] = "2024-11-13"
@@ -83,17 +83,14 @@ class InfillClient:
83
83
  output_format_encoding : typing.Optional[RawEncoding]
84
84
  Required for `raw` and `wav` containers.
85
85
 
86
-
87
86
  output_format_bit_rate : typing.Optional[int]
88
87
  Required for `mp3` containers.
89
88
 
90
-
91
89
  voice_experimental_controls_speed : typing.Optional[Speed]
92
90
  Either a number between -1.0 and 1.0 or a natural language description of speed.
93
91
 
94
92
  If you specify a number, 0.0 is the default speed, -1.0 is the slowest speed, and 1.0 is the fastest speed.
95
93
 
96
-
97
94
  voice_experimental_controls_emotion : typing.Optional[typing.List[Emotion]]
98
95
  An array of emotion:level tags.
99
96
 
@@ -101,7 +98,6 @@ class InfillClient:
101
98
 
102
99
  Supported levels are: lowest, low, (omit), high, highest.
103
100
 
104
-
105
101
  request_options : typing.Optional[RequestOptions]
106
102
  Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
107
103
 
@@ -230,17 +226,14 @@ class AsyncInfillClient:
230
226
  output_format_encoding : typing.Optional[RawEncoding]
231
227
  Required for `raw` and `wav` containers.
232
228
 
233
-
234
229
  output_format_bit_rate : typing.Optional[int]
235
230
  Required for `mp3` containers.
236
231
 
237
-
238
232
  voice_experimental_controls_speed : typing.Optional[Speed]
239
233
  Either a number between -1.0 and 1.0 or a natural language description of speed.
240
234
 
241
235
  If you specify a number, 0.0 is the default speed, -1.0 is the slowest speed, and 1.0 is the fastest speed.
242
236
 
243
-
244
237
  voice_experimental_controls_emotion : typing.Optional[typing.List[Emotion]]
245
238
  An array of emotion:level tags.
246
239
 
@@ -248,7 +241,6 @@ class AsyncInfillClient:
248
241
 
249
242
  Supported levels are: lowest, low, (omit), high, highest.
250
243
 
251
-
252
244
  request_options : typing.Optional[RequestOptions]
253
245
  Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
254
246
 
@@ -54,7 +54,6 @@ class SttClient:
54
54
  model : str
55
55
  ID of the model to use for transcription. Use `ink-whisper` for the latest Cartesia Whisper model.
56
56
 
57
-
58
57
  encoding : typing.Optional[SttEncoding]
59
58
  The encoding format to process the audio as. If not specified, the audio file will be decoded automatically.
60
59
 
@@ -175,11 +174,9 @@ class SttClient:
175
174
  - `yue` (Cantonese)
176
175
  </Accordion>
177
176
 
178
-
179
177
  timestamp_granularities : typing.Optional[typing.List[TimestampGranularity]]
180
178
  The timestamp granularities to populate for this transcription. Currently only `word` level timestamps are supported.
181
179
 
182
-
183
180
  request_options : typing.Optional[RequestOptions]
184
181
  Request-specific configuration.
185
182
 
@@ -270,7 +267,6 @@ class AsyncSttClient:
270
267
  model : str
271
268
  ID of the model to use for transcription. Use `ink-whisper` for the latest Cartesia Whisper model.
272
269
 
273
-
274
270
  encoding : typing.Optional[SttEncoding]
275
271
  The encoding format to process the audio as. If not specified, the audio file will be decoded automatically.
276
272
 
@@ -391,11 +387,9 @@ class AsyncSttClient:
391
387
  - `yue` (Cantonese)
392
388
  </Accordion>
393
389
 
394
-
395
390
  timestamp_granularities : typing.Optional[typing.List[TimestampGranularity]]
396
391
  The timestamp granularities to populate for this transcription. Currently only `word` level timestamps are supported.
397
392
 
398
-
399
393
  request_options : typing.Optional[RequestOptions]
400
394
  Request-specific configuration.
401
395
 
@@ -5,7 +5,9 @@ from .types import (
5
5
  ContextId,
6
6
  Controls,
7
7
  Emotion,
8
+ ExperimentalModelControls,
8
9
  FlushId,
10
+ GenerationConfig,
9
11
  GenerationRequest,
10
12
  ModelSpeed,
11
13
  Mp3OutputFormat,
@@ -51,6 +53,8 @@ from .types import (
51
53
  from .requests import (
52
54
  CancelContextRequestParams,
53
55
  ControlsParams,
56
+ ExperimentalModelControlsParams,
57
+ GenerationConfigParams,
54
58
  GenerationRequestParams,
55
59
  Mp3OutputFormatParams,
56
60
  OutputFormatParams,
@@ -96,7 +100,11 @@ __all__ = [
96
100
  "Controls",
97
101
  "ControlsParams",
98
102
  "Emotion",
103
+ "ExperimentalModelControls",
104
+ "ExperimentalModelControlsParams",
99
105
  "FlushId",
106
+ "GenerationConfig",
107
+ "GenerationConfigParams",
100
108
  "GenerationRequest",
101
109
  "GenerationRequestParams",
102
110
  "ModelSpeed",
@@ -6,6 +6,7 @@ from .requests.tts_request_voice_specifier import TtsRequestVoiceSpecifierParams
6
6
  from .requests.output_format import OutputFormatParams
7
7
  from .types.supported_language import SupportedLanguage
8
8
  from .types.model_speed import ModelSpeed
9
+ from .requests.generation_config import GenerationConfigParams
9
10
  from ..core.request_options import RequestOptions
10
11
  from ..core.serialization import convert_and_respect_annotation_metadata
11
12
  from json.decoder import JSONDecodeError
@@ -36,6 +37,7 @@ class TtsClient:
36
37
  language: typing.Optional[SupportedLanguage] = OMIT,
37
38
  duration: typing.Optional[float] = OMIT,
38
39
  speed: typing.Optional[ModelSpeed] = OMIT,
40
+ generation_config: typing.Optional[GenerationConfigParams] = OMIT,
39
41
  request_options: typing.Optional[RequestOptions] = None,
40
42
  ) -> typing.Iterator[bytes]:
41
43
  """
@@ -58,6 +60,8 @@ class TtsClient:
58
60
 
59
61
  speed : typing.Optional[ModelSpeed]
60
62
 
63
+ generation_config : typing.Optional[GenerationConfigParams]
64
+
61
65
  request_options : typing.Optional[RequestOptions]
62
66
  Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
63
67
 
@@ -99,6 +103,9 @@ class TtsClient:
99
103
  ),
100
104
  "duration": duration,
101
105
  "speed": speed,
106
+ "generation_config": convert_and_respect_annotation_metadata(
107
+ object_=generation_config, annotation=GenerationConfigParams, direction="write"
108
+ ),
102
109
  },
103
110
  request_options=request_options,
104
111
  omit=OMIT,
@@ -250,6 +257,7 @@ class AsyncTtsClient:
250
257
  language: typing.Optional[SupportedLanguage] = OMIT,
251
258
  duration: typing.Optional[float] = OMIT,
252
259
  speed: typing.Optional[ModelSpeed] = OMIT,
260
+ generation_config: typing.Optional[GenerationConfigParams] = OMIT,
253
261
  request_options: typing.Optional[RequestOptions] = None,
254
262
  ) -> typing.AsyncIterator[bytes]:
255
263
  """
@@ -272,6 +280,8 @@ class AsyncTtsClient:
272
280
 
273
281
  speed : typing.Optional[ModelSpeed]
274
282
 
283
+ generation_config : typing.Optional[GenerationConfigParams]
284
+
275
285
  request_options : typing.Optional[RequestOptions]
276
286
  Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
277
287
 
@@ -321,6 +331,9 @@ class AsyncTtsClient:
321
331
  ),
322
332
  "duration": duration,
323
333
  "speed": speed,
334
+ "generation_config": convert_and_respect_annotation_metadata(
335
+ object_=generation_config, annotation=GenerationConfigParams, direction="write"
336
+ ),
324
337
  },
325
338
  request_options=request_options,
326
339
  omit=OMIT,
@@ -2,6 +2,8 @@
2
2
 
3
3
  from .cancel_context_request import CancelContextRequestParams
4
4
  from .controls import ControlsParams
5
+ from .experimental_model_controls import ExperimentalModelControlsParams
6
+ from .generation_config import GenerationConfigParams
5
7
  from .generation_request import GenerationRequestParams
6
8
  from .mp_3_output_format import Mp3OutputFormatParams
7
9
  from .output_format import OutputFormatParams, OutputFormat_Mp3Params, OutputFormat_RawParams, OutputFormat_WavParams
@@ -41,6 +43,8 @@ from .word_timestamps import WordTimestampsParams
41
43
  __all__ = [
42
44
  "CancelContextRequestParams",
43
45
  "ControlsParams",
46
+ "ExperimentalModelControlsParams",
47
+ "GenerationConfigParams",
44
48
  "GenerationRequestParams",
45
49
  "Mp3OutputFormatParams",
46
50
  "OutputFormatParams",
@@ -0,0 +1,17 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing_extensions
4
+ import typing_extensions
5
+
6
+
7
+ class ExperimentalModelControlsParams(typing_extensions.TypedDict):
8
+ """
9
+ These controls are **experimental** and subject to breaking changes.
10
+ """
11
+
12
+ accent_localization: typing_extensions.NotRequired[int]
13
+ """
14
+ Toggle accent localization: 0 (disabled, default) or 1 (enabled).
15
+ When enabled, the voice adapts to match the transcript language's accent while preserving vocal characteristics. When disabled, maintains the original voice accent.
16
+ For more information, see [Localize Voices](/build-with-sonic/capabilities/localize-voices).
17
+ """
@@ -0,0 +1,23 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing_extensions
4
+ import typing_extensions
5
+ from .experimental_model_controls import ExperimentalModelControlsParams
6
+
7
+
8
+ class GenerationConfigParams(typing_extensions.TypedDict):
9
+ """
10
+ Configure the various attributes of the generated speech. These controls are only available for `sonic-3-preview` and will have no effect on earlier models.
11
+ """
12
+
13
+ volume: typing_extensions.NotRequired[float]
14
+ """
15
+ Adjust the volume of the generated speech between -1.0 (softer) and 1.0 (louder). 0.0 is the default volume.
16
+ """
17
+
18
+ speed: typing_extensions.NotRequired[float]
19
+ """
20
+ Adjust the speed of the generated speech between -1.0 (slower) and 1.0 (faster). 0.0 is the default speed.
21
+ """
22
+
23
+ experimental: typing_extensions.NotRequired[ExperimentalModelControlsParams]
@@ -6,6 +6,7 @@ import typing_extensions
6
6
  from ..types.supported_language import SupportedLanguage
7
7
  from .output_format import OutputFormatParams
8
8
  from ..types.model_speed import ModelSpeed
9
+ from .generation_config import GenerationConfigParams
9
10
 
10
11
 
11
12
  class TtsRequestParams(typing_extensions.TypedDict):
@@ -25,3 +26,4 @@ class TtsRequestParams(typing_extensions.TypedDict):
25
26
  """
26
27
 
27
28
  speed: typing_extensions.NotRequired[ModelSpeed]
29
+ generation_config: typing_extensions.NotRequired[GenerationConfigParams]
@@ -4,7 +4,9 @@ from .cancel_context_request import CancelContextRequest
4
4
  from .context_id import ContextId
5
5
  from .controls import Controls
6
6
  from .emotion import Emotion
7
+ from .experimental_model_controls import ExperimentalModelControls
7
8
  from .flush_id import FlushId
9
+ from .generation_config import GenerationConfig
8
10
  from .generation_request import GenerationRequest
9
11
  from .model_speed import ModelSpeed
10
12
  from .mp_3_output_format import Mp3OutputFormat
@@ -51,7 +53,9 @@ __all__ = [
51
53
  "ContextId",
52
54
  "Controls",
53
55
  "Emotion",
56
+ "ExperimentalModelControls",
54
57
  "FlushId",
58
+ "GenerationConfig",
55
59
  "GenerationRequest",
56
60
  "ModelSpeed",
57
61
  "Mp3OutputFormat",
@@ -0,0 +1,28 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ...core.pydantic_utilities import UniversalBaseModel
4
+ import typing
5
+ import pydantic
6
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
7
+
8
+
9
+ class ExperimentalModelControls(UniversalBaseModel):
10
+ """
11
+ These controls are **experimental** and subject to breaking changes.
12
+ """
13
+
14
+ accent_localization: typing.Optional[int] = pydantic.Field(default=None)
15
+ """
16
+ Toggle accent localization: 0 (disabled, default) or 1 (enabled).
17
+ When enabled, the voice adapts to match the transcript language's accent while preserving vocal characteristics. When disabled, maintains the original voice accent.
18
+ For more information, see [Localize Voices](/build-with-sonic/capabilities/localize-voices).
19
+ """
20
+
21
+ if IS_PYDANTIC_V2:
22
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
23
+ else:
24
+
25
+ class Config:
26
+ frozen = True
27
+ smart_union = True
28
+ extra = pydantic.Extra.allow
@@ -0,0 +1,34 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ...core.pydantic_utilities import UniversalBaseModel
4
+ import typing
5
+ import pydantic
6
+ from .experimental_model_controls import ExperimentalModelControls
7
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
8
+
9
+
10
+ class GenerationConfig(UniversalBaseModel):
11
+ """
12
+ Configure the various attributes of the generated speech. These controls are only available for `sonic-3-preview` and will have no effect on earlier models.
13
+ """
14
+
15
+ volume: typing.Optional[float] = pydantic.Field(default=None)
16
+ """
17
+ Adjust the volume of the generated speech between -1.0 (softer) and 1.0 (louder). 0.0 is the default volume.
18
+ """
19
+
20
+ speed: typing.Optional[float] = pydantic.Field(default=None)
21
+ """
22
+ Adjust the speed of the generated speech between -1.0 (slower) and 1.0 (faster). 0.0 is the default speed.
23
+ """
24
+
25
+ experimental: typing.Optional[ExperimentalModelControls] = None
26
+
27
+ if IS_PYDANTIC_V2:
28
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
29
+ else:
30
+
31
+ class Config:
32
+ frozen = True
33
+ smart_union = True
34
+ extra = pydantic.Extra.allow
@@ -7,6 +7,7 @@ import typing
7
7
  from .supported_language import SupportedLanguage
8
8
  from .output_format import OutputFormat
9
9
  from .model_speed import ModelSpeed
10
+ from .generation_config import GenerationConfig
10
11
  from ...core.pydantic_utilities import IS_PYDANTIC_V2
11
12
 
12
13
 
@@ -27,6 +28,7 @@ class TtsRequest(UniversalBaseModel):
27
28
  """
28
29
 
29
30
  speed: typing.Optional[ModelSpeed] = None
31
+ generation_config: typing.Optional[GenerationConfig] = None
30
32
 
31
33
  if IS_PYDANTIC_V2:
32
34
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2