You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creates AudioNative enabled project, optionally starts conversion and returns project id and embeddable html snippet.
45
45
46
-
Parameters:
47
-
- name: str. Project name.
46
+
Parameters
47
+
----------
48
+
name : str
49
+
Project name.
50
+
51
+
file : core.File
52
+
See core.File for more documentation
53
+
54
+
image : typing.Optional[str]
55
+
Image URL used in the player. If not provided, default image set in the Player settings is used.
48
56
49
-
- image: typing.Optional[str]. Image URL used in the player. If not provided, default image set in the Player settings is used.
57
+
author : typing.Optional[str]
58
+
Author used in the player and inserted at the start of the uploaded article. If not provided, the default author set in the Player settings is used.
50
59
51
-
- author: typing.Optional[str]. Author used in the player and inserted at the start of the uploaded article. If not provided, the default author set in the Player settings is used.
60
+
title : typing.Optional[str]
61
+
Title used in the player and inserted at the top of the uploaded article. If not provided, the default title set in the Player settings is used.
52
62
53
-
- title: typing.Optional[str]. Title used in the player and inserted at the top of the uploaded article. If not provided, the default title set in the Player settings is used.
63
+
small : typing.Optional[bool]
64
+
Whether to use small player or not. If not provided, default value set in the Player settings is used.
54
65
55
-
- small: typing.Optional[bool]. Whether to use small player or not. If not provided, default value set in the Player settings is used.
66
+
text_color : typing.Optional[str]
67
+
Text color used in the player. If not provided, default text color set in the Player settings is used.
56
68
57
-
- text_color: typing.Optional[str]. Text color used in the player. If not provided, default text color set in the Player settings is used.
69
+
background_color : typing.Optional[str]
70
+
Background color used in the player. If not provided, default background color set in the Player settings is used.
58
71
59
-
- background_color: typing.Optional[str]. Background color used in the player. If not provided, default background color set in the Player settings is used.
72
+
sessionization : typing.Optional[int]
73
+
Specifies for how many minutes to persist the session across page reloads. If not provided, default sessionization set in the Player settings is used.
60
74
61
-
- sessionization: typing.Optional[int]. Specifies for how many minutes to persist the session across page reloads. If not provided, default sessionization set in the Player settings is used.
75
+
voice_id : typing.Optional[str]
76
+
Voice ID used to voice the content. If not provided, default voice ID set in the Player settings is used.
62
77
63
-
- voice_id: typing.Optional[str]. Voice ID used to voice the content. If not provided, default voice ID set in the Player settings is used.
78
+
model_id : typing.Optional[str]
79
+
TTS Model ID used in the player. If not provided, default model ID set in the Player settings is used.
64
80
65
-
- model_id: typing.Optional[str]. TTS Model ID used in the player. If not provided, default model ID set in the Player settings is used.
81
+
auto_convert : typing.Optional[bool]
82
+
Whether to auto convert the project to audio or not.
66
83
67
-
- file: core.File. See core.File for more documentation
84
+
request_options : typing.Optional[RequestOptions]
85
+
Request-specific configuration.
68
86
69
-
- auto_convert: typing.Optional[bool]. Whether to auto convert the project to audio or not.
Creates AudioNative enabled project, optionally starts conversion and returns project id and embeddable html snippet.
177
198
178
-
Parameters:
179
-
- name: str. Project name.
199
+
Parameters
200
+
----------
201
+
name : str
202
+
Project name.
203
+
204
+
file : core.File
205
+
See core.File for more documentation
206
+
207
+
image : typing.Optional[str]
208
+
Image URL used in the player. If not provided, default image set in the Player settings is used.
180
209
181
-
- image: typing.Optional[str]. Image URL used in the player. If not provided, default image set in the Player settings is used.
210
+
author : typing.Optional[str]
211
+
Author used in the player and inserted at the start of the uploaded article. If not provided, the default author set in the Player settings is used.
182
212
183
-
- author: typing.Optional[str]. Author used in the player and inserted at the start of the uploaded article. If not provided, the default author set in the Player settings is used.
213
+
title : typing.Optional[str]
214
+
Title used in the player and inserted at the top of the uploaded article. If not provided, the default title set in the Player settings is used.
184
215
185
-
- title: typing.Optional[str]. Title used in the player and inserted at the top of the uploaded article. If not provided, the default title set in the Player settings is used.
216
+
small : typing.Optional[bool]
217
+
Whether to use small player or not. If not provided, default value set in the Player settings is used.
186
218
187
-
- small: typing.Optional[bool]. Whether to use small player or not. If not provided, default value set in the Player settings is used.
219
+
text_color : typing.Optional[str]
220
+
Text color used in the player. If not provided, default text color set in the Player settings is used.
188
221
189
-
- text_color: typing.Optional[str]. Text color used in the player. If not provided, default text color set in the Player settings is used.
222
+
background_color : typing.Optional[str]
223
+
Background color used in the player. If not provided, default background color set in the Player settings is used.
190
224
191
-
- background_color: typing.Optional[str]. Background color used in the player. If not provided, default background color set in the Player settings is used.
225
+
sessionization : typing.Optional[int]
226
+
Specifies for how many minutes to persist the session across page reloads. If not provided, default sessionization set in the Player settings is used.
192
227
193
-
- sessionization: typing.Optional[int]. Specifies for how many minutes to persist the session across page reloads. If not provided, default sessionization set in the Player settings is used.
228
+
voice_id : typing.Optional[str]
229
+
Voice ID used to voice the content. If not provided, default voice ID set in the Player settings is used.
194
230
195
-
- voice_id: typing.Optional[str]. Voice ID used to voice the content. If not provided, default voice ID set in the Player settings is used.
231
+
model_id : typing.Optional[str]
232
+
TTS Model ID used in the player. If not provided, default model ID set in the Player settings is used.
196
233
197
-
- model_id: typing.Optional[str]. TTS Model ID used in the player. If not provided, default model ID set in the Player settings is used.
234
+
auto_convert : typing.Optional[bool]
235
+
Whether to auto convert the project to audio or not.
198
236
199
-
- file: core.File. See core.File for more documentation
237
+
request_options : typing.Optional[RequestOptions]
238
+
Request-specific configuration.
200
239
201
-
- auto_convert: typing.Optional[bool]. Whether to auto convert the project to audio or not.
Copy file name to clipboardExpand all lines: src/elevenlabs/base_client.py
+40-18Lines changed: 40 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -26,21 +26,32 @@ class BaseElevenLabs:
26
26
"""
27
27
Use this class to access the different functions within the SDK. You can instantiate any number of clients with different configuration that will propogate to these functions.
28
28
29
-
Parameters:
30
-
- base_url: typing.Optional[str]. The base url to use for requests from the client.
29
+
Parameters
30
+
----------
31
+
base_url : typing.Optional[str]
32
+
The base url to use for requests from the client.
31
33
32
-
- environment: ElevenLabsEnvironment. The environment to use for requests from the client. from .environment import ElevenLabsEnvironment
34
+
environment : ElevenLabsEnvironment
35
+
The environment to use for requests from the client. from .environment import ElevenLabsEnvironment
33
36
34
-
Defaults to ElevenLabsEnvironment.PRODUCTION
35
37
36
-
- api_key: typing.Optional[str].
37
38
38
-
- timeout: typing.Optional[float]. The timeout to be used, in seconds, for requests by default the timeout is 60 seconds, unless a custom httpx client is used, in which case a default is not set.
39
+
Defaults to ElevenLabsEnvironment.PRODUCTION
39
40
40
-
- follow_redirects: typing.Optional[bool]. Whether the default httpx client follows redirects or not, this is irrelevant if a custom httpx client is passed in.
41
41
42
-
- httpx_client: typing.Optional[httpx.Client]. The httpx client to use for making requests, a preconfigured client is used by default, however this is useful should you want to pass in any custom httpx configuration.
43
-
---
42
+
43
+
api_key : typing.Optional[str]
44
+
timeout : typing.Optional[float]
45
+
The timeout to be used, in seconds, for requests by default the timeout is 60 seconds, unless a custom httpx client is used, in which case a default is not set.
46
+
47
+
follow_redirects : typing.Optional[bool]
48
+
Whether the default httpx client follows redirects or not, this is irrelevant if a custom httpx client is passed in.
49
+
50
+
httpx_client : typing.Optional[httpx.Client]
51
+
The httpx client to use for making requests, a preconfigured client is used by default, however this is useful should you want to pass in any custom httpx configuration.
52
+
53
+
Examples
54
+
--------
44
55
from elevenlabs.client import ElevenLabs
45
56
46
57
client = ElevenLabs(
@@ -88,21 +99,32 @@ class AsyncBaseElevenLabs:
88
99
"""
89
100
Use this class to access the different functions within the SDK. You can instantiate any number of clients with different configuration that will propogate to these functions.
90
101
91
-
Parameters:
92
-
- base_url: typing.Optional[str]. The base url to use for requests from the client.
102
+
Parameters
103
+
----------
104
+
base_url : typing.Optional[str]
105
+
The base url to use for requests from the client.
106
+
107
+
environment : ElevenLabsEnvironment
108
+
The environment to use for requests from the client. from .environment import ElevenLabsEnvironment
109
+
110
+
111
+
112
+
Defaults to ElevenLabsEnvironment.PRODUCTION
93
113
94
-
- environment: ElevenLabsEnvironment. The environment to use for requests from the client. from .environment import ElevenLabsEnvironment
95
114
96
-
Defaults to ElevenLabsEnvironment.PRODUCTION
97
115
98
-
- api_key: typing.Optional[str].
116
+
api_key : typing.Optional[str]
117
+
timeout : typing.Optional[float]
118
+
The timeout to be used, in seconds, for requests by default the timeout is 60 seconds, unless a custom httpx client is used, in which case a default is not set.
99
119
100
-
- timeout: typing.Optional[float]. The timeout to be used, in seconds, for requests by default the timeout is 60 seconds, unless a custom httpx client is used, in which case a default is not set.
120
+
follow_redirects : typing.Optional[bool]
121
+
Whether the default httpx client follows redirects or not, this is irrelevant if a custom httpx client is passed in.
101
122
102
-
- follow_redirects: typing.Optional[bool]. Whether the default httpx client follows redirects or not, this is irrelevant if a custom httpx client is passed in.
123
+
httpx_client : typing.Optional[httpx.AsyncClient]
124
+
The httpx client to use for making requests, a preconfigured client is used by default, however this is useful should you want to pass in any custom httpx configuration.
103
125
104
-
- httpx_client: typing.Optional[httpx.AsyncClient]. The httpx client to use for making requests, a preconfigured client is used by default, however this is useful should you want to pass in any custom httpx configuration.
0 commit comments