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
client = TtsClient(host='tts.example.com')
results = client.recognize_file("path/to/audio/file.wav", RecognitionConfig(specification=RecognitionSpec(model="some-model")))
print('\n'.join([r.chunks[0].alternatives[0].text for r in results]))
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-1.0.0.tar.gz
(13.7 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-1.0.0.tar.gz.
File metadata
- Download URL: aristech_tts_client-1.0.0.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
445e1baa61f05269b6613058a1f658aea450cd81300c7316d43a54f8458533e7
|
|
| MD5 |
5ac8a45241ce7bbdb2ff8535a804ef68
|
|
| BLAKE2b-256 |
a4926d17b97c759b6ecdad263da53b1e017cb24c857756c99600fb98e1d4b112
|
File details
Details for the file aristech_tts_client-1.0.0-py3-none-any.whl.
File metadata
- Download URL: aristech_tts_client-1.0.0-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
110682323434df10d0b671ca93ddc7441d9b841ea49b2eaee29930656cfaa400
|
|
| MD5 |
ecfee4d0b279f9f888fb992c6052ea78
|
|
| BLAKE2b-256 |
bd811887bf9589842501d01bd1aaf9114619b913efa6656fea004808603004e9
|