Skip to content

Commit 16524b1

Browse files
(break): remove callback_url and fix enable_logging parameters
1 parent eb96922 commit 16524b1

File tree

6 files changed

+227
-264
lines changed

6 files changed

+227
-264
lines changed

poetry.lock

Lines changed: 197 additions & 181 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 = "1.7.0"
3+
version = "1.8.0"
44
description = ""
55
readme = "README.md"
66
authors = []

reference.md

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,9 +1516,9 @@ client = ElevenLabs(
15161516
)
15171517
client.speech_to_speech.convert(
15181518
voice_id="string",
1519-
enable_logging="0",
1520-
optimize_streaming_latency="mp3_22050_32",
1521-
output_format="string",
1519+
enable_logging=True,
1520+
optimize_streaming_latency="0",
1521+
output_format="mp3_22050_32",
15221522
)
15231523

15241524
```
@@ -1553,36 +1553,23 @@ core.File` — See core.File for more documentation
15531553
<dl>
15541554
<dd>
15551555

1556-
**enable_logging:** `typing.Optional[OptimizeStreamingLatency]`You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model.
1556+
**enable_logging:** `typing.Optional[bool]`When enable_logging is set to false full privacy mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Full privacy mode may only be used by enterprise customers.
15571557

15581558
</dd>
15591559
</dl>
15601560

15611561
<dl>
15621562
<dd>
15631563

1564-
**optimize_streaming_latency:** `typing.Optional[OutputFormat]`The output format of the generated audio.
1564+
**optimize_streaming_latency:** `typing.Optional[OptimizeStreamingLatency]`You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model.
15651565

15661566
</dd>
15671567
</dl>
15681568

15691569
<dl>
15701570
<dd>
15711571

1572-
**output_format:** `typing.Optional[str]`
1573-
1574-
Output format of the generated audio. Must be one of:
1575-
mp3_22050_32 - output format, mp3 with 22.05kHz sample rate at 32kbps.
1576-
mp3_44100_32 - output format, mp3 with 44.1kHz sample rate at 32kbps.
1577-
mp3_44100_64 - output format, mp3 with 44.1kHz sample rate at 64kbps.
1578-
mp3_44100_96 - output format, mp3 with 44.1kHz sample rate at 96kbps.
1579-
mp3_44100_128 - default output format, mp3 with 44.1kHz sample rate at 128kbps.
1580-
mp3_44100_192 - output format, mp3 with 44.1kHz sample rate at 192kbps. Requires you to be subscribed to Creator tier or above.
1581-
pcm_16000 - PCM format (S16LE) with 16kHz sample rate.
1582-
pcm_22050 - PCM format (S16LE) with 22.05kHz sample rate.
1583-
pcm_24000 - PCM format (S16LE) with 24kHz sample rate.
1584-
pcm_44100 - PCM format (S16LE) with 44.1kHz sample rate. Requires you to be subscribed to Pro tier or above.
1585-
ulaw_8000 - μ-law format (sometimes written mu-law, often approximated as u-law) with 8kHz sample rate. Note that this format is commonly used for Twilio audio inputs.
1572+
**output_format:** `typing.Optional[OutputFormat]` — The output format of the generated audio.
15861573

15871574
</dd>
15881575
</dl>
@@ -3441,14 +3428,6 @@ ultra lossless - ultra quality output format, 705.6kbps with 44.1kHz sample rate
34413428
<dl>
34423429
<dd>
34433430

3444-
**callback_url:** `typing.Optional[str]` — A url that will be called by our service when the project is converted with a json containing the status of the conversion
3445-
3446-
</dd>
3447-
</dl>
3448-
3449-
<dl>
3450-
<dd>
3451-
34523431
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
34533432

34543433
</dd>

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

