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(
  api_key=os.getenv('ARISTECH_STT_API_KEY', ''), # This is the default and can be omitted
)
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.

To run the examples while using the local version of the package, run the package with the PYTHONPATH environment variable set to the src directory:

PYTHONPATH=src python examples/streaming.py

API Key

If you didn't get an API key but a token, secret and host instead, you can simply convert those values with our API key generator.

Alternatively you can still provide the connection options manually.
from aristech_stt_client import SttClient

client = SttClient(host='stt.example.com:443', auth_token='your-token', auth_secret='your-secret')

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.1.0.tar.gz (17.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.1.0-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aristech_stt_client-2.1.0.tar.gz
  • Upload date:
  • Size: 17.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.1.0.tar.gz
Algorithm Hash digest
SHA256 34b8a88696a5b5f6e7c8efc5d86e5b63cb2d61d2cf8cbd738dc62f12f480fe33
MD5 137a934fea6160ce46ab23a5e44035c4
BLAKE2b-256 f924295b273f0928babe23e53a1a5545b96f9b3c9fd454ccb79464ffd1e32ff5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aristech_stt_client-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c95f0dfc89b369edffe4c82ce9188f9f347e516b66983b4d6074f67411997128
MD5 6849ad183a0a5e101d54bf2040c85de2
BLAKE2b-256 2d5a5d8fa3762cbb33f0442c0b41217dddc2d68eee921dcc14b51fe5ba08936e

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