speechify-api 3.0.1__tar.gz → 5.0.0__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 (178) hide show
  1. speechify_api-5.0.0/LICENSE +21 -0
  2. {speechify_api-3.0.1 → speechify_api-5.0.0}/PKG-INFO +37 -12
  3. {speechify_api-3.0.1 → speechify_api-5.0.0}/README.md +31 -8
  4. {speechify_api-3.0.1 → speechify_api-5.0.0}/pyproject.toml +8 -6
  5. speechify_api-5.0.0/src/speechify/__init__.py +383 -0
  6. speechify_api-5.0.0/src/speechify/audio/__init__.py +130 -0
  7. speechify_api-5.0.0/src/speechify/audio/client.py +753 -0
  8. speechify_api-5.0.0/src/speechify/audio/raw_client.py +1599 -0
  9. speechify_api-5.0.0/src/speechify/audio/types/__init__.py +125 -0
  10. speechify_api-5.0.0/src/speechify/audio/types/audio_stream_input_model.py +5 -0
  11. speechify_api-5.0.0/src/speechify/audio/types/audio_stream_input_output_format.py +30 -0
  12. speechify_api-5.0.0/src/speechify/audio/types/audio_stream_input_speech_marks.py +5 -0
  13. speechify_api-5.0.0/src/speechify/audio/types/get_speech_request_model.py +5 -0
  14. speechify_api-5.0.0/src/speechify/audio/types/input_close.py +24 -0
  15. speechify_api-5.0.0/src/speechify/audio/types/input_close_type.py +5 -0
  16. speechify_api-5.0.0/src/speechify/audio/types/input_flush.py +24 -0
  17. speechify_api-5.0.0/src/speechify/audio/types/input_flush_type.py +5 -0
  18. speechify_api-5.0.0/src/speechify/audio/types/input_text.py +28 -0
  19. speechify_api-5.0.0/src/speechify/audio/types/input_text_type.py +5 -0
  20. speechify_api-5.0.0/src/speechify/audio/types/session_pronunciations.py +29 -0
  21. speechify_api-5.0.0/src/speechify/audio/types/session_pronunciations_pronunciations_item.py +10 -0
  22. speechify_api-5.0.0/src/speechify/audio/types/session_pronunciations_pronunciations_item_alias.py +36 -0
  23. speechify_api-5.0.0/src/speechify/audio/types/session_pronunciations_pronunciations_item_ipa.py +36 -0
  24. speechify_api-5.0.0/src/speechify/audio/types/session_pronunciations_type.py +5 -0
  25. speechify_api-5.0.0/src/speechify/audio/types/speech_chunk.py +43 -0
  26. speechify_api-5.0.0/src/speechify/audio/types/speech_chunk_speech_marks_item.py +28 -0
  27. speechify_api-5.0.0/src/speechify/audio/types/speech_chunk_type.py +5 -0
  28. speechify_api-5.0.0/src/speechify/audio/types/speech_done.py +35 -0
  29. speechify_api-5.0.0/src/speechify/audio/types/speech_done_reason.py +5 -0
  30. speechify_api-5.0.0/src/speechify/audio/types/speech_done_type.py +5 -0
  31. speechify_api-5.0.0/src/speechify/audio/types/speech_error.py +34 -0
  32. speechify_api-5.0.0/src/speechify/audio/types/speech_error_error.py +64 -0
  33. speechify_api-5.0.0/src/speechify/audio/types/speech_error_error_code.py +181 -0
  34. speechify_api-5.0.0/src/speechify/audio/types/speech_error_type.py +5 -0
  35. speechify_api-5.0.0/src/speechify/audio/types/speech_flushed.py +24 -0
  36. speechify_api-5.0.0/src/speechify/audio/types/speech_flushed_type.py +5 -0
  37. speechify_api-5.0.0/src/speechify/audio/types/stream_with_timestamps_audio_request_accept.py +7 -0
  38. speechify_api-5.0.0/src/speechify/audio/watermark/__init__.py +4 -0
  39. speechify_api-5.0.0/src/speechify/audio/watermark/client.py +269 -0
  40. speechify_api-5.0.0/src/speechify/audio/watermark/raw_client.py +648 -0
  41. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/client.py +106 -38
  42. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/core/client_wrapper.py +40 -20
  43. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/core/http_client.py +221 -39
  44. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/core/http_response.py +4 -0
  45. speechify_api-5.0.0/src/speechify/core/http_sse/_api.py +455 -0
  46. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/core/http_sse/_decoders.py +13 -0
  47. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/core/jsonable_encoder.py +26 -1
  48. speechify_api-5.0.0/src/speechify/core/pagination.py +165 -0
  49. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/core/pydantic_utilities.py +114 -82
  50. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/core/request_options.py +9 -1
  51. speechify_api-5.0.0/src/speechify/environment.py +14 -0
  52. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/errors/__init__.py +3 -0
  53. speechify_api-5.0.0/src/speechify/errors/content_too_large_error.py +11 -0
  54. speechify_api-5.0.0/src/speechify/models/__init__.py +4 -0
  55. speechify_api-5.0.0/src/speechify/models/client.py +118 -0
  56. speechify_api-5.0.0/src/speechify/models/raw_client.py +235 -0
  57. {speechify_api-3.0.1/src/speechify/voices → speechify_api-5.0.0/src/speechify/projects}/__init__.py +3 -3
  58. speechify_api-5.0.0/src/speechify/projects/client.py +1458 -0
  59. speechify_api-5.0.0/src/speechify/projects/raw_client.py +3043 -0
  60. {speechify_api-3.0.1/src/speechify/voices → speechify_api-5.0.0/src/speechify/projects}/types/__init__.py +3 -3
  61. speechify_api-5.0.0/src/speechify/projects/types/delete_project_request_mode.py +5 -0
  62. speechify_api-5.0.0/src/speechify/types/__init__.py +214 -0
  63. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/types/audio_output_format.py +2 -0
  64. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/types/audio_stream_output_format.py +2 -0
  65. speechify_api-5.0.0/src/speechify/types/billing_entitlements.py +125 -0
  66. speechify_api-5.0.0/src/speechify/types/billing_entitlements_max_llm_model_class.py +5 -0
  67. speechify_api-5.0.0/src/speechify/types/consent_challenge.py +40 -0
  68. speechify_api-5.0.0/src/speechify/types/entitlements_response.py +33 -0
  69. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/types/error.py +2 -2
  70. speechify_api-5.0.0/src/speechify/types/error_code.py +181 -0
  71. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/types/error_detail.py +8 -0
  72. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/types/get_speech_response.py +1 -1
  73. speechify_api-5.0.0/src/speechify/types/get_stream_request.py +64 -0
  74. speechify_api-5.0.0/src/speechify/types/get_stream_request_model.py +5 -0
  75. speechify_api-5.0.0/src/speechify/types/get_voice.py +63 -0
  76. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/types/get_voices_model.py +8 -1
  77. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/types/get_voices_model_name.py +1 -1
  78. speechify_api-5.0.0/src/speechify/types/list_projects_response.py +21 -0
  79. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/types/list_voices_response.py +3 -3
  80. speechify_api-5.0.0/src/speechify/types/list_webhook_endpoint_deliveries_response.py +25 -0
  81. speechify_api-5.0.0/src/speechify/types/list_webhook_endpoints_response.py +25 -0
  82. speechify_api-5.0.0/src/speechify/types/model.py +128 -0
  83. speechify_api-5.0.0/src/speechify/types/models_response.py +44 -0
  84. speechify_api-5.0.0/src/speechify/types/project.py +144 -0
  85. speechify_api-5.0.0/src/speechify/types/project_audit_event.py +73 -0
  86. speechify_api-5.0.0/src/speechify/types/project_audit_event_type.py +8 -0
  87. speechify_api-5.0.0/src/speechify/types/project_audit_response.py +25 -0
  88. speechify_api-5.0.0/src/speechify/types/project_member.py +33 -0
  89. speechify_api-5.0.0/src/speechify/types/project_members_response.py +21 -0
  90. speechify_api-5.0.0/src/speechify/types/project_monthly_budget_status.py +5 -0
  91. speechify_api-5.0.0/src/speechify/types/project_restore.py +56 -0
  92. speechify_api-3.0.1/src/speechify/types/get_voice.py → speechify_api-5.0.0/src/speechify/types/project_still_revoked_counts.py +10 -13
  93. speechify_api-5.0.0/src/speechify/types/pronunciation.py +8 -0
  94. speechify_api-5.0.0/src/speechify/types/pronunciation_alias.py +31 -0
  95. speechify_api-5.0.0/src/speechify/types/pronunciation_case_sensitive.py +6 -0
  96. speechify_api-5.0.0/src/speechify/types/pronunciation_ipa.py +31 -0
  97. speechify_api-5.0.0/src/speechify/types/pronunciation_ipa_text.py +6 -0
  98. speechify_api-5.0.0/src/speechify/types/pronunciation_text.py +6 -0
  99. speechify_api-5.0.0/src/speechify/types/pronunciations.py +14 -0
  100. speechify_api-5.0.0/src/speechify/types/safety_identifier.py +10 -0
  101. speechify_api-5.0.0/src/speechify/types/speech_chunk_event.py +41 -0
  102. speechify_api-5.0.0/src/speechify/types/speech_done_event.py +32 -0
  103. speechify_api-5.0.0/src/speechify/types/speech_error_event.py +32 -0
  104. speechify_api-5.0.0/src/speechify/types/speech_stream_event.py +80 -0
  105. speechify_api-5.0.0/src/speechify/types/watermark_detection_response.py +38 -0
  106. speechify_api-5.0.0/src/speechify/types/watermark_verification_response.py +34 -0
  107. speechify_api-5.0.0/src/speechify/types/webhook_delivery_status.py +5 -0
  108. speechify_api-5.0.0/src/speechify/types/webhook_endpoint.py +103 -0
  109. speechify_api-5.0.0/src/speechify/types/webhook_endpoint_delivery.py +70 -0
  110. {speechify_api-3.0.1/src/speechify/audio → speechify_api-5.0.0/src/speechify/voices}/__init__.py +7 -11
  111. speechify_api-5.0.0/src/speechify/voices/client.py +735 -0
  112. speechify_api-5.0.0/src/speechify/voices/consent_challenges/__init__.py +4 -0
  113. speechify_api-5.0.0/src/speechify/voices/consent_challenges/client.py +185 -0
  114. speechify_api-5.0.0/src/speechify/voices/consent_challenges/raw_client.py +398 -0
  115. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/voices/raw_client.py +227 -34
  116. speechify_api-5.0.0/src/speechify/voices/types/__init__.py +40 -0
  117. speechify_api-5.0.0/src/speechify/voices/types/list_voices_request_gender.py +5 -0
  118. speechify_api-5.0.0/src/speechify/voices/types/list_voices_request_type.py +5 -0
  119. speechify_api-5.0.0/src/speechify/webhooks/__init__.py +34 -0
  120. speechify_api-5.0.0/src/speechify/webhooks/client.py +63 -0
  121. speechify_api-5.0.0/src/speechify/webhooks/endpoints/__init__.py +4 -0
  122. speechify_api-5.0.0/src/speechify/webhooks/endpoints/client.py +912 -0
  123. speechify_api-5.0.0/src/speechify/webhooks/endpoints/raw_client.py +1828 -0
  124. speechify_api-5.0.0/src/speechify/webhooks/raw_client.py +13 -0
  125. speechify_api-5.0.0/src/speechify/workspaces/__init__.py +4 -0
  126. speechify_api-5.0.0/src/speechify/workspaces/client.py +124 -0
  127. speechify_api-5.0.0/src/speechify/workspaces/raw_client.py +195 -0
  128. speechify_api-3.0.1/src/speechify/__init__.py +0 -167
  129. speechify_api-3.0.1/src/speechify/audio/client.py +0 -404
  130. speechify_api-3.0.1/src/speechify/audio/raw_client.py +0 -845
  131. speechify_api-3.0.1/src/speechify/audio/types/__init__.py +0 -42
  132. speechify_api-3.0.1/src/speechify/audio/types/get_speech_request_model.py +0 -7
  133. speechify_api-3.0.1/src/speechify/audio/types/get_stream_request_model.py +0 -7
  134. speechify_api-3.0.1/src/speechify/core/http_sse/_api.py +0 -170
  135. speechify_api-3.0.1/src/speechify/core/pagination.py +0 -82
  136. speechify_api-3.0.1/src/speechify/environment.py +0 -7
  137. speechify_api-3.0.1/src/speechify/types/__init__.py +0 -92
  138. speechify_api-3.0.1/src/speechify/types/error_code.py +0 -60
  139. speechify_api-3.0.1/src/speechify/voices/client.py +0 -551
  140. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/_default_clients.py +0 -0
  141. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/audio/types/get_speech_request_audio_format.py +0 -0
  142. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/audio/types/stream_audio_request_accept.py +0 -0
  143. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/core/__init__.py +0 -0
  144. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/core/api_error.py +0 -0
  145. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/core/datetime_utils.py +0 -0
  146. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/core/file.py +0 -0
  147. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/core/force_multipart.py +0 -0
  148. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/core/http_sse/__init__.py +0 -0
  149. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/core/http_sse/_exceptions.py +0 -0
  150. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/core/http_sse/_models.py +0 -0
  151. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/core/logging.py +0 -0
  152. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/core/parse_error.py +0 -0
  153. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/core/query_encoder.py +0 -0
  154. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/core/remove_none_from_dict.py +0 -0
  155. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/core/serialization.py +0 -0
  156. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/errors/bad_gateway_error.py +0 -0
  157. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/errors/bad_request_error.py +0 -0
  158. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/errors/conflict_error.py +0 -0
  159. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/errors/forbidden_error.py +0 -0
  160. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/errors/internal_server_error.py +0 -0
  161. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/errors/not_found_error.py +0 -0
  162. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/errors/payment_required_error.py +0 -0
  163. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/errors/service_unavailable_error.py +0 -0
  164. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/errors/too_many_requests_error.py +0 -0
  165. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/errors/unauthorized_error.py +0 -0
  166. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/errors/unprocessable_entity_error.py +0 -0
  167. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/py.typed +0 -0
  168. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/types/get_speech_options_request.py +0 -0
  169. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/types/get_speech_response_audio_format.py +0 -0
  170. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/types/get_stream_options_request.py +0 -0
  171. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/types/get_voice_gender.py +0 -0
  172. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/types/get_voice_language.py +0 -0
  173. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/types/get_voice_type.py +0 -0
  174. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/types/nested_chunk.py +0 -0
  175. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/types/pagination_meta.py +0 -0
  176. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/types/speech_marks.py +0 -0
  177. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/version.py +0 -0
  178. {speechify_api-3.0.1 → speechify_api-5.0.0}/src/speechify/voices/types/create_voices_request_gender.py +0 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Speechify <developers@speechify.ai> (https://speechify.ai)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,12 +1,14 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: speechify-api
3
- Version: 3.0.1
3
+ Version: 5.0.0
4
4
  Summary: Official Speechify API SDK
5
+ License: MIT
5
6
  Keywords: speechify,ai,api,sdk,text-to-speech,tts
6
7
  Author: Speechify
7
- Author-email: support@speechify.com
8
+ Author-email: developers@speechify.ai
8
9
  Requires-Python: >=3.10,<4.0
9
10
  Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: MIT License
10
12
  Classifier: Operating System :: MacOS
11
13
  Classifier: Operating System :: Microsoft :: Windows
12
14
  Classifier: Operating System :: OS Independent
@@ -25,18 +27,18 @@ Classifier: Typing :: Typed
25
27
  Provides-Extra: aiohttp
26
28
  Requires-Dist: aiohttp (>=3.14.1,<4) ; (python_version >= "3.10") and (extra == "aiohttp")
27
29
  Requires-Dist: httpx (>=0.21.2)
28
- Requires-Dist: httpx-aiohttp (==0.1.8) ; (python_version >= "3.10") and (extra == "aiohttp")
30
+ Requires-Dist: httpx-aiohttp (>=0.1.8,<0.2.0) ; (python_version >= "3.10") and (extra == "aiohttp")
29
31
  Requires-Dist: pydantic (>=1.9.2)
30
32
  Requires-Dist: pydantic-core (>=2.18.2,<3.0.0)
31
33
  Requires-Dist: typing_extensions (>=4.0.0)
32
34
  Project-URL: Documentation, https://docs.speechify.ai/api-reference
33
35
  Project-URL: Homepage, https://docs.speechify.ai
34
- Project-URL: Repository, https://github.com/speechifyinc/speechify-api-sdk-python
36
+ Project-URL: Repository, https://github.com/Speechify-AI/sdk-python
35
37
  Description-Content-Type: text/markdown
36
38
 
37
39
  # Speechify Python Library
38
40
 
39
- [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Fspeechifyinc%2Fspeechify-api-sdk-python)
41
+ [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2FSpeechify-AI%2Fsdk-python)
40
42
  [![pypi](https://img.shields.io/pypi/v/speechify-api)](https://pypi.python.org/pypi/speechify-api)
41
43
 
42
44
  The Speechify Python library provides convenient access to the Speechify APIs from Python.
@@ -50,6 +52,7 @@ The Speechify Python library provides convenient access to the Speechify APIs fr
50
52
  - [Environments](#environments)
51
53
  - [Async Client](#async-client)
52
54
  - [Exception Handling](#exception-handling)
55
+ - [Streaming](#streaming)
53
56
  - [Pagination](#pagination)
54
57
  - [Advanced](#advanced)
55
58
  - [Access Raw Response Data](#access-raw-response-data)
@@ -70,7 +73,7 @@ pip install speechify-api
70
73
 
71
74
  ## Reference
72
75
 
73
- A full reference for this library is available [here](https://github.com/speechifyinc/speechify-api-sdk-python/blob/HEAD/./reference.md).
76
+ A full reference for this library is available [here](https://github.com/Speechify-AI/sdk-python/blob/HEAD/./reference.md).
74
77
 
75
78
  ## Usage
76
79
 
@@ -86,8 +89,8 @@ client = Speechify(
86
89
  client.audio.speech(
87
90
  audio_format="mp3",
88
91
  input="Hello! This is the Speechify text-to-speech API.",
89
- model="simba-english",
90
- voice_id="george",
92
+ model="simba-3.5",
93
+ voice_id="geffen_32",
91
94
  )
92
95
  ```
93
96
 
@@ -122,8 +125,8 @@ async def main() -> None:
122
125
  await client.audio.speech(
123
126
  audio_format="mp3",
124
127
  input="Hello! This is the Speechify text-to-speech API.",
125
- model="simba-english",
126
- voice_id="george",
128
+ model="simba-3.5",
129
+ voice_id="geffen_32",
127
130
  )
128
131
 
129
132
 
@@ -145,6 +148,24 @@ except ApiError as e:
145
148
  print(e.body)
146
149
  ```
147
150
 
151
+ ## Streaming
152
+
153
+ The SDK supports streaming responses, as well, the response will be a generator that you can loop over.
154
+
155
+ ```python
156
+ from speechify import Speechify
157
+
158
+ client = Speechify(
159
+ token="<token>",
160
+ )
161
+
162
+ client.audio.stream_with_timestamps(
163
+ input="Streaming long-form audio with the Speechify API.",
164
+ model="simba-3.5",
165
+ voice_id="geffen_32",
166
+ )
167
+ ```
168
+
148
169
  ## Pagination
149
170
 
150
171
  Paginated requests will return a `SyncPager` or `AsyncPager`, which can be used as generators for the underlying object.
@@ -156,7 +177,11 @@ client = Speechify(
156
177
  token="<token>",
157
178
  )
158
179
 
159
- client.voices.list()
180
+ client.voices.list(
181
+ locale="en",
182
+ model="simba-3.2",
183
+ project_id="proj_01arz3ndektsv4rrffq69g5fav",
184
+ )
160
185
  ```
161
186
 
162
187
  ```python
@@ -226,7 +251,7 @@ client = Speechify(..., timeout=20.0)
226
251
 
227
252
  # Override timeout for a specific method
228
253
  client.audio.speech(..., request_options={
229
- "timeout_in_seconds": 1
254
+ "timeout": 1
230
255
  })
231
256
  ```
232
257
 
@@ -1,6 +1,6 @@
1
1
  # Speechify Python Library
2
2
 
3
- [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Fspeechifyinc%2Fspeechify-api-sdk-python)
3
+ [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2FSpeechify-AI%2Fsdk-python)
4
4
  [![pypi](https://img.shields.io/pypi/v/speechify-api)](https://pypi.python.org/pypi/speechify-api)
5
5
 
6
6
  The Speechify Python library provides convenient access to the Speechify APIs from Python.
@@ -14,6 +14,7 @@ The Speechify Python library provides convenient access to the Speechify APIs fr
14
14
  - [Environments](#environments)
15
15
  - [Async Client](#async-client)
16
16
  - [Exception Handling](#exception-handling)
17
+ - [Streaming](#streaming)
17
18
  - [Pagination](#pagination)
18
19
  - [Advanced](#advanced)
19
20
  - [Access Raw Response Data](#access-raw-response-data)
@@ -34,7 +35,7 @@ pip install speechify-api
34
35
 
35
36
  ## Reference
36
37
 
37
- A full reference for this library is available [here](https://github.com/speechifyinc/speechify-api-sdk-python/blob/HEAD/./reference.md).
38
+ A full reference for this library is available [here](https://github.com/Speechify-AI/sdk-python/blob/HEAD/./reference.md).
38
39
 
39
40
  ## Usage
40
41
 
@@ -50,8 +51,8 @@ client = Speechify(
50
51
  client.audio.speech(
51
52
  audio_format="mp3",
52
53
  input="Hello! This is the Speechify text-to-speech API.",
53
- model="simba-english",
54
- voice_id="george",
54
+ model="simba-3.5",
55
+ voice_id="geffen_32",
55
56
  )
56
57
  ```
57
58
 
@@ -86,8 +87,8 @@ async def main() -> None:
86
87
  await client.audio.speech(
87
88
  audio_format="mp3",
88
89
  input="Hello! This is the Speechify text-to-speech API.",
89
- model="simba-english",
90
- voice_id="george",
90
+ model="simba-3.5",
91
+ voice_id="geffen_32",
91
92
  )
92
93
 
93
94
 
@@ -109,6 +110,24 @@ except ApiError as e:
109
110
  print(e.body)
110
111
  ```
111
112
 
113
+ ## Streaming
114
+
115
+ The SDK supports streaming responses, as well, the response will be a generator that you can loop over.
116
+
117
+ ```python
118
+ from speechify import Speechify
119
+
120
+ client = Speechify(
121
+ token="<token>",
122
+ )
123
+
124
+ client.audio.stream_with_timestamps(
125
+ input="Streaming long-form audio with the Speechify API.",
126
+ model="simba-3.5",
127
+ voice_id="geffen_32",
128
+ )
129
+ ```
130
+
112
131
  ## Pagination
113
132
 
114
133
  Paginated requests will return a `SyncPager` or `AsyncPager`, which can be used as generators for the underlying object.
@@ -120,7 +139,11 @@ client = Speechify(
120
139
  token="<token>",
121
140
  )
122
141
 
123
- client.voices.list()
142
+ client.voices.list(
143
+ locale="en",
144
+ model="simba-3.2",
145
+ project_id="proj_01arz3ndektsv4rrffq69g5fav",
146
+ )
124
147
  ```
125
148
 
126
149
  ```python
@@ -190,7 +213,7 @@ client = Speechify(..., timeout=20.0)
190
213
 
191
214
  # Override timeout for a specific method
192
215
  client.audio.speech(..., request_options={
193
- "timeout_in_seconds": 1
216
+ "timeout": 1
194
217
  })
195
218
  ```
196
219
 
@@ -1,14 +1,16 @@
1
1
  [project]
2
2
  name = "speechify-api"
3
- version = "3.0.1"
3
+ dynamic = ["version"]
4
+ license = "MIT"
5
+ license-files = ["LICENSE"]
4
6
 
5
7
  [tool.poetry]
6
8
  name = "speechify-api"
7
- version = "3.0.1"
9
+ version = "5.0.0"
8
10
  description = "Official Speechify API SDK"
9
11
  readme = "README.md"
10
12
  authors = [
11
- "Speechify <support@speechify.com>"
13
+ "Speechify <developers@speechify.ai>"
12
14
  ]
13
15
  keywords = [
14
16
  "speechify",
@@ -18,7 +20,7 @@ keywords = [
18
20
  "text-to-speech",
19
21
  "tts"
20
22
  ]
21
-
23
+ license = "MIT"
22
24
  classifiers = [
23
25
  "Intended Audience :: Developers",
24
26
  "Programming Language :: Python",
@@ -44,13 +46,13 @@ packages = [
44
46
  [tool.poetry.urls]
45
47
  Documentation = 'https://docs.speechify.ai/api-reference'
46
48
  Homepage = 'https://docs.speechify.ai'
47
- Repository = 'https://github.com/speechifyinc/speechify-api-sdk-python'
49
+ Repository = 'https://github.com/Speechify-AI/sdk-python'
48
50
 
49
51
  [tool.poetry.dependencies]
50
52
  python = "^3.10"
51
53
  aiohttp = { version = ">=3.14.1,<4", optional = true, python = ">=3.10"}
52
54
  httpx = ">=0.21.2"
53
- httpx-aiohttp = { version = "0.1.8", optional = true, python = ">=3.10"}
55
+ httpx-aiohttp = { version = "^0.1.8", optional = true, python = ">=3.10"}
54
56
  pydantic = ">= 1.9.2"
55
57
  pydantic-core = ">=2.18.2,<3.0.0"
56
58
  typing_extensions = ">= 4.0.0"
@@ -0,0 +1,383 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ # isort: skip_file
4
+
5
+ import typing
6
+ from importlib import import_module
7
+
8
+ if typing.TYPE_CHECKING:
9
+ from .types import (
10
+ AudioOutputFormat,
11
+ AudioStreamOutputFormat,
12
+ BillingEntitlements,
13
+ BillingEntitlementsMaxLlmModelClass,
14
+ ConsentChallenge,
15
+ EntitlementsResponse,
16
+ Error,
17
+ ErrorCode,
18
+ ErrorDetail,
19
+ GetSpeechOptionsRequest,
20
+ GetSpeechResponse,
21
+ GetSpeechResponseAudioFormat,
22
+ GetStreamOptionsRequest,
23
+ GetStreamRequest,
24
+ GetStreamRequestModel,
25
+ GetVoice,
26
+ GetVoiceGender,
27
+ GetVoiceLanguage,
28
+ GetVoiceType,
29
+ GetVoicesModel,
30
+ GetVoicesModelName,
31
+ ListProjectsResponse,
32
+ ListVoicesResponse,
33
+ ListWebhookEndpointDeliveriesResponse,
34
+ ListWebhookEndpointsResponse,
35
+ Model,
36
+ ModelsResponse,
37
+ NestedChunk,
38
+ PaginationMeta,
39
+ Project,
40
+ ProjectAuditEvent,
41
+ ProjectAuditEventType,
42
+ ProjectAuditResponse,
43
+ ProjectMember,
44
+ ProjectMembersResponse,
45
+ ProjectMonthlyBudgetStatus,
46
+ ProjectRestore,
47
+ ProjectStillRevokedCounts,
48
+ Pronunciation,
49
+ PronunciationAlias,
50
+ PronunciationCaseSensitive,
51
+ PronunciationIpa,
52
+ PronunciationIpaText,
53
+ PronunciationText,
54
+ Pronunciations,
55
+ SafetyIdentifier,
56
+ SpeechChunkEvent,
57
+ SpeechDoneEvent,
58
+ SpeechErrorEvent,
59
+ SpeechMarks,
60
+ SpeechStreamEvent,
61
+ SpeechStreamEvent_SpeechChunk,
62
+ SpeechStreamEvent_SpeechDone,
63
+ SpeechStreamEvent_SpeechError,
64
+ WatermarkDetectionResponse,
65
+ WatermarkVerificationResponse,
66
+ WebhookDeliveryStatus,
67
+ WebhookEndpoint,
68
+ WebhookEndpointDelivery,
69
+ )
70
+ from .errors import (
71
+ BadGatewayError,
72
+ BadRequestError,
73
+ ConflictError,
74
+ ContentTooLargeError,
75
+ ForbiddenError,
76
+ InternalServerError,
77
+ NotFoundError,
78
+ PaymentRequiredError,
79
+ ServiceUnavailableError,
80
+ TooManyRequestsError,
81
+ UnauthorizedError,
82
+ UnprocessableEntityError,
83
+ )
84
+ from . import audio, models, projects, voices, webhooks, workspaces
85
+ from ._default_clients import DefaultAioHttpClient, DefaultAsyncHttpxClient
86
+ from .audio import (
87
+ AudioStreamInputModel,
88
+ AudioStreamInputOutputFormat,
89
+ AudioStreamInputSpeechMarks,
90
+ GetSpeechRequestAudioFormat,
91
+ GetSpeechRequestModel,
92
+ InputClose,
93
+ InputCloseType,
94
+ InputFlush,
95
+ InputFlushType,
96
+ InputText,
97
+ InputTextType,
98
+ SessionPronunciations,
99
+ SessionPronunciationsPronunciationsItem,
100
+ SessionPronunciationsPronunciationsItemAlias,
101
+ SessionPronunciationsPronunciationsItemIpa,
102
+ SessionPronunciationsType,
103
+ SpeechChunk,
104
+ SpeechChunkSpeechMarksItem,
105
+ SpeechChunkType,
106
+ SpeechDone,
107
+ SpeechDoneReason,
108
+ SpeechDoneType,
109
+ SpeechError,
110
+ SpeechErrorError,
111
+ SpeechErrorErrorCode,
112
+ SpeechErrorType,
113
+ SpeechFlushed,
114
+ SpeechFlushedType,
115
+ StreamAudioRequestAccept,
116
+ StreamWithTimestampsAudioRequestAccept,
117
+ )
118
+ from .client import AsyncSpeechify, Speechify
119
+ from .environment import SpeechifyEnvironment
120
+ from .projects import DeleteProjectRequestMode
121
+ from .version import __version__
122
+ from .voices import CreateVoicesRequestGender, ListVoicesRequestGender, ListVoicesRequestType
123
+ _dynamic_imports: typing.Dict[str, str] = {
124
+ "AsyncSpeechify": ".client",
125
+ "AudioOutputFormat": ".types",
126
+ "AudioStreamInputModel": ".audio",
127
+ "AudioStreamInputOutputFormat": ".audio",
128
+ "AudioStreamInputSpeechMarks": ".audio",
129
+ "AudioStreamOutputFormat": ".types",
130
+ "BadGatewayError": ".errors",
131
+ "BadRequestError": ".errors",
132
+ "BillingEntitlements": ".types",
133
+ "BillingEntitlementsMaxLlmModelClass": ".types",
134
+ "ConflictError": ".errors",
135
+ "ConsentChallenge": ".types",
136
+ "ContentTooLargeError": ".errors",
137
+ "CreateVoicesRequestGender": ".voices",
138
+ "DefaultAioHttpClient": "._default_clients",
139
+ "DefaultAsyncHttpxClient": "._default_clients",
140
+ "DeleteProjectRequestMode": ".projects",
141
+ "EntitlementsResponse": ".types",
142
+ "Error": ".types",
143
+ "ErrorCode": ".types",
144
+ "ErrorDetail": ".types",
145
+ "ForbiddenError": ".errors",
146
+ "GetSpeechOptionsRequest": ".types",
147
+ "GetSpeechRequestAudioFormat": ".audio",
148
+ "GetSpeechRequestModel": ".audio",
149
+ "GetSpeechResponse": ".types",
150
+ "GetSpeechResponseAudioFormat": ".types",
151
+ "GetStreamOptionsRequest": ".types",
152
+ "GetStreamRequest": ".types",
153
+ "GetStreamRequestModel": ".types",
154
+ "GetVoice": ".types",
155
+ "GetVoiceGender": ".types",
156
+ "GetVoiceLanguage": ".types",
157
+ "GetVoiceType": ".types",
158
+ "GetVoicesModel": ".types",
159
+ "GetVoicesModelName": ".types",
160
+ "InputClose": ".audio",
161
+ "InputCloseType": ".audio",
162
+ "InputFlush": ".audio",
163
+ "InputFlushType": ".audio",
164
+ "InputText": ".audio",
165
+ "InputTextType": ".audio",
166
+ "InternalServerError": ".errors",
167
+ "ListProjectsResponse": ".types",
168
+ "ListVoicesRequestGender": ".voices",
169
+ "ListVoicesRequestType": ".voices",
170
+ "ListVoicesResponse": ".types",
171
+ "ListWebhookEndpointDeliveriesResponse": ".types",
172
+ "ListWebhookEndpointsResponse": ".types",
173
+ "Model": ".types",
174
+ "ModelsResponse": ".types",
175
+ "NestedChunk": ".types",
176
+ "NotFoundError": ".errors",
177
+ "PaginationMeta": ".types",
178
+ "PaymentRequiredError": ".errors",
179
+ "Project": ".types",
180
+ "ProjectAuditEvent": ".types",
181
+ "ProjectAuditEventType": ".types",
182
+ "ProjectAuditResponse": ".types",
183
+ "ProjectMember": ".types",
184
+ "ProjectMembersResponse": ".types",
185
+ "ProjectMonthlyBudgetStatus": ".types",
186
+ "ProjectRestore": ".types",
187
+ "ProjectStillRevokedCounts": ".types",
188
+ "Pronunciation": ".types",
189
+ "PronunciationAlias": ".types",
190
+ "PronunciationCaseSensitive": ".types",
191
+ "PronunciationIpa": ".types",
192
+ "PronunciationIpaText": ".types",
193
+ "PronunciationText": ".types",
194
+ "Pronunciations": ".types",
195
+ "SafetyIdentifier": ".types",
196
+ "ServiceUnavailableError": ".errors",
197
+ "SessionPronunciations": ".audio",
198
+ "SessionPronunciationsPronunciationsItem": ".audio",
199
+ "SessionPronunciationsPronunciationsItemAlias": ".audio",
200
+ "SessionPronunciationsPronunciationsItemIpa": ".audio",
201
+ "SessionPronunciationsType": ".audio",
202
+ "SpeechChunk": ".audio",
203
+ "SpeechChunkEvent": ".types",
204
+ "SpeechChunkSpeechMarksItem": ".audio",
205
+ "SpeechChunkType": ".audio",
206
+ "SpeechDone": ".audio",
207
+ "SpeechDoneEvent": ".types",
208
+ "SpeechDoneReason": ".audio",
209
+ "SpeechDoneType": ".audio",
210
+ "SpeechError": ".audio",
211
+ "SpeechErrorError": ".audio",
212
+ "SpeechErrorErrorCode": ".audio",
213
+ "SpeechErrorEvent": ".types",
214
+ "SpeechErrorType": ".audio",
215
+ "SpeechFlushed": ".audio",
216
+ "SpeechFlushedType": ".audio",
217
+ "SpeechMarks": ".types",
218
+ "SpeechStreamEvent": ".types",
219
+ "SpeechStreamEvent_SpeechChunk": ".types",
220
+ "SpeechStreamEvent_SpeechDone": ".types",
221
+ "SpeechStreamEvent_SpeechError": ".types",
222
+ "Speechify": ".client",
223
+ "SpeechifyEnvironment": ".environment",
224
+ "StreamAudioRequestAccept": ".audio",
225
+ "StreamWithTimestampsAudioRequestAccept": ".audio",
226
+ "TooManyRequestsError": ".errors",
227
+ "UnauthorizedError": ".errors",
228
+ "UnprocessableEntityError": ".errors",
229
+ "WatermarkDetectionResponse": ".types",
230
+ "WatermarkVerificationResponse": ".types",
231
+ "WebhookDeliveryStatus": ".types",
232
+ "WebhookEndpoint": ".types",
233
+ "WebhookEndpointDelivery": ".types",
234
+ "__version__": ".version",
235
+ "audio": ".audio",
236
+ "models": ".models",
237
+ "projects": ".projects",
238
+ "voices": ".voices",
239
+ "webhooks": ".webhooks",
240
+ "workspaces": ".workspaces",
241
+ }
242
+
243
+
244
+ def __getattr__(attr_name: str) -> typing.Any:
245
+ module_name = _dynamic_imports.get(attr_name)
246
+ if module_name is None:
247
+ raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
248
+ try:
249
+ module = import_module(module_name, __package__)
250
+ if module_name == f".{attr_name}":
251
+ return module
252
+ else:
253
+ return getattr(module, attr_name)
254
+ except ImportError as e:
255
+ raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
256
+ except AttributeError as e:
257
+ raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
258
+
259
+
260
+ def __dir__():
261
+ lazy_attrs = list(_dynamic_imports.keys())
262
+ return sorted(lazy_attrs)
263
+
264
+
265
+ __all__ = [
266
+ "AsyncSpeechify",
267
+ "AudioOutputFormat",
268
+ "AudioStreamInputModel",
269
+ "AudioStreamInputOutputFormat",
270
+ "AudioStreamInputSpeechMarks",
271
+ "AudioStreamOutputFormat",
272
+ "BadGatewayError",
273
+ "BadRequestError",
274
+ "BillingEntitlements",
275
+ "BillingEntitlementsMaxLlmModelClass",
276
+ "ConflictError",
277
+ "ConsentChallenge",
278
+ "ContentTooLargeError",
279
+ "CreateVoicesRequestGender",
280
+ "DefaultAioHttpClient",
281
+ "DefaultAsyncHttpxClient",
282
+ "DeleteProjectRequestMode",
283
+ "EntitlementsResponse",
284
+ "Error",
285
+ "ErrorCode",
286
+ "ErrorDetail",
287
+ "ForbiddenError",
288
+ "GetSpeechOptionsRequest",
289
+ "GetSpeechRequestAudioFormat",
290
+ "GetSpeechRequestModel",
291
+ "GetSpeechResponse",
292
+ "GetSpeechResponseAudioFormat",
293
+ "GetStreamOptionsRequest",
294
+ "GetStreamRequest",
295
+ "GetStreamRequestModel",
296
+ "GetVoice",
297
+ "GetVoiceGender",
298
+ "GetVoiceLanguage",
299
+ "GetVoiceType",
300
+ "GetVoicesModel",
301
+ "GetVoicesModelName",
302
+ "InputClose",
303
+ "InputCloseType",
304
+ "InputFlush",
305
+ "InputFlushType",
306
+ "InputText",
307
+ "InputTextType",
308
+ "InternalServerError",
309
+ "ListProjectsResponse",
310
+ "ListVoicesRequestGender",
311
+ "ListVoicesRequestType",
312
+ "ListVoicesResponse",
313
+ "ListWebhookEndpointDeliveriesResponse",
314
+ "ListWebhookEndpointsResponse",
315
+ "Model",
316
+ "ModelsResponse",
317
+ "NestedChunk",
318
+ "NotFoundError",
319
+ "PaginationMeta",
320
+ "PaymentRequiredError",
321
+ "Project",
322
+ "ProjectAuditEvent",
323
+ "ProjectAuditEventType",
324
+ "ProjectAuditResponse",
325
+ "ProjectMember",
326
+ "ProjectMembersResponse",
327
+ "ProjectMonthlyBudgetStatus",
328
+ "ProjectRestore",
329
+ "ProjectStillRevokedCounts",
330
+ "Pronunciation",
331
+ "PronunciationAlias",
332
+ "PronunciationCaseSensitive",
333
+ "PronunciationIpa",
334
+ "PronunciationIpaText",
335
+ "PronunciationText",
336
+ "Pronunciations",
337
+ "SafetyIdentifier",
338
+ "ServiceUnavailableError",
339
+ "SessionPronunciations",
340
+ "SessionPronunciationsPronunciationsItem",
341
+ "SessionPronunciationsPronunciationsItemAlias",
342
+ "SessionPronunciationsPronunciationsItemIpa",
343
+ "SessionPronunciationsType",
344
+ "SpeechChunk",
345
+ "SpeechChunkEvent",
346
+ "SpeechChunkSpeechMarksItem",
347
+ "SpeechChunkType",
348
+ "SpeechDone",
349
+ "SpeechDoneEvent",
350
+ "SpeechDoneReason",
351
+ "SpeechDoneType",
352
+ "SpeechError",
353
+ "SpeechErrorError",
354
+ "SpeechErrorErrorCode",
355
+ "SpeechErrorEvent",
356
+ "SpeechErrorType",
357
+ "SpeechFlushed",
358
+ "SpeechFlushedType",
359
+ "SpeechMarks",
360
+ "SpeechStreamEvent",
361
+ "SpeechStreamEvent_SpeechChunk",
362
+ "SpeechStreamEvent_SpeechDone",
363
+ "SpeechStreamEvent_SpeechError",
364
+ "Speechify",
365
+ "SpeechifyEnvironment",
366
+ "StreamAudioRequestAccept",
367
+ "StreamWithTimestampsAudioRequestAccept",
368
+ "TooManyRequestsError",
369
+ "UnauthorizedError",
370
+ "UnprocessableEntityError",
371
+ "WatermarkDetectionResponse",
372
+ "WatermarkVerificationResponse",
373
+ "WebhookDeliveryStatus",
374
+ "WebhookEndpoint",
375
+ "WebhookEndpointDelivery",
376
+ "__version__",
377
+ "audio",
378
+ "models",
379
+ "projects",
380
+ "voices",
381
+ "webhooks",
382
+ "workspaces",
383
+ ]