spitch 1.4.0__py3-none-any.whl → 1.5.0__py3-none-any.whl
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.
spitch/_version.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: spitch
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.5.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
|
|
@@ -66,8 +66,9 @@ client = Spitch(
|
|
|
66
66
|
api_key=os.environ.get("SPITCH_API_KEY"),
|
|
67
67
|
)
|
|
68
68
|
|
|
69
|
-
response = client.speech.
|
|
69
|
+
response = client.speech.generate(
|
|
70
70
|
language="yo",
|
|
71
|
+
text="text",
|
|
71
72
|
)
|
|
72
73
|
```
|
|
73
74
|
|
|
@@ -92,8 +93,9 @@ client = AsyncSpitch(
|
|
|
92
93
|
|
|
93
94
|
|
|
94
95
|
async def main() -> None:
|
|
95
|
-
response = await client.speech.
|
|
96
|
+
response = await client.speech.generate(
|
|
96
97
|
language="yo",
|
|
98
|
+
text="text",
|
|
97
99
|
)
|
|
98
100
|
|
|
99
101
|
|
|
@@ -127,8 +129,9 @@ from spitch import Spitch
|
|
|
127
129
|
client = Spitch()
|
|
128
130
|
|
|
129
131
|
try:
|
|
130
|
-
client.speech.
|
|
132
|
+
client.speech.generate(
|
|
131
133
|
language="yo",
|
|
134
|
+
text="text",
|
|
132
135
|
)
|
|
133
136
|
except spitch.APIConnectionError as e:
|
|
134
137
|
print("The server could not be reached")
|
|
@@ -172,8 +175,9 @@ client = Spitch(
|
|
|
172
175
|
)
|
|
173
176
|
|
|
174
177
|
# Or, configure per-request:
|
|
175
|
-
client.with_options(max_retries=5).speech.
|
|
178
|
+
client.with_options(max_retries=5).speech.generate(
|
|
176
179
|
language="yo",
|
|
180
|
+
text="text",
|
|
177
181
|
)
|
|
178
182
|
```
|
|
179
183
|
|
|
@@ -197,8 +201,9 @@ client = Spitch(
|
|
|
197
201
|
)
|
|
198
202
|
|
|
199
203
|
# Override per-request:
|
|
200
|
-
client.with_options(timeout=5.0).speech.
|
|
204
|
+
client.with_options(timeout=5.0).speech.generate(
|
|
201
205
|
language="yo",
|
|
206
|
+
text="text",
|
|
202
207
|
)
|
|
203
208
|
```
|
|
204
209
|
|
|
@@ -238,12 +243,13 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to
|
|
|
238
243
|
from spitch import Spitch
|
|
239
244
|
|
|
240
245
|
client = Spitch()
|
|
241
|
-
response = client.speech.with_raw_response.
|
|
246
|
+
response = client.speech.with_raw_response.generate(
|
|
242
247
|
language="yo",
|
|
248
|
+
text="text",
|
|
243
249
|
)
|
|
244
250
|
print(response.headers.get('X-My-Header'))
|
|
245
251
|
|
|
246
|
-
speech = response.parse() # get the object that `speech.
|
|
252
|
+
speech = response.parse() # get the object that `speech.generate()` would have returned
|
|
247
253
|
print(speech)
|
|
248
254
|
```
|
|
249
255
|
|
|
@@ -258,8 +264,9 @@ The above interface eagerly reads the full response body when you make the reque
|
|
|
258
264
|
To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.
|
|
259
265
|
|
|
260
266
|
```python
|
|
261
|
-
with client.speech.with_streaming_response.
|
|
267
|
+
with client.speech.with_streaming_response.generate(
|
|
262
268
|
language="yo",
|
|
269
|
+
text="text",
|
|
263
270
|
) as response:
|
|
264
271
|
print(response.headers.get("X-My-Header"))
|
|
265
272
|
|
|
@@ -11,7 +11,7 @@ spitch/_resource.py,sha256=TLFPcOOmtxZOQLh3XCNPB_BdrQpp0MIYoKoH52aRAu8,1100
|
|
|
11
11
|
spitch/_response.py,sha256=aN6swtguiZ7CC_hWFrwoUa53FgSbjRfZXxYHvfDNGeo,28609
|
|
12
12
|
spitch/_streaming.py,sha256=5SpId2EIfF8Ee8UUYmJxqgHUGP1ZdHCUHhHCdNJREFA,10100
|
|
13
13
|
spitch/_types.py,sha256=dsJyGWdBXaYJaRBqn2V3iRsfpWw71rFaSxdSM8sPQYY,6103
|
|
14
|
-
spitch/_version.py,sha256=
|
|
14
|
+
spitch/_version.py,sha256=UhWuVIHyisnkvhD1Rhnd0BfNX7mhovssT4wjb8pFMBM,158
|
|
15
15
|
spitch/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
spitch/_utils/__init__.py,sha256=Uzq1-FIih_VUjzdNVWXks0sdC39KBKLMrZoz-_JOjJ4,1988
|
|
17
17
|
spitch/_utils/_logs.py,sha256=ApRyYK_WgZfEr_ygBUBXWMlTgeMr2tdNOGlH8jE4oJc,774
|
|
@@ -30,7 +30,7 @@ spitch/types/__init__.py,sha256=4aa9CgcCmGRqZb4k9F3005Q4Ok-zjiiqw5k3BXIQ3MY,364
|
|
|
30
30
|
spitch/types/speech_generate_params.py,sha256=xJPVX2uBsrLBMX4gQF9ydHG2PcIgau5PbBTO1eFccZk,407
|
|
31
31
|
spitch/types/speech_transcibe_params.py,sha256=WvwBsSctqJDXOFJNYyjfijwCnAdJCPkJobESfmLy3aI,448
|
|
32
32
|
spitch/types/text_tone_mark_params.py,sha256=63P5VElxanYkDP1ZLEuQt97JSgVpMCaAo4WRWLDvhlY,349
|
|
33
|
-
spitch-1.
|
|
34
|
-
spitch-1.
|
|
35
|
-
spitch-1.
|
|
36
|
-
spitch-1.
|
|
33
|
+
spitch-1.5.0.dist-info/METADATA,sha256=KqwkbhgZgI49d50F-Mq4wzml_cBBKsqPw0uzNhRIePE,12511
|
|
34
|
+
spitch-1.5.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
35
|
+
spitch-1.5.0.dist-info/licenses/LICENSE,sha256=529F8Amq5MfoIm33JY544oweKES9vw9_xS1CNx-ztPI,11336
|
|
36
|
+
spitch-1.5.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|