Skip to content

Commit 514da09

Browse files
committed
SDK regeneration
1 parent f19c3cc commit 514da09

File tree

19 files changed

+455
-122
lines changed

19 files changed

+455
-122
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "elevenlabs"
3-
version = "v1.1.0"
3+
version = "v1.1.1"
44
description = ""
55
readme = "README.md"
66
authors = []

src/elevenlabs/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
AudioNativeCreateProjectResponseModel,
1111
AudioNativeGetEmbedCodeResponseModel,
1212
AudioOutput,
13+
Category,
1314
ChapterResponse,
1415
ChapterSnapshotResponse,
1516
ChapterSnapshotsResponse,
@@ -27,6 +28,7 @@
2728
GetChaptersResponse,
2829
GetLibraryVoicesResponse,
2930
GetProjectsResponse,
31+
GetPronunciationDictionariesMetadataResponseModel,
3032
GetPronunciationDictionaryMetadataResponse,
3133
GetSpeechHistoryResponse,
3234
GetVoicesResponse,
@@ -116,6 +118,7 @@
116118
"BodyAddRulesToThePronunciationDictionaryV1PronunciationDictionariesPronunciationDictionaryIdAddRulesPostRulesItem",
117119
"BodyAddRulesToThePronunciationDictionaryV1PronunciationDictionariesPronunciationDictionaryIdAddRulesPostRulesItem_Alias",
118120
"BodyAddRulesToThePronunciationDictionaryV1PronunciationDictionariesPronunciationDictionaryIdAddRulesPostRulesItem_Phoneme",
121+
"Category",
119122
"ChapterResponse",
120123
"ChapterSnapshotResponse",
121124
"ChapterSnapshotsResponse",
@@ -134,6 +137,7 @@
134137
"GetChaptersResponse",
135138
"GetLibraryVoicesResponse",
136139
"GetProjectsResponse",
140+
"GetPronunciationDictionariesMetadataResponseModel",
137141
"GetPronunciationDictionaryMetadataResponse",
138142
"GetSpeechHistoryResponse",
139143
"GetVoicesResponse",

