Download data/src/elevenlabs/audio_effects/client.py from introvoyz045/elevenlabs-python: direct link, hf CLI and curl.
- Browser
- Download file 3.18 kB
-
https://huggingface.co/datasets/introvoyz045/elevenlabs-python/resolve/main/data/src/elevenlabs/audio_effects/client.py
- Command line
-
hf download hf://datasets/introvoyz045/elevenlabs-python/data/src/elevenlabs/audio_effects/client.py
-
curl -L -o client.py https://huggingface.co/datasets/introvoyz045/elevenlabs-python/resolve/main/data/src/elevenlabs/audio_effects/client.py
3.18 kB
| # This file was auto-generated by Fern from our API Definition. | |
| import typing | |
| from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper | |
| from ..core.request_options import RequestOptions | |
| from ..types.audio_effects_catalog_response_model import AudioEffectsCatalogResponseModel | |
| from .raw_client import AsyncRawAudioEffectsClient, RawAudioEffectsClient | |
| class AudioEffectsClient: | |
| def __init__(self, *, client_wrapper: SyncClientWrapper): | |
| self._raw_client = RawAudioEffectsClient(client_wrapper=client_wrapper) | |
| def with_raw_response(self) -> RawAudioEffectsClient: | |
| """ | |
| Retrieves a raw implementation of this client that returns raw responses. | |
| Returns | |
| ------- | |
| RawAudioEffectsClient | |
| """ | |
| return self._raw_client | |
| def get_catalog( | |
| self, *, request_options: typing.Optional[RequestOptions] = None | |
| ) -> AudioEffectsCatalogResponseModel: | |
| """ | |
| Lists the filter presets, reverb environments, and background noises that `audio_effects` can reference in Text to Speech, Text to Dialogue, and agent configurations. | |
| Parameters | |
| ---------- | |
| request_options : typing.Optional[RequestOptions] | |
| Request-specific configuration. | |
| Returns | |
| ------- | |
| AudioEffectsCatalogResponseModel | |
| Successful Response | |
| Examples | |
| -------- | |
| from elevenlabs import ElevenLabs | |
| client = ElevenLabs( | |
| api_key="YOUR_API_KEY", | |
| ) | |
| client.audio_effects.get_catalog() | |
| """ | |
| _response = self._raw_client.get_catalog(request_options=request_options) | |
| return _response.data | |
| class AsyncAudioEffectsClient: | |
| def __init__(self, *, client_wrapper: AsyncClientWrapper): | |
| self._raw_client = AsyncRawAudioEffectsClient(client_wrapper=client_wrapper) | |
| def with_raw_response(self) -> AsyncRawAudioEffectsClient: | |
| """ | |
| Retrieves a raw implementation of this client that returns raw responses. | |
| Returns | |
| ------- | |
| AsyncRawAudioEffectsClient | |
| """ | |
| return self._raw_client | |
| async def get_catalog( | |
| self, *, request_options: typing.Optional[RequestOptions] = None | |
| ) -> AudioEffectsCatalogResponseModel: | |
| """ | |
| Lists the filter presets, reverb environments, and background noises that `audio_effects` can reference in Text to Speech, Text to Dialogue, and agent configurations. | |
| Parameters | |
| ---------- | |
| request_options : typing.Optional[RequestOptions] | |
| Request-specific configuration. | |
| Returns | |
| ------- | |
| AudioEffectsCatalogResponseModel | |
| Successful Response | |
| Examples | |
| -------- | |
| import asyncio | |
| from elevenlabs import AsyncElevenLabs | |
| client = AsyncElevenLabs( | |
| api_key="YOUR_API_KEY", | |
| ) | |
| async def main() -> None: | |
| await client.audio_effects.get_catalog() | |
| asyncio.run(main()) | |
| """ | |
| _response = await self._raw_client.get_catalog(request_options=request_options) | |
| return _response.data | |