Skip to main content

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:

  1. Create a .env file 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
  1. Run the examples, e.g.:
PYTHONPATH=src python examples/streaming.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

aristech_stt_client-2.0.0.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aristech_stt_client-2.0.0-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file aristech_stt_client-2.0.0.tar.gz.

File metadata

  • Download URL: aristech_stt_client-2.0.0.tar.gz
  • Upload date:
  • Size: 16.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for aristech_stt_client-2.0.0.tar.gz
Algorithm Hash digest
SHA256 6d817c1bf64879dfbf47d1ced90fba56dec48d95ac406e723ef72cc502c47580
MD5 cac3a8519d62f1db605cfa084a9d5fbb
BLAKE2b-256 d7e600d2b91b5409f3b0e2579e1a1f02f7770ada763763edb2162be05fc264ed

See more details on using hashes here.

File details

Details for the file aristech_stt_client-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for aristech_stt_client-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7969b9db14d1050d73a0bfafa5218a0f232ed02d759ae6031c8d70fe77b3aeb6
MD5 1c105b8b52eb0b03e1dd850cc2b8ca36
BLAKE2b-256 fecb82a69460ab8581d6cb708fa4cda3b4cc90ef84c9e4a8f64a2f62d6b87dcf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page