spitch 1.31.0__tar.gz → 1.33.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.

Potentially problematic release.


This version of spitch might be problematic. Click here for more details.

Files changed (76) hide show
  1. spitch-1.33.0/.release-please-manifest.json +3 -0
  2. {spitch-1.31.0 → spitch-1.33.0}/CHANGELOG.md +16 -0
  3. {spitch-1.31.0 → spitch-1.33.0}/PKG-INFO +10 -7
  4. {spitch-1.31.0 → spitch-1.33.0}/README.md +9 -6
  5. {spitch-1.31.0 → spitch-1.33.0}/pyproject.toml +1 -1
  6. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/_version.py +1 -1
  7. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/resources/speech.py +36 -24
  8. spitch-1.31.0/.release-please-manifest.json +0 -3
  9. {spitch-1.31.0 → spitch-1.33.0}/.gitignore +0 -0
  10. {spitch-1.31.0 → spitch-1.33.0}/CONTRIBUTING.md +0 -0
  11. {spitch-1.31.0 → spitch-1.33.0}/LICENSE +0 -0
  12. {spitch-1.31.0 → spitch-1.33.0}/SECURITY.md +0 -0
  13. {spitch-1.31.0 → spitch-1.33.0}/api.md +0 -0
  14. {spitch-1.31.0 → spitch-1.33.0}/bin/check-release-environment +0 -0
  15. {spitch-1.31.0 → spitch-1.33.0}/bin/publish-pypi +0 -0
  16. {spitch-1.31.0 → spitch-1.33.0}/examples/.keep +0 -0
  17. {spitch-1.31.0 → spitch-1.33.0}/examples/example.py +0 -0
  18. {spitch-1.31.0 → spitch-1.33.0}/mypy.ini +0 -0
  19. {spitch-1.31.0 → spitch-1.33.0}/noxfile.py +0 -0
  20. {spitch-1.31.0 → spitch-1.33.0}/release-please-config.json +0 -0
  21. {spitch-1.31.0 → spitch-1.33.0}/requirements-dev.lock +0 -0
  22. {spitch-1.31.0 → spitch-1.33.0}/requirements.lock +0 -0
  23. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/__init__.py +0 -0
  24. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/_base_client.py +0 -0
  25. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/_client.py +0 -0
  26. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/_compat.py +0 -0
  27. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/_constants.py +0 -0
  28. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/_exceptions.py +0 -0
  29. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/_files.py +0 -0
  30. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/_models.py +0 -0
  31. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/_qs.py +0 -0
  32. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/_resource.py +0 -0
  33. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/_response.py +0 -0
  34. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/_streaming.py +0 -0
  35. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/_types.py +0 -0
  36. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/_utils/__init__.py +0 -0
  37. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/_utils/_logs.py +0 -0
  38. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/_utils/_proxy.py +0 -0
  39. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/_utils/_reflection.py +0 -0
  40. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/_utils/_resources_proxy.py +0 -0
  41. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/_utils/_streams.py +0 -0
  42. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/_utils/_sync.py +0 -0
  43. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/_utils/_transform.py +0 -0
  44. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/_utils/_typing.py +0 -0
  45. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/_utils/_utils.py +0 -0
  46. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/lib/.keep +0 -0
  47. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/py.typed +0 -0
  48. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/resources/__init__.py +0 -0
  49. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/resources/text.py +0 -0
  50. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/types/__init__.py +0 -0
  51. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/types/speech_generate_params.py +0 -0
  52. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/types/speech_transcribe_params.py +0 -0
  53. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/types/speech_transcribe_response.py +0 -0
  54. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/types/text_tone_mark_params.py +0 -0
  55. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/types/text_tone_mark_response.py +0 -0
  56. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/types/text_translate_params.py +0 -0
  57. {spitch-1.31.0 → spitch-1.33.0}/src/spitch/types/text_translate_response.py +0 -0
  58. {spitch-1.31.0 → spitch-1.33.0}/tests/__init__.py +0 -0
  59. {spitch-1.31.0 → spitch-1.33.0}/tests/api_resources/__init__.py +0 -0
  60. {spitch-1.31.0 → spitch-1.33.0}/tests/api_resources/test_speech.py +0 -0
  61. {spitch-1.31.0 → spitch-1.33.0}/tests/api_resources/test_text.py +0 -0
  62. {spitch-1.31.0 → spitch-1.33.0}/tests/conftest.py +0 -0
  63. {spitch-1.31.0 → spitch-1.33.0}/tests/sample_file.txt +0 -0
  64. {spitch-1.31.0 → spitch-1.33.0}/tests/test_client.py +0 -0
  65. {spitch-1.31.0 → spitch-1.33.0}/tests/test_deepcopy.py +0 -0
  66. {spitch-1.31.0 → spitch-1.33.0}/tests/test_extract_files.py +0 -0
  67. {spitch-1.31.0 → spitch-1.33.0}/tests/test_files.py +0 -0
  68. {spitch-1.31.0 → spitch-1.33.0}/tests/test_models.py +0 -0
  69. {spitch-1.31.0 → spitch-1.33.0}/tests/test_qs.py +0 -0
  70. {spitch-1.31.0 → spitch-1.33.0}/tests/test_required_args.py +0 -0
  71. {spitch-1.31.0 → spitch-1.33.0}/tests/test_response.py +0 -0
  72. {spitch-1.31.0 → spitch-1.33.0}/tests/test_streaming.py +0 -0
  73. {spitch-1.31.0 → spitch-1.33.0}/tests/test_transform.py +0 -0
  74. {spitch-1.31.0 → spitch-1.33.0}/tests/test_utils/test_proxy.py +0 -0
  75. {spitch-1.31.0 → spitch-1.33.0}/tests/test_utils/test_typing.py +0 -0
  76. {spitch-1.31.0 → spitch-1.33.0}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "1.33.0"
