Speechall API Python SDK
Project description
speechall
The Speechall REST API provides powerful and flexible speech-to-text capabilities. It allows you to transcribe audio files using various underlying STT providers and models, optionally apply custom text replacement rules, and access results in multiple formats. The API includes standard endpoints for transcription and endpoints compatible with the OpenAI API structure.
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 0.1.0
- Package version: 0.1.0
- Generator version: 7.13.0
- Build package: org.openapitools.codegen.languages.PythonPydanticV1ClientCodegen For more information, please visit https://speechall.com/contact
Requirements.
Python 3.7+
Installation & Usage
pip install
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)
Then import the package:
import speechall
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install to install the package for all users)
Then import the package:
import speechall
Tests
Execute pytest to run the tests.
Getting Started
Please follow the installation procedure and then run the following:
import time
import speechall
from speechall.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.speechall.com/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = speechall.Configuration(
host = "https://api.speechall.com/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (API Key): bearerAuth
configuration = speechall.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with speechall.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = speechall.ReplacementRulesApi(api_client)
create_replacement_ruleset_request = {"name":"Acme Corp Corrections","rules":[{"kind":"exact","search":"speechal","replacement":"Speechall","caseSensitive":false},{"kind":"regex","pattern":"\\b(\\d{3})-(\\d{2})-(\\d{4})\\b","replacement":"[REDACTED SSN]","flags":["i"]}]} # CreateReplacementRulesetRequest | JSON object containing the name for the ruleset and an array of replacement rule objects.
try:
# Create a reusable set of text replacement rules.
api_response = api_instance.create_replacement_ruleset(create_replacement_ruleset_request)
print("The response of ReplacementRulesApi->create_replacement_ruleset:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling ReplacementRulesApi->create_replacement_ruleset: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to https://api.speechall.com/v1
| Class | Method | HTTP request | Description |
|---|---|---|---|
| ReplacementRulesApi | create_replacement_ruleset | POST /replacement-rulesets | Create a reusable set of text replacement rules. |
| SpeechToTextApi | list_speech_to_text_models | GET /speech-to-text-models | Retrieve a list of all available speech-to-text models. |
| SpeechToTextApi | transcribe | POST /transcribe | Upload an audio file directly and receive a transcription. |
| SpeechToTextApi | transcribe_remote | POST /transcribe-remote | Transcribe an audio file located at a remote URL. |
Documentation For Models
- BaseTranscriptionConfiguration
- CreateReplacementRuleset201Response
- CreateReplacementRulesetRequest
- ErrorResponse
- ExactRule
- OpenAICreateTranslationRequestModel
- OpenaiCompatibleCreateTranscription200Response
- OpenaiCompatibleCreateTranslation200Response
- RegexGroupRule
- RegexRule
- RemoteTranscriptionConfiguration
- ReplacementRule
- SpeechToTextModel
- TranscriptLanguageCode
- TranscriptOutputFormat
- TranscriptionDetailed
- TranscriptionModelIdentifier
- TranscriptionOnlyText
- TranscriptionProvider
- TranscriptionResponse
- TranscriptionSegment
- TranscriptionWord
Documentation For Authorization
Authentication schemes defined for the API:
bearerAuth
- Type: Bearer authentication (API Key)
Author
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
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 speechall-0.1.0.tar.gz.
File metadata
- Download URL: speechall-0.1.0.tar.gz
- Upload date:
- Size: 90.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3054ccd361b27dab4da5918e55b2511f7ca9dbf7766586900bffb2d9ca48b3bd
|
|
| MD5 |
60b434f6bf26a5fe04127c50e4c9ab6d
|
|
| BLAKE2b-256 |
de757315114abaa7b07ea4083a0b6e1106f48de28927d3ce0f6a33c0c7b9b740
|
File details
Details for the file speechall-0.1.0-py3-none-any.whl.
File metadata
- Download URL: speechall-0.1.0-py3-none-any.whl
- Upload date:
- Size: 68.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b59aabb5938e18fea2b647595c5f1755f9bbbec7e4227b4946a4ec57a9ad4a9
|
|
| MD5 |
065903f24a92c27fe7efb255d3985620
|
|
| BLAKE2b-256 |
50776aeead03e76ea91bb159a07b92b9ae72ee78ca048a3b6ea42054e69605b5
|