An unofficial Python library for integrating with ElevenLabs.io's API
Project description
elevenlabs
NOTE: The official elevenlabs library is now available! Check it out here at this link. The PyPi package elevenlabs will now point to their official library moving forward. Just in case you need this library still, I went ahead and
elevenlabs is an unofficial Python library that provides an easy-to-use interface for elevenlabs.io’ API. With this library, you can easily integrate with the API to generate voices.
Installation
To install elevenlabs, run:
pip install --upgrade elevenlabs
This library requires no special dependencies, and is written in pure Python.
Basic Usage
Here’s an example of how you can use elevenlabs to retrieve data from the API:
from elevenlabs import ElevenLabs eleven = ElevenLabs(api_key) # Get a Voice object, by name or UUID voice = eleven.voices["Arnold"] # Generate the TTS audio = voice.generate("Hey buddy! It's a beautiful day.") # Save the TTS to a file named 'my_first_tts' in the working directory audio.save("my_first_tts")
See example.py for more. For more advanced usage, refer to the (currently non-existent!) documentation and the API reference.
See the official ElevenLabs documentation for more information.
Real World Example
I’m currently using this library to produce fully-automated weather reports on my radio station, BMIX94. For a sample of how it sounds, here’s link to the latest weather report that will actually be broadcasting at various times throughout the day. That link is always pointing to the most recent weather report generated.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file benbaptist-elevenlabs-0.2.tar.gz
.
File metadata
- Download URL: benbaptist-elevenlabs-0.2.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f8373b04647c86a6c1f68d76b97f4e766e067857fa0e3a82d184adada2bac5e |
|
MD5 | 2ae12fa6550922f2dfbb1affefb871fc |
|
BLAKE2b-256 | 87c44a6156917f21fcc07f0dbb14db6e285bc9311e97aa76839a698494d95e8a |