A Python client library for the Aristech Speech-to-Text API
Project description
Aristech STT-Client for Python
This is the Python client implementation for the Aristech STT-Server.
Installation
pip install aristech-stt-client
Usage
from aristech_stt_client import SttClient, RecognitionConfig, RecognitionSpec
client = SttClient(host='stt.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:
- recognize.py: Demonstrates how to perform recognition on a file.
- streaming.py: Demonstrates how to stream audio to the server while receiving interim results.
- models.py: Demonstrates how to get the available models from the server.
- nlpFunctions.py: Demonstrates how to list the configured NLP-Servers and the coresponding functions.
- nlpProcess.py: Demonstrates how to perform NLP processing on a text by using the STT-Server as a proxy.
- account.py: Demonstrates how to retrieve the account information from the server.
You can run the examples directly using python like this:
- Create a
.envfile in the python directory:
HOST=stt.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
# MODEL=some-available-model
# NLP_SERVER=some-config
# NLP_PIPELINE=function1,function2
- 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_stt_client-1.2.0.tar.gz
(16.9 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_stt_client-1.2.0.tar.gz.
File metadata
- Download URL: aristech_stt_client-1.2.0.tar.gz
- Upload date:
- Size: 16.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dfb3f1d0ac15af72a2e007f642c72f018fbf4024ba6ea81a1257a37038a7debb
|
|
| MD5 |
89089ef113a223deb9b42d4eb7a13c13
|
|
| BLAKE2b-256 |
a269b8affa28e1398343b2c867fbde8816782618aebfe01b3af2f3c79d8625e5
|
File details
Details for the file aristech_stt_client-1.2.0-py3-none-any.whl.
File metadata
- Download URL: aristech_stt_client-1.2.0-py3-none-any.whl
- Upload date:
- Size: 17.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f4d307068a21c3c997b067fc5631ffccec5aac6414aa13ddda6f2712b1bdc05
|
|
| MD5 |
740687490980edb7c56b44eceda861a4
|
|
| BLAKE2b-256 |
77cd35e6204bb12dba04f0c000adc70620a23c407dae29a3223998d4c267aecc
|