Skip to content

Commit

Permalink
(break): remove callback_url and fix enable_logging parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] authored Sep 11, 2024
1 parent eb96922 commit 16524b1
Show file tree
Hide file tree
Showing 6 changed files with 227 additions and 264 deletions.
378 changes: 197 additions & 181 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "elevenlabs"
version = "1.7.0"
version = "1.8.0"
description = ""
readme = "README.md"
authors = []
Expand Down
33 changes: 6 additions & 27 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1516,9 +1516,9 @@ client = ElevenLabs(
)
client.speech_to_speech.convert(
voice_id="string",
enable_logging="0",
optimize_streaming_latency="mp3_22050_32",
output_format="string",
enable_logging=True,
optimize_streaming_latency="0",
output_format="mp3_22050_32",
)

```
Expand Down Expand Up @@ -1553,36 +1553,23 @@ core.File` — See core.File for more documentation
<dl>
<dd>

**enable_logging:** `typing.Optional[OptimizeStreamingLatency]`You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model.
**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.

</dd>
</dl>

<dl>
<dd>

**optimize_streaming_latency:** `typing.Optional[OutputFormat]`The output format of the generated audio.
**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.

</dd>
</dl>

<dl>
<dd>

**output_format:** `typing.Optional[str]`

Output format of the generated audio. Must be one of:
mp3_22050_32 - output format, mp3 with 22.05kHz sample rate at 32kbps.
mp3_44100_32 - output format, mp3 with 44.1kHz sample rate at 32kbps.
mp3_44100_64 - output format, mp3 with 44.1kHz sample rate at 64kbps.
mp3_44100_96 - output format, mp3 with 44.1kHz sample rate at 96kbps.
mp3_44100_128 - default output format, mp3 with 44.1kHz sample rate at 128kbps.
mp3_44100_192 - output format, mp3 with 44.1kHz sample rate at 192kbps. Requires you to be subscribed to Creator tier or above.
pcm_16000 - PCM format (S16LE) with 16kHz sample rate.
pcm_22050 - PCM format (S16LE) with 22.05kHz sample rate.
pcm_24000 - PCM format (S16LE) with 24kHz sample rate.
pcm_44100 - PCM format (S16LE) with 44.1kHz sample rate. Requires you to be subscribed to Pro tier or above.
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.
**output_format:** `typing.Optional[OutputFormat]` — The output format of the generated audio.

</dd>
</dl>
Expand Down Expand Up @@ -3441,14 +3428,6 @@ ultra lossless - ultra quality output format, 705.6kbps with 44.1kHz sample rate
<dl>
<dd>

**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

</dd>
</dl>

<dl>
<dd>

**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.