src/elevenlabs/projects/client.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ def add(
8080
acx_volume_normalization: typing.Optional[bool] = None,
8181
volume_normalization: typing.Optional[bool] = None,
8282
pronunciation_dictionary_locators: typing.Optional[typing.List[str]] = None,
83-
callback_url: typing.Optional[str] = None,
8483
request_options: typing.Optional[RequestOptions] = None,
8584
) -> AddProjectResponseModel:
8685
"""
@@ -132,9 +131,6 @@ def add(
132131
pronunciation_dictionary_locators : typing.Optional[typing.List[str]]
133132
A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"Vmd4Zor6fplcA7WrINey\",\"version_id\":\"hRPaxjlTdR7wFMhV4w0b\"}"' --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"JzWtcGQMJ6bnlWwyMo7e\",\"version_id\":\"lbmwxiLu4q6txYxgdZqn\"}"'. Note that multiple dictionaries are not currently supported by our UI which will only show the first.
134133
135-
callback_url : typing.Optional[str]
136-
A url that will be called by our service when the project is converted with a json containing the status of the conversion
137-
138134
request_options : typing.Optional[RequestOptions]
139135
Request-specific configuration.
140136
@@ -173,7 +169,6 @@ def add(
173169
"acx_volume_normalization": acx_volume_normalization,
174170
"volume_normalization": volume_normalization,
175171
"pronunciation_dictionary_locators": pronunciation_dictionary_locators,
176-
"callback_url": callback_url,
177172
},
178173
files={"from_document": from_document},
179174
request_options=request_options,
@@ -703,7 +698,6 @@ async def add(
703698
acx_volume_normalization: typing.Optional[bool] = None,
704699
volume_normalization: typing.Optional[bool] = None,
705700
pronunciation_dictionary_locators: typing.Optional[typing.List[str]] = None,
706-
callback_url: typing.Optional[str] = None,
707701
request_options: typing.Optional[RequestOptions] = None,
708702
) -> AddProjectResponseModel:
709703
"""
@@ -755,9 +749,6 @@ async def add(
755749
pronunciation_dictionary_locators : typing.Optional[typing.List[str]]
756750
A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"Vmd4Zor6fplcA7WrINey\",\"version_id\":\"hRPaxjlTdR7wFMhV4w0b\"}"' --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"JzWtcGQMJ6bnlWwyMo7e\",\"version_id\":\"lbmwxiLu4q6txYxgdZqn\"}"'. Note that multiple dictionaries are not currently supported by our UI which will only show the first.
757751
758-
callback_url : typing.Optional[str]
759-
A url that will be called by our service when the project is converted with a json containing the status of the conversion
760-
761752
request_options : typing.Optional[RequestOptions]
762753
Request-specific configuration.
763754
@@ -804,7 +795,6 @@ async def main() -> None:
804795
"acx_volume_normalization": acx_volume_normalization,
805796
"volume_normalization": volume_normalization,
806797
"pronunciation_dictionary_locators": pronunciation_dictionary_locators,
807-
"callback_url": callback_url,
808798
},
809799
files={"from_document": from_document},
810800
request_options=request_options,

src/elevenlabs/speech_to_speech/client.py

