A Python client library for the Aristech Text-to-Speech API
Project description
Aristech TTS-Client for Python
This is the Python client implementation for the Aristech TTS-Server.
Installation
pip install aristech-tts-client
Usage
from aristech_tts_client import TtsClient, SpeechRequest, SpeechRequestOption
client = TtsClient(host='tts.example.com')
data = client.synthesize(SpeechRequest(
text='Hello, world!',
options=SpeechRequestOption(
voice_id='some-voice-id'
)
))
with open('output.wav', 'wb') as f:
f.write(data)
There are several examples in the examples directory:
- file.py: Pretty much the same as the example above.
- streaming.py: Demonstrates how to stream audio to a sox process which plays the audio as it is being streamed.
- voices.py: Demonstrates how to get the available voices from the server.
- phoneset.py: Demonstrates how to get the phoneset for a voice.
- transcribe.py: Demonstrates how to get how a voice would pronounce a given word.
You can run the examples directly using python like this:
- Create a
.envfile in the python directory:
HOST=tts.example.com
# The credentials are optional but probably required for most servers:
TOKEN=your-token
SECRET=your-secret
# The following are optional:
# ROOT_CERT=your-root-cert.pem # If the server uses a self-signed certificate
# VOICE_ID=some-available-voice-id
- Run the examples, e.g.:
python examples/streaming.py
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
aristech_tts_client-2.0.0.tar.gz
(14.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aristech_tts_client-2.0.0.tar.gz.
File metadata
- Download URL: aristech_tts_client-2.0.0.tar.gz
- Upload date:
- Size: 14.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a30461b2512f15ccede1209c7b03c0da687e9e13019be96c8f032325ca6bde7
|
|
| MD5 |
f33b8f5646219056070239192cefa0dd
|
|
| BLAKE2b-256 |
373b8854edfdbb8cfa027e9e53cd12cb4bea61629c687f860affd763cf530ec6
|
File details
Details for the file aristech_tts_client-2.0.0-py3-none-any.whl.
File metadata
- Download URL: aristech_tts_client-2.0.0-py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e6747cbb28a137e245e651fda95d58b71648a665f19cc239863900c1b32d233
|
|
| MD5 |
6403376adec45026071953dce4469cd2
|
|
| BLAKE2b-256 |
2fb07d3a8e1971b5fbc886dfa5f8709e6568259e79924d2f1c346e9a96713735
|