src/elevenlabs/audio_native/client.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ def create(
7575
client = ElevenLabs(
7676
api_key="YOUR_API_KEY",
7777
)
78-
client.audio_native.create()
78+
client.audio_native.create(
79+
name="name",
80+
)
7981
"""
8082
_response = self._client_wrapper.httpx_client.request(
8183
"POST",
@@ -205,7 +207,9 @@ async def create(
205207
client = AsyncElevenLabs(
206208
api_key="YOUR_API_KEY",
207209
)
208-
await client.audio_native.create()
210+
await client.audio_native.create(
211+
name="name",
212+
)
209213
"""
210214
_response = await self._client_wrapper.httpx_client.request(
211215
"POST",

src/elevenlabs/chapters/client.py

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
from ..types.get_chapters_response import GetChaptersResponse
1717
from ..types.http_validation_error import HttpValidationError
1818

19+
# this is used as the default value for optional parameters
20+
OMIT = typing.cast(typing.Any, ...)
21+
1922

2023
class ChaptersClient:
2124
def __init__(self, *, client_wrapper: SyncClientWrapper):
@@ -316,10 +319,11 @@ def stream_snapshot(
316319
chapter_id: str,
317320
chapter_snapshot_id: str,
318321
*,
322+
convert_to_mpeg: typing.Optional[bool] = OMIT,
319323
request_options: typing.Optional[RequestOptions] = None,
320324
) -> None:
321325
"""
322-
Stream the audio from a chapter snapshot. Use GET /v1/projects/{project_id}/chapters/{chapter_id}/snapshots to return the chapter snapshots of a chapter.
326+
Stream the audio from a chapter snapshot. Use `GET /v1/projects/{project_id}/chapters/{chapter_id}/snapshots` to return the chapter snapshots of a chapter.
323327
324328
Parameters:
325329
- project_id: str. The project_id of the project, you can query GET https://api.elevenlabs.io/v1/projects to list all available projects.
@@ -328,6 +332,8 @@ def stream_snapshot(
328332
329333
- chapter_snapshot_id: str. The chapter_snapshot_id of the chapter snapshot. You can query GET /v1/projects/{project_id}/chapters/{chapter_id}/snapshots to the all available snapshots for a chapter.
330334
335+
- convert_to_mpeg: typing.Optional[bool]. Whether to convert the audio to mpeg format.
336+
331337
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
332338
---
333339
from elevenlabs.client import ElevenLabs
@@ -341,6 +347,9 @@ def stream_snapshot(
341347
chapter_snapshot_id="chapter_snapshot_id",
342348
)
343349
"""
350+
_request: typing.Dict[str, typing.Any] = {}
351+
if convert_to_mpeg is not OMIT:
352+
_request["convert_to_mpeg"] = convert_to_mpeg
344353
_response = self._client_wrapper.httpx_client.request(
345354
"POST",
346355
urllib.parse.urljoin(
@@ -350,9 +359,12 @@ def stream_snapshot(
350359
params=jsonable_encoder(
351360
request_options.get("additional_query_parameters") if request_options is not None else None
352361
),
353-
json=jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))
354-
if request_options is not None
355-
else None,
362+
json=jsonable_encoder(_request)
363+
if request_options is None or request_options.get("additional_body_parameters") is None
364+
else {
365+
**jsonable_encoder(_request),
366+
**(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))),
367+
},
356368
headers=jsonable_encoder(
357369
remove_none_from_dict(
358370
{
@@ -679,10 +691,11 @@ async def stream_snapshot(
679691
chapter_id: str,
680692
chapter_snapshot_id: str,
681693
*,
694+
convert_to_mpeg: typing.Optional[bool] = OMIT,
682695
request_options: typing.Optional[RequestOptions] = None,
683696
) -> None:
684697
"""
685-
Stream the audio from a chapter snapshot. Use GET /v1/projects/{project_id}/chapters/{chapter_id}/snapshots to return the chapter snapshots of a chapter.
698+
Stream the audio from a chapter snapshot. Use `GET /v1/projects/{project_id}/chapters/{chapter_id}/snapshots` to return the chapter snapshots of a chapter.
686699
687700
Parameters:
688701
- project_id: str. The project_id of the project, you can query GET https://api.elevenlabs.io/v1/projects to list all available projects.
@@ -691,6 +704,8 @@ async def stream_snapshot(
691704
692705
- chapter_snapshot_id: str. The chapter_snapshot_id of the chapter snapshot. You can query GET /v1/projects/{project_id}/chapters/{chapter_id}/snapshots to the all available snapshots for a chapter.
693706
707+
- convert_to_mpeg: typing.Optional[bool]. Whether to convert the audio to mpeg format.
708+
694709
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
695710
---
696711
from elevenlabs.client import AsyncElevenLabs
@@ -704,6 +719,9 @@ async def stream_snapshot(
704719
chapter_snapshot_id="chapter_snapshot_id",
705720
)
706721
"""
722+
_request: typing.Dict[str, typing.Any] = {}
723+
if convert_to_mpeg is not OMIT:
724+
_request["convert_to_mpeg"] = convert_to_mpeg
707725
_response = await self._client_wrapper.httpx_client.request(
708726
"POST",
709727
urllib.parse.urljoin(
@@ -713,9 +731,12 @@ async def stream_snapshot(
713731
params=jsonable_encoder(
714732
request_options.get("additional_query_parameters") if request_options is not None else None
715733
),
716-
json=jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))
717-
if request_options is not None
718-
else None,
734+
json=jsonable_encoder(_request)
735+
if request_options is None or request_options.get("additional_body_parameters") is None
736+
else {
737+
**jsonable_encoder(_request),
738+
**(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))),
739+
},
719740
headers=jsonable_encoder(
720741
remove_none_from_dict(
721742
{

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.0",
20+
"X-Fern-SDK-Version": "v1.1.1",
2121
}
2222
if self._api_key is not None:
2323
headers["xi-api-key"] = self._api_key

src/elevenlabs/dubbing/client.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def dub_a_video_or_an_audio_file(
6464
6565
- source_lang: typing.Optional[str]. Source language.
6666
67-
- target_lang: str. Target language.
67+
- target_lang: str. The Target language to dub the content into. Can be none if dubbing studio editor is enabled and running manual mode
6868
6969
- num_speakers: typing.Optional[int]. Number of speakers to use for the dubbing.
7070
@@ -85,7 +85,9 @@ def dub_a_video_or_an_audio_file(
8585
client = ElevenLabs(
8686
api_key="YOUR_API_KEY",
8787
)
88-
client.dubbing.dub_a_video_or_an_audio_file()
88+
client.dubbing.dub_a_video_or_an_audio_file(
89+
target_lang="target_lang",
90+
)
8991
"""
9092
_response = self._client_wrapper.httpx_client.request(
9193
"POST",
@@ -378,7 +380,7 @@ async def dub_a_video_or_an_audio_file(
378380
379381
- source_lang: typing.Optional[str]. Source language.
380382
381-
- target_lang: str. Target language.
383+
- target_lang: str. The Target language to dub the content into. Can be none if dubbing studio editor is enabled and running manual mode
382384
383385
- num_speakers: typing.Optional[int]. Number of speakers to use for the dubbing.
384386
@@ -399,7 +401,9 @@ async def dub_a_video_or_an_audio_file(
399401
client = AsyncElevenLabs(
400402
api_key="YOUR_API_KEY",
401403
)
402-
await client.dubbing.dub_a_video_or_an_audio_file()
404+
await client.dubbing.dub_a_video_or_an_audio_file(
405+
target_lang="target_lang",
406+
)
403407
"""
404408
_response = await self._client_wrapper.httpx_client.request(
405409
"POST",

src/elevenlabs/history/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def get_audio(
216216
api_key="YOUR_API_KEY",
217217
)
218218
client.history.get_audio(
219-
history_item_id="string",
219+
history_item_id="history_item_id",
220220
)
221221
"""
222222
with self._client_wrapper.httpx_client.stream(
@@ -519,7 +519,7 @@ async def get_audio(
519519
api_key="YOUR_API_KEY",
520520
)
521521
await client.history.get_audio(
522-
history_item_id="string",
522+
history_item_id="history_item_id",
523523
)
524524
"""
525525
async with self._client_wrapper.httpx_client.stream(

0 commit comments

Comments
 (0)