3
+ }
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.33.0 (2025-08-02)
4
+
5
+ Full Changelog: [v1.32.0...v1.33.0](https://github.com/spi-tch/spitch-python/compare/v1.32.0...v1.33.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** update via SDK Studio ([9d14152](https://github.com/spi-tch/spitch-python/commit/9d14152165cda3b68febf16ccd6d7c662420db76))
10
+
11
+ ## 1.32.0 (2025-08-02)
12
+
13
+ Full Changelog: [v1.31.0...v1.32.0](https://github.com/spi-tch/spitch-python/compare/v1.31.0...v1.32.0)
14
+
15
+ ### Features
16
+
17
+ * **api:** update via SDK Studio ([49e48bf](https://github.com/spi-tch/spitch-python/commit/49e48bf33fc79945d5828b3524ecaa49a0186d6e))
18
+
3
19
  ## 1.31.0 (2025-08-02)
4
20
 
5
21
  Full Changelog: [v1.30.0...v1.31.0](https://github.com/spi-tch/spitch-python/compare/v1.30.0...v1.31.0)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: spitch
3
- Version: 1.31.0
3
+ Version: 1.33.0
4
4
  Summary: The official Python library for the spitch API
5
5
  Project-URL: Homepage, https://github.com/spi-tch/spitch-python
6
6
  Project-URL: Repository, https://github.com/spi-tch/spitch-python
@@ -65,10 +65,11 @@ from spitch import Spitch
65
65
 
66
66
  client = Spitch()
67
67
 
68
- response = client.speech.transcribe(
68
+ response = client.speech.generate(
69
69
  language="yo",
70
+ text="text",
71
+ voice="sade",
70
72
  )
71
- print(response.request_id)
72
73
  ```
73
74
 
74
75
  While you can provide an `api_key` keyword argument,
@@ -88,10 +89,11 @@ client = AsyncSpitch()
88
89
 
89
90
 
90
91
  async def main() -> None:
91
- response = await client.speech.transcribe(
92
+ response = await client.speech.generate(
92
93
  language="yo",
94
+ text="text",
95
+ voice="sade",
93
96
  )
94
- print(response.request_id)
95
97
 
96
98
 
97
99
  asyncio.run(main())
@@ -122,10 +124,11 @@ async def main() -> None:
122
124
  async with AsyncSpitch(
123
125
  http_client=DefaultAioHttpClient(),
124
126
  ) as client:
125
- response = await client.speech.transcribe(
127
+ response = await client.speech.generate(
126
128
  language="yo",
129
+ text="text",
130
+ voice="sade",
127
131
  )
128
- print(response.request_id)
129
132
 
130
133
 
131
134
  asyncio.run(main())
@@ -29,10 +29,11 @@ from spitch import Spitch
29
29
 
30
30
  client = Spitch()
31
31
 
32
- response = client.speech.transcribe(
32
+ response = client.speech.generate(
33
33
  language="yo",
34
+ text="text",
35
+ voice="sade",
34
36
  )
35
- print(response.request_id)
36
37
  ```
37
38
 
38
39
  While you can provide an `api_key` keyword argument,
@@ -52,10 +53,11 @@ client = AsyncSpitch()
52
53
 
53
54
 
54
55
  async def main() -> None:
55
- response = await client.speech.transcribe(
56
+ response = await client.speech.generate(
56
57
  language="yo",
58
+ text="text",
59
+ voice="sade",
57
60
  )
58
- print(response.request_id)
59
61
 
60
62
 
61
63
  asyncio.run(main())
@@ -86,10 +88,11 @@ async def main() -> None:
86
88
  async with AsyncSpitch(
87
89
  http_client=DefaultAioHttpClient(),
88
90
  ) as client:
89
- response = await client.speech.transcribe(
91
+ response = await client.speech.generate(
90
92
  language="yo",
93
+ text="text",
94
+ voice="sade",
91
95
  )
92
- print(response.request_id)
93
96
 
94
97
 
95
98
  asyncio.run(main())
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "spitch"
3
- version = "1.31.0"
3
+ version = "1.33.0"
4
4
  description = "The official Python library for the spitch API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "spitch"
4
- __version__ = "1.31.0" # x-release-please-version
4
+ __version__ = "1.33.0" # x-release-please-version
@@ -2,14 +2,14 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Optional
5
+ from typing import Mapping, Optional, cast
6
6
  from typing_extensions import Literal
7
7
 
8
8
  import httpx
9
9
 
10
10
  from ..types import speech_generate_params, speech_transcribe_params
11
11
  from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes
12
- from .._utils import maybe_transform, async_maybe_transform
12
+ from .._utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform
13
13
  from .._compat import cached_property
14
14
  from .._resource import SyncAPIResource, AsyncAPIResource
15
15
  from .._response import (
@@ -147,19 +147,25 @@ class SpeechResource(SyncAPIResource):
147
147
 
148
148
  timeout: Override the client-level default timeout for this request, in seconds
149
149
  """
150
+ body = deepcopy_minimal(
151
+ {
152
+ "language": language,
153
+ "content": content,
154
+ "model": model,
155
+ "special_words": special_words,
156
+ "timestamp": timestamp,
157
+ "url": url,
158
+ }
159
+ )
160
+ files = extract_files(cast(Mapping[str, object], body), paths=[["content"]])
161
+ # It should be noted that the actual Content-Type header that will be
162
+ # sent to the server will contain a `boundary` parameter, e.g.
163
+ # multipart/form-data; boundary=---abc--
164
+ extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
150
165
  return self._post(
151
166
  "/v1/transcriptions",
152
- body=maybe_transform(
153
- {
154
- "language": language,
155
- "content": content,
156
- "model": model,
157
- "special_words": special_words,
158
- "timestamp": timestamp,
159
- "url": url,
160
- },
161
- speech_transcribe_params.SpeechTranscribeParams,
162
- ),
167
+ body=maybe_transform(body, speech_transcribe_params.SpeechTranscribeParams),
168
+ files=files,
163
169
  options=make_request_options(
164
170
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
165
171
  ),
@@ -282,19 +288,25 @@ class AsyncSpeechResource(AsyncAPIResource):
282
288
 
283
289
  timeout: Override the client-level default timeout for this request, in seconds
284
290
  """
291
+ body = deepcopy_minimal(
292
+ {
293
+ "language": language,
294
+ "content": content,
295
+ "model": model,
296
+ "special_words": special_words,
297
+ "timestamp": timestamp,
298
+ "url": url,
299
+ }
300
+ )
301
+ files = extract_files(cast(Mapping[str, object], body), paths=[["content"]])
302
+ # It should be noted that the actual Content-Type header that will be
303
+ # sent to the server will contain a `boundary` parameter, e.g.
304
+ # multipart/form-data; boundary=---abc--
305
+ extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
285
306
  return await self._post(
286
307
  "/v1/transcriptions",
287
- body=await async_maybe_transform(
288
- {
289
- "language": language,
290
- "content": content,
291
- "model": model,
292
- "special_words": special_words,
293
- "timestamp": timestamp,
294
- "url": url,
295
- },
296
- speech_transcribe_params.SpeechTranscribeParams,
297
- ),
308
+ body=await async_maybe_transform(body, speech_transcribe_params.SpeechTranscribeParams),
309
+ files=files,
298
310
  options=make_request_options(
299
311
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
300
312
  ),
@@ -1,3 +0,0 @@
1
- {
2
- ".": "1.31.0"
3
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes