Python SDK to interact with the charactr API.
Project description
charactr-api-sdk-python
Python SDK to interact with the charactr API.
Terminology
VC - Voice conversion - converting one voice from audio input to another voice.
TTS - Text to speech - converting text to voice audio.
Features
- making TTS requests
- making VC requests
- getting lists of available voices
Installation
pip install charactr-api-sdk
Usage
For the detailed SDK usage, please refer to the SDK Reference or the ./examples
directory.
Quickstart
from charactr_api import CharactrAPISDK, Credentials
sdk = CharactrAPISDK(Credentials(client_key="xxx", api_key="yyy"))
tts_voices = sdk.tts.get_voices()
tts_result = sdk.tts.convert(tts_voices[0]["id"], "Hello world")
How to run examples
Clone & install the SDK locally
git clone https://github.com/charactr-platform/charactr-api-sdk-python
cd charactr-api-sdk-python
pip install .
Provide credentials
Open ./examples/credentials.py
and provide your credentials. You can find them in your Client Panel account.
Use TTS
python examples/tts.py
Use TTS Simplex Streaming
python examples/tts_stream_simplex.py
Use TTS Duplex Streaming
python examples/tts_stream_duplex.py
Use VC
python examples/vc.py
Use Voice Clones
python examples/clones.py
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
charactr_api_sdk-2.1.0.tar.gz
(12.3 kB
view details)
File details
Details for the file charactr_api_sdk-2.1.0.tar.gz
.
File metadata
- Download URL: charactr_api_sdk-2.1.0.tar.gz
- Upload date:
- Size: 12.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e90c0a946e9da07e863b07669c47931b98183c597eb12c392a6232bcf72394c |
|
MD5 | c640dbc97ff4dfedf5bb395043dc233c |
|
BLAKE2b-256 | 960007e1b4386168e626d4e618d8982d3fc914c95953c6d74feb0daaa98bef5c |