</dd>
Expand Down
2 changes: 1 addition & 1 deletion src/elevenlabs/core/client_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "elevenlabs",
"X-Fern-SDK-Version": "1.7.0",
"X-Fern-SDK-Version": "1.8.0",
}
if self._api_key is not None:
headers["xi-api-key"] = self._api_key
Expand Down
10 changes: 0 additions & 10 deletions src/elevenlabs/projects/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ def add(
acx_volume_normalization: typing.Optional[bool] = None,
volume_normalization: typing.Optional[bool] = None,
pronunciation_dictionary_locators: typing.Optional[typing.List[str]] = None,
callback_url: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> AddProjectResponseModel:
"""
Expand Down Expand Up @@ -132,9 +131,6 @@ def add(
pronunciation_dictionary_locators : typing.Optional[typing.List[str]]
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.
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
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Expand Down Expand Up @@ -173,7 +169,6 @@ def add(
"acx_volume_normalization": acx_volume_normalization,
"volume_normalization": volume_normalization,
"pronunciation_dictionary_locators": pronunciation_dictionary_locators,
"callback_url": callback_url,
},
files={"from_document": from_document},
request_options=request_options,
Expand Down Expand Up @@ -703,7 +698,6 @@ async def add(
acx_volume_normalization: typing.Optional[bool] = None,
volume_normalization: typing.Optional[bool] = None,
pronunciation_dictionary_locators: typing.Optional[typing.List[str]] = None,
callback_url: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> AddProjectResponseModel:
"""
Expand Down Expand Up @@ -755,9 +749,6 @@ async def add(
pronunciation_dictionary_locators : typing.Optional[typing.List[str]]
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.
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
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Expand Down Expand Up @@ -804,7 +795,6 @@ async def main() -> None:
"acx_volume_normalization": acx_volume_normalization,
"volume_normalization": volume_normalization,
"pronunciation_dictionary_locators": pronunciation_dictionary_locators,
"callback_url": callback_url,
},
files={"from_document": from_document},
request_options=request_options,
Expand Down
66 changes: 22 additions & 44 deletions src/elevenlabs/speech_to_speech/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ def convert(
voice_id: str,
*,
audio: core.File,
enable_logging: typing.Optional[OptimizeStreamingLatency] = None,
optimize_streaming_latency: typing.Optional[OutputFormat] = None,
output_format: typing.Optional[str] = None,
enable_logging: typing.Optional[bool] = None,
optimize_streaming_latency: typing.Optional[OptimizeStreamingLatency] = None,
output_format: typing.Optional[OutputFormat] = None,
model_id: typing.Optional[str] = None,
voice_settings: typing.Optional[str] = None,
seed: typing.Optional[int] = None,
Expand All @@ -46,26 +46,15 @@ def convert(
audio : core.File
See core.File for more documentation
enable_logging : typing.Optional[OptimizeStreamingLatency]
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.
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.
optimize_streaming_latency : typing.Optional[OutputFormat]
output_format : typing.Optional[OutputFormat]
The output format of the generated audio.
output_format : typing.Optional[str]
Output format of the generated audio. Must be one of:
mp3_22050_32 - output format, mp3 with 22.05kHz sample rate at 32kbps.
mp3_44100_32 - output format, mp3 with 44.1kHz sample rate at 32kbps.
mp3_44100_64 - output format, mp3 with 44.1kHz sample rate at 64kbps.
mp3_44100_96 - output format, mp3 with 44.1kHz sample rate at 96kbps.
mp3_44100_128 - default output format, mp3 with 44.1kHz sample rate at 128kbps.
mp3_44100_192 - output format, mp3 with 44.1kHz sample rate at 192kbps. Requires you to be subscribed to Creator tier or above.
pcm_16000 - PCM format (S16LE) with 16kHz sample rate.
pcm_22050 - PCM format (S16LE) with 22.05kHz sample rate.
pcm_24000 - PCM format (S16LE) with 24kHz sample rate.
pcm_44100 - PCM format (S16LE) with 44.1kHz sample rate. Requires you to be subscribed to Pro tier or above.
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.
model_id : typing.Optional[str]
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.
Expand All @@ -92,9 +81,9 @@ def convert(
)
client.speech_to_speech.convert(
voice_id="string",
enable_logging="0",
optimize_streaming_latency="mp3_22050_32",
output_format="string",
enable_logging=True,
optimize_streaming_latency="0",
output_format="mp3_22050_32",
)
"""
with self._client_wrapper.httpx_client.stream(
Expand Down Expand Up @@ -238,9 +227,9 @@ async def convert(
voice_id: str,
*,
audio: core.File,
enable_logging: typing.Optional[OptimizeStreamingLatency] = None,
optimize_streaming_latency: typing.Optional[OutputFormat] = None,
output_format: typing.Optional[str] = None,
enable_logging: typing.Optional[bool] = None,
optimize_streaming_latency: typing.Optional[OptimizeStreamingLatency] = None,
output_format: typing.Optional[OutputFormat] = None,
model_id: typing.Optional[str] = None,
voice_settings: typing.Optional[str] = None,
seed: typing.Optional[int] = None,
Expand All @@ -257,26 +246,15 @@ async def convert(
audio : core.File
See core.File for more documentation
enable_logging : typing.Optional[OptimizeStreamingLatency]
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.
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.
optimize_streaming_latency : typing.Optional[OutputFormat]
output_format : typing.Optional[OutputFormat]
The output format of the generated audio.
output_format : typing.Optional[str]
Output format of the generated audio. Must be one of:
mp3_22050_32 - output format, mp3 with 22.05kHz sample rate at 32kbps.
mp3_44100_32 - output format, mp3 with 44.1kHz sample rate at 32kbps.
mp3_44100_64 - output format, mp3 with 44.1kHz sample rate at 64kbps.
mp3_44100_96 - output format, mp3 with 44.1kHz sample rate at 96kbps.
mp3_44100_128 - default output format, mp3 with 44.1kHz sample rate at 128kbps.
mp3_44100_192 - output format, mp3 with 44.1kHz sample rate at 192kbps. Requires you to be subscribed to Creator tier or above.
pcm_16000 - PCM format (S16LE) with 16kHz sample rate.
pcm_22050 - PCM format (S16LE) with 22.05kHz sample rate.
pcm_24000 - PCM format (S16LE) with 24kHz sample rate.
pcm_44100 - PCM format (S16LE) with 44.1kHz sample rate. Requires you to be subscribed to Pro tier or above.
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.
model_id : typing.Optional[str]
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.
Expand Down Expand Up @@ -308,9 +286,9 @@ async def convert(
async def main() -> None:
await client.speech_to_speech.convert(
voice_id="string",
enable_logging="0",
optimize_streaming_latency="mp3_22050_32",
output_format="string",
enable_logging=True,
optimize_streaming_latency="0",
output_format="mp3_22050_32",
)
Expand Down

0 comments on commit 16524b1

Please sign in to comment.