Skip to content

Commit 0710d29

Browse files
(feat): generate with latest endpoints
1 parent 5f4e2da commit 0710d29

File tree

21 files changed

+542
-429
lines changed

21 files changed

+542
-429
lines changed

poetry.lock

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

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "elevenlabs"
3-
version = "v1.1.2"
3+
version = "v1.2.0"
44
description = ""
55
readme = "README.md"
66
authors = []
@@ -18,7 +18,7 @@ typing_extensions = ">= 4.0.0"
1818
websockets = ">=11.0"
1919

2020
[tool.poetry.dev-dependencies]
21-
mypy = "^1.8.0"
21+
mypy = "1.9.0"
2222
pytest = "^7.4.0"
2323
pytest-asyncio = "^0.23.5"
2424
python-dateutil = "^2.9.0"

src/elevenlabs/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@
9999
from .environment import ElevenLabsEnvironment
100100
from .play import play, save, stream
101101
from .pronunciation_dictionary import (
102-
BodyAddRulesToThePronunciationDictionaryV1PronunciationDictionariesPronunciationDictionaryIdAddRulesPostRulesItem,
103-
BodyAddRulesToThePronunciationDictionaryV1PronunciationDictionariesPronunciationDictionaryIdAddRulesPostRulesItem_Alias,
104-
BodyAddRulesToThePronunciationDictionaryV1PronunciationDictionariesPronunciationDictionaryIdAddRulesPostRulesItem_Phoneme,
102+
PronunciationDictionaryRule,
103+
PronunciationDictionaryRule_Alias,
104+
PronunciationDictionaryRule_Phoneme,
105105
)
106106
from .version import __version__
107107

@@ -115,9 +115,6 @@
115115
"AudioNativeCreateProjectResponseModel",
116116
"AudioNativeGetEmbedCodeResponseModel",
117117
"AudioOutput",
118-
"BodyAddRulesToThePronunciationDictionaryV1PronunciationDictionariesPronunciationDictionaryIdAddRulesPostRulesItem",
119-
"BodyAddRulesToThePronunciationDictionaryV1PronunciationDictionariesPronunciationDictionaryIdAddRulesPostRulesItem_Alias",
120-
"BodyAddRulesToThePronunciationDictionaryV1PronunciationDictionariesPronunciationDictionaryIdAddRulesPostRulesItem_Phoneme",
121118
"Category",
122119
"ChapterResponse",
123120
"ChapterSnapshotResponse",
@@ -160,6 +157,9 @@
160157
"ProjectState",
161158
"PronunciationDictionaryAliasRuleRequestModel",
162159
"PronunciationDictionaryPhonemeRuleRequestModel",
160+
"PronunciationDictionaryRule",
161+
"PronunciationDictionaryRule_Alias",
162+
"PronunciationDictionaryRule_Phoneme",
163163
"PronunciationDictionaryVersionLocator",
164164
"RealtimeVoiceSettings",
165165
"RecordingResponse",

src/elevenlabs/audio_native/client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ def create(
8080
)
8181
"""
8282
_response = self._client_wrapper.httpx_client.request(
83-
"POST",
84-
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "v1/audio-native"),
83+
method="POST",
84+
url=urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "v1/audio-native"),
8585
params=jsonable_encoder(
8686
request_options.get("additional_query_parameters") if request_options is not None else None
8787
),
@@ -212,8 +212,8 @@ async def create(
212212
)
213213
"""
214214
_response = await self._client_wrapper.httpx_client.request(
215-
"POST",
216-
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "v1/audio-native"),
215+
method="POST",
216+
url=urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "v1/audio-native"),
217217
params=jsonable_encoder(
218218
request_options.get("additional_query_parameters") if request_options is not None else None
219219
),

src/elevenlabs/base_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def __init__(
5555
environment: ElevenLabsEnvironment = ElevenLabsEnvironment.PRODUCTION,
5656
api_key: typing.Optional[str] = os.getenv("ELEVEN_API_KEY"),
5757
timeout: typing.Optional[float] = None,
58-
follow_redirects: typing.Optional[bool] = None,
58+
follow_redirects: typing.Optional[bool] = True,
5959
httpx_client: typing.Optional[httpx.Client] = None
6060
):
6161
_defaulted_timeout = timeout if timeout is not None else 60 if httpx_client is None else None
@@ -117,7 +117,7 @@ def __init__(
117117
environment: ElevenLabsEnvironment = ElevenLabsEnvironment.PRODUCTION,
118118
api_key: typing.Optional[str] = os.getenv("ELEVEN_API_KEY"),
119119
timeout: typing.Optional[float] = None,
120-
follow_redirects: typing.Optional[bool] = None,
120+
follow_redirects: typing.Optional[bool] = True,
121121
httpx_client: typing.Optional[httpx.AsyncClient] = None
122122
):
123123
_defaulted_timeout = timeout if timeout is not None else 60 if httpx_client is None else None