Lines changed: 22 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ def convert(
2727
voice_id: str,
2828
*,
2929
audio: core.File,
30-
enable_logging: typing.Optional[OptimizeStreamingLatency] = None,
31-
optimize_streaming_latency: typing.Optional[OutputFormat] = None,
32-
output_format: typing.Optional[str] = None,
30+
enable_logging: typing.Optional[bool] = None,
31+
optimize_streaming_latency: typing.Optional[OptimizeStreamingLatency] = None,
32+
output_format: typing.Optional[OutputFormat] = None,
3333
model_id: typing.Optional[str] = None,
3434
voice_settings: typing.Optional[str] = None,
3535
seed: typing.Optional[int] = None,
@@ -46,26 +46,15 @@ def convert(
4646
audio : core.File
4747
See core.File for more documentation
4848
49-
enable_logging : typing.Optional[OptimizeStreamingLatency]
49+
enable_logging : typing.Optional[bool]
50+
When enable_logging is set to false full privacy mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Full privacy mode may only be used by enterprise customers.
51+
52+
optimize_streaming_latency : typing.Optional[OptimizeStreamingLatency]
5053
You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model.
5154
52-
optimize_streaming_latency : typing.Optional[OutputFormat]
55+
output_format : typing.Optional[OutputFormat]
5356
The output format of the generated audio.
5457
55-
output_format : typing.Optional[str]
56-
Output format of the generated audio. Must be one of:
57-
mp3_22050_32 - output format, mp3 with 22.05kHz sample rate at 32kbps.
58-
mp3_44100_32 - output format, mp3 with 44.1kHz sample rate at 32kbps.
59-
mp3_44100_64 - output format, mp3 with 44.1kHz sample rate at 64kbps.
60-
mp3_44100_96 - output format, mp3 with 44.1kHz sample rate at 96kbps.
61-
mp3_44100_128 - default output format, mp3 with 44.1kHz sample rate at 128kbps.
62-
mp3_44100_192 - output format, mp3 with 44.1kHz sample rate at 192kbps. Requires you to be subscribed to Creator tier or above.
63-
pcm_16000 - PCM format (S16LE) with 16kHz sample rate.
64-
pcm_22050 - PCM format (S16LE) with 22.05kHz sample rate.
65-
pcm_24000 - PCM format (S16LE) with 24kHz sample rate.
66-
pcm_44100 - PCM format (S16LE) with 44.1kHz sample rate. Requires you to be subscribed to Pro tier or above.
67-
ulaw_8000 - μ-law format (sometimes written mu-law, often approximated as u-law) with 8kHz sample rate. Note that this format is commonly used for Twilio audio inputs.
68-
6958
model_id : typing.Optional[str]
7059
Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for speech to speech, you can check this using the can_do_voice_conversion property.
7160
@@ -92,9 +81,9 @@ def convert(
9281
)
9382
client.speech_to_speech.convert(
9483
voice_id="string",
95-
enable_logging="0",
96-
optimize_streaming_latency="mp3_22050_32",
97-
output_format="string",
84+
enable_logging=True,
85+
optimize_streaming_latency="0",
86+
output_format="mp3_22050_32",
9887
)
9988
"""
10089
with self._client_wrapper.httpx_client.stream(
@@ -238,9 +227,9 @@ async def convert(
238227
voice_id: str,
239228
*,
240229
audio: core.File,
241-
enable_logging: typing.Optional[OptimizeStreamingLatency] = None,
242-
optimize_streaming_latency: typing.Optional[OutputFormat] = None,
243-
output_format: typing.Optional[str] = None,
230+
enable_logging: typing.Optional[bool] = None,
231+
optimize_streaming_latency: typing.Optional[OptimizeStreamingLatency] = None,
232+
output_format: typing.Optional[OutputFormat] = None,
244233
model_id: typing.Optional[str] = None,
245234
voice_settings: typing.Optional[str] = None,
246235
seed: typing.Optional[int] = None,
@@ -257,26 +246,15 @@ async def convert(
257246
audio : core.File
258247
See core.File for more documentation
259248
260-
enable_logging : typing.Optional[OptimizeStreamingLatency]
249+
enable_logging : typing.Optional[bool]
250+
When enable_logging is set to false full privacy mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Full privacy mode may only be used by enterprise customers.
251+
252+
optimize_streaming_latency : typing.Optional[OptimizeStreamingLatency]
261253
You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model.
262254
263-
optimize_streaming_latency : typing.Optional[OutputFormat]
255+
output_format : typing.Optional[OutputFormat]
264256
The output format of the generated audio.
265257
266-
output_format : typing.Optional[str]
267-
Output format of the generated audio. Must be one of:
268-
mp3_22050_32 - output format, mp3 with 22.05kHz sample rate at 32kbps.
269-
mp3_44100_32 - output format, mp3 with 44.1kHz sample rate at 32kbps.
270-
mp3_44100_64 - output format, mp3 with 44.1kHz sample rate at 64kbps.
271-
mp3_44100_96 - output format, mp3 with 44.1kHz sample rate at 96kbps.
272-
mp3_44100_128 - default output format, mp3 with 44.1kHz sample rate at 128kbps.
273-
mp3_44100_192 - output format, mp3 with 44.1kHz sample rate at 192kbps. Requires you to be subscribed to Creator tier or above.
274-
pcm_16000 - PCM format (S16LE) with 16kHz sample rate.
275-
pcm_22050 - PCM format (S16LE) with 22.05kHz sample rate.
276-
pcm_24000 - PCM format (S16LE) with 24kHz sample rate.
277-
pcm_44100 - PCM format (S16LE) with 44.1kHz sample rate. Requires you to be subscribed to Pro tier or above.
278-
ulaw_8000 - μ-law format (sometimes written mu-law, often approximated as u-law) with 8kHz sample rate. Note that this format is commonly used for Twilio audio inputs.
279-
280258
model_id : typing.Optional[str]
281259
Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for speech to speech, you can check this using the can_do_voice_conversion property.
282260
@@ -308,9 +286,9 @@ async def convert(
308286
async def main() -> None:
309287
await client.speech_to_speech.convert(
310288
voice_id="string",
311-
enable_logging="0",
312-
optimize_streaming_latency="mp3_22050_32",
313-
output_format="string",
289+
enable_logging=True,
290+
optimize_streaming_latency="0",
291+
output_format="mp3_22050_32",
314292
)
315293
316294

0 commit comments

Comments
 (0)