Vernacular Speech API python client
Project description
Python Speech to Text SDK
Python SDK for vernacular.ai speech to text APIs. Go here for detailed product documentation.
Installation
To install this sdk run:
pip install vernacular-ai-speech
Supported Python Versions
Python >= 3.5
Example Usage
from vernacular.ai import speech
from vernacular.ai.speech import enums, types
def sample_recognize(access_token, file_path):
"""
Args:
access_token Token provided by vernacular.ai for authentication
file_path Path to audio file e.g /path/audio_file.wav
"""
speech_client = speech.SpeechClient(access_token)
audio = types.RecognitionAudio(
content = open(file_path, "rb").read()
)
config = types.RecognitionConfig(
encoding=enums.RecognitionConfig.AudioEncoding.LINEAR16,
sample_rate_hertz=8000,
language_code = "hi-IN",
)
response = speech_client.recognize(audio=audio, config=config)
for result in response.results:
alternative = result.alternatives[0]
print("Transcript: {}".format(alternative.transcript))
To see more examples, go to samples.
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
File details
Details for the file vernacular-ai-speech-0.1.2.tar.gz
.
File metadata
- Download URL: vernacular-ai-speech-0.1.2.tar.gz
- Upload date:
- Size: 13.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d74ea7cfd4ae89214b3e517aec253d4c03137948d8d67e52fd409c1e89e32b24 |
|
MD5 | a50414bb86393452b004fd9f746eefcb |
|
BLAKE2b-256 | 0cd21646c2d4a666b6032d0a0d2cc38e0639902ce584025bc5ef9545ed616bc1 |
File details
Details for the file vernacular_ai_speech-0.1.2-py3.7.egg
.
File metadata
- Download URL: vernacular_ai_speech-0.1.2-py3.7.egg
- Upload date:
- Size: 29.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 645c68823f5653c8f41e51d273aa6a2d523ecbe784a6aab1f035947b38e14882 |
|
MD5 | 89091954dc408716eaabd2f795affd2d |
|
BLAKE2b-256 | ba46ca05ac1907ebf60877c98fa455953d6c2ebba95db8ba2619ee91a6c4b6d3 |