Skip to content

Commit 02b6449

Browse files
feat!: regenerate SDK on fern-python-sdk@5.14.20 (TTS surface) (#18)
Automated SDK regeneration via `fern generate --group python` from the `speechify-api` OpenAPI spec. - Generator: `fernapi/fern-python-sdk@5.14.20` - Public surface: `[build-public]` audience (TTS: audio + voices) - Branch regenerated on top of current `master` (clean single-commit diff) - CI green: compile + test BREAKING CHANGE: removed voice types `CreatedVoice`, `CreateVoiceModel`, `CreateVoiceLanguage`, `CreateVoiceModelName`, `CreatedVoiceGender`, `CreatedVoiceType`; `GetSpeechResponse.audio_format` redocumented as the audio codec. Additive: new `ErrorCode` values, `output_format` field, `PaginationMeta` / `ListVoicesResponse`, `ConflictError`. Generated from `SpeechifyInc/speechify-api` `fern/generators.yml`. Co-authored-by: fern-api[bot] <115122769+fern-api[bot]@users.noreply.github.com>
1 parent 307b80b commit 02b6449

36 files changed

Lines changed: 1300 additions & 347 deletions

.fern/metadata.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"cliVersion": "5.50.3",
2+
"cliVersion": "5.64.0",
33
"generatorName": "fernapi/fern-python-sdk",
44
"generatorVersion": "5.14.20",
55
"generatorConfig": {
@@ -9,8 +9,9 @@
99
},
1010
"pyproject_python_version": ">=3.9"
1111
},
12-
"originGitCommit": "13f26db544c7ebda83d5d229fb387a34c8410ee0",
12+
"originGitCommit": "9f50f669dbb3d0db633a6d904db8a5077b94764f",
1313
"originGitCommitIsDirty": true,
14-
"invokedBy": "manual",
15-
"sdkVersion": "1.2.4"
14+
"invokedBy": "ci",
15+
"ciProvider": "unknown",
16+
"sdkVersion": "2.0.1"
1617
}

README.md

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# Speechifyinc Python Library
1+
# Speechify Python Library
22

33
[![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)
44
[![pypi](https://img.shields.io/pypi/v/speechify-api)](https://pypi.python.org/pypi/speechify-api)
55

6-
The Speechifyinc Python library provides convenient access to the Speechifyinc APIs from Python.
6+
The Speechify Python library provides convenient access to the Speechify APIs from Python.
77

88
## Table of Contents
99

@@ -14,6 +14,7 @@ The Speechifyinc Python library provides convenient access to the Speechifyinc A
1414
- [Environments](#environments)
1515
- [Async Client](#async-client)
1616
- [Exception Handling](#exception-handling)
17+
- [Pagination](#pagination)
1718
- [Advanced](#advanced)
1819
- [Access Raw Response Data](#access-raw-response-data)
1920
- [Retries](#retries)
@@ -43,7 +44,7 @@ Instantiate and use the client with the following:
4344
from speechify import Speechify
4445

4546
client = Speechify(
46-
api_key="<token>",
47+
token="<token>",
4748
)
4849

4950
client.audio.speech(
@@ -77,7 +78,7 @@ import asyncio
7778
from speechify import AsyncSpeechify
7879

7980
client = AsyncSpeechify(
80-
api_key="<token>",
81+
token="<token>",
8182
)
8283

8384

@@ -108,6 +109,29 @@ except ApiError as e:
108109
print(e.body)
109110
```
110111

112+
## Pagination
113+
114+
Paginated requests will return a `SyncPager` or `AsyncPager`, which can be used as generators for the underlying object.
115+
116+
```python
117+
from speechify import Speechify
118+
119+
client = Speechify(
120+
token="<token>",
121+
)
122+
123+
client.voices.list()
124+
```
125+
126+
```python
127+
# You can also iterate through pages and access the typed response per page
128+
pager = client.voices.list(...)
129+
for page in pager.iter_pages():
130+
print(page.response) # access the typed response for each page
131+
for item in page:
132+
print(item)
133+
```
134+
111135
## Advanced
112136

113137
### Access Raw Response Data

poetry.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ dynamic = ["version"]
44

55
[tool.poetry]
66
name = "speechify-api"
7-
version = "2.0.0"
7+
version = "2.0.1"
88
description = "Official Speechify API SDK"
99
readme = "README.md"
1010
authors = [

0 commit comments

Comments
 (0)