Skip to content

Commit 0fd1723

Browse files
SDK regeneration (elevenlabs#311)
Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
1 parent f8f8969 commit 0fd1723

File tree

11 files changed

+284
-12
lines changed

11 files changed

+284
-12
lines changed

poetry.lock

Lines changed: 6 additions & 6 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
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "elevenlabs"
3-
version = "v1.3.0"
3+
version = "v1.3.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
@@ -100,12 +100,14 @@
100100
pronunciation_dictionary,
101101
samples,
102102
speech_to_speech,
103+
text_to_sound_effects,
103104
text_to_speech,
104105
user,
105106
voice_generation,
106107
voices,
107108
workspace,
108109
)
110+
from .dubbing import GetTranscriptForDubV1DubbingDubbingIdTranscriptLanguageCodeGetRequestFormatType
109111
from .environment import ElevenLabsEnvironment
110112
from .play import play, save, stream
111113
from .pronunciation_dictionary import (
@@ -154,6 +156,7 @@
154156
"GetPronunciationDictionariesMetadataResponseModel",
155157
"GetPronunciationDictionaryMetadataResponse",
156158
"GetSpeechHistoryResponse",
159+
"GetTranscriptForDubV1DubbingDubbingIdTranscriptLanguageCodeGetRequestFormatType",
157160
"GetVoicesResponse",
158161
"History",
159162
"HistoryItem",
@@ -227,6 +230,7 @@
227230
"save",
228231
"speech_to_speech",
229232
"stream",
233+
"text_to_sound_effects",
230234
"text_to_speech",
231235
"user",
232236
"voice_generation",

src/elevenlabs/base_client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from .pronunciation_dictionary.client import AsyncPronunciationDictionaryClient, PronunciationDictionaryClient
1717
from .samples.client import AsyncSamplesClient, SamplesClient
1818
from .speech_to_speech.client import AsyncSpeechToSpeechClient, SpeechToSpeechClient
19+
from .text_to_sound_effects.client import AsyncTextToSoundEffectsClient, TextToSoundEffectsClient
1920
from .text_to_speech.client import AsyncTextToSpeechClient, TextToSpeechClient
2021
from .user.client import AsyncUserClient, UserClient
2122
from .voice_generation.client import AsyncVoiceGenerationClient, VoiceGenerationClient
@@ -82,6 +83,7 @@ def __init__(
8283
timeout=_defaulted_timeout,
8384
)
8485
self.history = HistoryClient(client_wrapper=self._client_wrapper)
86+
self.text_to_sound_effects = TextToSoundEffectsClient(client_wrapper=self._client_wrapper)
8587
self.samples = SamplesClient(client_wrapper=self._client_wrapper)
8688
self.text_to_speech = TextToSpeechClient(client_wrapper=self._client_wrapper)
8789
self.speech_to_speech = SpeechToSpeechClient(client_wrapper=self._client_wrapper)
@@ -156,6 +158,7 @@ def __init__(
156158
timeout=_defaulted_timeout,
157159
)
158160
self.history = AsyncHistoryClient(client_wrapper=self._client_wrapper)
161+
self.text_to_sound_effects = AsyncTextToSoundEffectsClient(client_wrapper=self._client_wrapper)
159162
self.samples = AsyncSamplesClient(client_wrapper=self._client_wrapper)
160163
self.text_to_speech = AsyncTextToSpeechClient(client_wrapper=self._client_wrapper)
161164
self.speech_to_speech = AsyncSpeechToSpeechClient(client_wrapper=self._client_wrapper)

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

src/elevenlabs/dubbing/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
# This file was auto-generated by Fern from our API Definition.
22

3+
from .types import GetTranscriptForDubV1DubbingDubbingIdTranscriptLanguageCodeGetRequestFormatType
4+
5+
__all__ = ["GetTranscriptForDubV1DubbingDubbingIdTranscriptLanguageCodeGetRequestFormatType"]

src/elevenlabs/dubbing/client.py

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
from ..types.do_dubbing_response import DoDubbingResponse
1616
from ..types.dubbing_metadata_response import DubbingMetadataResponse
1717
from ..types.http_validation_error import HttpValidationError
18+
from .types.get_transcript_for_dub_v_1_dubbing_dubbing_id_transcript_language_code_get_request_format_type import (
19+
GetTranscriptForDubV1DubbingDubbingIdTranscriptLanguageCodeGetRequestFormatType,
20+
)
1821

1922
# this is used as the default value for optional parameters
2023
OMIT = typing.cast(typing.Any, ...)
@@ -394,7 +397,14 @@ def get_dubbed_file(
394397
raise ApiError(status_code=_response.status_code, body=_response_json)
395398

396399
def get_transcript_for_dub(
397-
self, dubbing_id: str, language_code: str, *, request_options: typing.Optional[RequestOptions] = None
400+
self,
401+
dubbing_id: str,
402+
language_code: str,
403+
*,
404+
format_type: typing.Optional[
405+
GetTranscriptForDubV1DubbingDubbingIdTranscriptLanguageCodeGetRequestFormatType
406+
] = None,
407+
request_options: typing.Optional[RequestOptions] = None,
398408
) -> typing.Any:
399409
"""
400410
Returns transcript for the dub as an SRT file.
@@ -407,6 +417,9 @@ def get_transcript_for_dub(
407417
language_code : str
408418
ID of the language.
409419
420+
format_type : typing.Optional[GetTranscriptForDubV1DubbingDubbingIdTranscriptLanguageCodeGetRequestFormatType]
421+
Format to use for the subtitle file, either 'srt' or 'webvtt'
422+
410423
request_options : typing.Optional[RequestOptions]
411424
Request-specific configuration.
412425
@@ -434,7 +447,16 @@ def get_transcript_for_dub(
434447
f"v1/dubbing/{jsonable_encoder(dubbing_id)}/transcript/{jsonable_encoder(language_code)}",
435448
),
436449
params=jsonable_encoder(
437-
request_options.get("additional_query_parameters") if request_options is not None else None
450+
remove_none_from_dict(
451+
{
452+
"format_type": format_type,
453+
**(
454+
request_options.get("additional_query_parameters", {})
455+
if request_options is not None
456+
else {}
457+
),
458+
}
459+
)
438460
),
439461
headers=jsonable_encoder(
440462
remove_none_from_dict(
@@ -837,7 +859,14 @@ async def get_dubbed_file(
837859
raise ApiError(status_code=_response.status_code, body=_response_json)
838860

839861
async def get_transcript_for_dub(
840-
self, dubbing_id: str, language_code: str, *, request_options: typing.Optional[RequestOptions] = None
862+
self,
863+
dubbing_id: str,
864+
language_code: str,
865+
*,
866+
format_type: typing.Optional[
867+
GetTranscriptForDubV1DubbingDubbingIdTranscriptLanguageCodeGetRequestFormatType
868+
] = None,
869+
request_options: typing.Optional[RequestOptions] = None,
841870
) -> typing.Any:
842871
"""
843872
Returns transcript for the dub as an SRT file.
@@ -850,6 +879,9 @@ async def get_transcript_for_dub(
850879
language_code : str
851880
ID of the language.
852881
882+
format_type : typing.Optional[GetTranscriptForDubV1DubbingDubbingIdTranscriptLanguageCodeGetRequestFormatType]
883+
Format to use for the subtitle file, either 'srt' or 'webvtt'
884+
853885
request_options : typing.Optional[RequestOptions]
854886
Request-specific configuration.
855887
@@ -877,7 +909,16 @@ async def get_transcript_for_dub(
877909
f"v1/dubbing/{jsonable_encoder(dubbing_id)}/transcript/{jsonable_encoder(language_code)}",
878910
),
879911
params=jsonable_encoder(
880-
request_options.get("additional_query_parameters") if request_options is not None else None
912+
remove_none_from_dict(
913+
{
914+
"format_type": format_type,
915+
**(
916+
request_options.get("additional_query_parameters", {})
917+
if request_options is not None
918+
else {}
919+
),
920+
}
921+
)
881922
),
882923
headers=jsonable_encoder(
883924
remove_none_from_dict(
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
from .get_transcript_for_dub_v_1_dubbing_dubbing_id_transcript_language_code_get_request_format_type import (
4+
GetTranscriptForDubV1DubbingDubbingIdTranscriptLanguageCodeGetRequestFormatType,
5+
)
6+
7+
__all__ = ["GetTranscriptForDubV1DubbingDubbingIdTranscriptLanguageCodeGetRequestFormatType"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
import typing
4+
5+
GetTranscriptForDubV1DubbingDubbingIdTranscriptLanguageCodeGetRequestFormatType = typing.Union[
6+
typing.Literal["srt", "webvtt"], typing.Any
7+
]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+

0 commit comments

Comments
 (0)