Skip to main content

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.

Metadata

Release files for vernacular-ai-speech 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vernacular-ai-speech 0.1.2
File Size Uploaded
vernacular-ai-speech-0.1.2.tar.gz 13.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vernacular-ai-speech 0.1.2
File Interpreter ABI Platform
vernacular_ai_speech-0.1.2-py3.7.egg Legacy Egg format - - Details

Total release size: 43.2 kB

Release files / vernacular-ai-speech-0.1.2.tar.gz

Download URL vernacular-ai-speech-0.1.2.tar.gz
Size 13.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d74ea7cfd4ae89214b3e517aec253d4c03137948d8d67e52fd409c1e89e32b24
BLAKE2b-256 checksum
How to use checksums
0cd21646c2d4a666b6032d0a0d2cc38e0639902ce584025bc5ef9545ed616bc1
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / vernacular_ai_speech-0.1.2-py3.7.egg

Download URL vernacular_ai_speech-0.1.2-py3.7.egg
Size 29.8 kB
Tags Egg
SHA-256 checksum
How to use checksums
645c68823f5653c8f41e51d273aa6a2d523ecbe784a6aab1f035947b38e14882
BLAKE2b-256 checksum
How to use checksums
ba46ca05ac1907ebf60877c98fa455953d6c2ebba95db8ba2619ee91a6c4b6d3
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

3 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page