src/elevenlabs/chapters/client.py

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ def get_all(
4545
)
4646
"""
4747
_response = self._client_wrapper.httpx_client.request(
48-
"GET",
49-
urllib.parse.urljoin(
48+
method="GET",
49+
url=urllib.parse.urljoin(
5050
f"{self._client_wrapper.get_base_url()}/", f"v1/projects/{jsonable_encoder(project_id)}/chapters"
5151
),
5252
params=jsonable_encoder(
@@ -102,8 +102,8 @@ def get(
102102
)
103103
"""
104104
_response = self._client_wrapper.httpx_client.request(
105-
"GET",
106-
urllib.parse.urljoin(
105+
method="GET",
106+
url=urllib.parse.urljoin(
107107
f"{self._client_wrapper.get_base_url()}/",
108108
f"v1/projects/{jsonable_encoder(project_id)}/chapters/{jsonable_encoder(chapter_id)}",
109109
),
@@ -160,8 +160,8 @@ def delete(
160160
)
161161
"""
162162
_response = self._client_wrapper.httpx_client.request(
163-
"DELETE",
164-
urllib.parse.urljoin(
163+
method="DELETE",
164+
url=urllib.parse.urljoin(
165165
f"{self._client_wrapper.get_base_url()}/",
166166
f"v1/projects/{jsonable_encoder(project_id)}/chapters/{jsonable_encoder(chapter_id)}",
167167
),
@@ -218,8 +218,8 @@ def convert(
218218
)
219219
"""
220220
_response = self._client_wrapper.httpx_client.request(
221-
"POST",
222-
urllib.parse.urljoin(
221+
method="POST",
222+
url=urllib.parse.urljoin(
223223
f"{self._client_wrapper.get_base_url()}/",
224224
f"v1/projects/{jsonable_encoder(project_id)}/chapters/{jsonable_encoder(chapter_id)}/convert",
225225
),
@@ -279,8 +279,8 @@ def get_all_snapshots(
279279
)
280280
"""
281281
_response = self._client_wrapper.httpx_client.request(
282-
"GET",
283-
urllib.parse.urljoin(
282+
method="GET",
283+
url=urllib.parse.urljoin(
284284
f"{self._client_wrapper.get_base_url()}/",
285285
f"v1/projects/{jsonable_encoder(project_id)}/chapters/{jsonable_encoder(chapter_id)}/snapshots",
286286
),
@@ -351,8 +351,8 @@ def stream_snapshot(
351351
if convert_to_mpeg is not OMIT:
352352
_request["convert_to_mpeg"] = convert_to_mpeg
353353
_response = self._client_wrapper.httpx_client.request(
354-
"POST",
355-
urllib.parse.urljoin(
354+
method="POST",
355+
url=urllib.parse.urljoin(
356356
f"{self._client_wrapper.get_base_url()}/",
357357
f"v1/projects/{jsonable_encoder(project_id)}/chapters/{jsonable_encoder(chapter_id)}/snapshots/{jsonable_encoder(chapter_snapshot_id)}/stream",
358358
),
@@ -417,8 +417,8 @@ async def get_all(
417417
)
418418
"""
419419
_response = await self._client_wrapper.httpx_client.request(
420-
"GET",
421-
urllib.parse.urljoin(
420+
method="GET",
421+
url=urllib.parse.urljoin(
422422
f"{self._client_wrapper.get_base_url()}/", f"v1/projects/{jsonable_encoder(project_id)}/chapters"
423423
),
424424
params=jsonable_encoder(
@@ -474,8 +474,8 @@ async def get(
474474
)
475475
"""
476476
_response = await self._client_wrapper.httpx_client.request(
477-
"GET",
478-
urllib.parse.urljoin(
477+
method="GET",
478+
url=urllib.parse.urljoin(
479479
f"{self._client_wrapper.get_base_url()}/",
480480
f"v1/projects/{jsonable_encoder(project_id)}/chapters/{jsonable_encoder(chapter_id)}",
481481
),
@@ -532,8 +532,8 @@ async def delete(
532532
)
533533
"""
534534
_response = await self._client_wrapper.httpx_client.request(
535-
"DELETE",
536-
urllib.parse.urljoin(
535+
method="DELETE",
536+
url=urllib.parse.urljoin(
537537
f"{self._client_wrapper.get_base_url()}/",
538538
f"v1/projects/{jsonable_encoder(project_id)}/chapters/{jsonable_encoder(chapter_id)}",
539539
),
@@ -590,8 +590,8 @@ async def convert(
590590
)
591591
"""
592592
_response = await self._client_wrapper.httpx_client.request(
593-
"POST",
594-
urllib.parse.urljoin(
593+
method="POST",
594+
url=urllib.parse.urljoin(
595595
f"{self._client_wrapper.get_base_url()}/",
596596
f"v1/projects/{jsonable_encoder(project_id)}/chapters/{jsonable_encoder(chapter_id)}/convert",
597597
),
@@ -651,8 +651,8 @@ async def get_all_snapshots(
651651
)
652652
"""
653653
_response = await self._client_wrapper.httpx_client.request(
654-
"GET",
655-
urllib.parse.urljoin(
654+
method="GET",
655+
url=urllib.parse.urljoin(
656656
f"{self._client_wrapper.get_base_url()}/",
657657
f"v1/projects/{jsonable_encoder(project_id)}/chapters/{jsonable_encoder(chapter_id)}/snapshots",
658658
),
@@ -723,8 +723,8 @@ async def stream_snapshot(
723723
if convert_to_mpeg is not OMIT:
724724
_request["convert_to_mpeg"] = convert_to_mpeg
725725
_response = await self._client_wrapper.httpx_client.request(
726-
"POST",
727-
urllib.parse.urljoin(
726+
method="POST",
727+
url=urllib.parse.urljoin(
728728
f"{self._client_wrapper.get_base_url()}/",
729729
f"v1/projects/{jsonable_encoder(project_id)}/chapters/{jsonable_encoder(chapter_id)}/snapshots/{jsonable_encoder(chapter_snapshot_id)}/stream",
730730
),

src/elevenlabs/core/client_wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def get_headers(self) -> typing.Dict[str, str]:
1717
headers: typing.Dict[str, str] = {
1818
"X-Fern-Language": "Python",
1919
"X-Fern-SDK-Name": "elevenlabs",
20-
"X-Fern-SDK-Version": "v1.1.2",
20+
"X-Fern-SDK-Version": "v1.2.0",
2121
}
2222
if self._api_key is not None:
2323
headers["xi-api-key"] = self._api_key

0 commit comments

Comments
 (0)