Skip to main content

Voicegain Speech-to-Text Python SDK

Python SDK for the Voicegain Speech-to-Text API.

This API allows for large vocabulary speech-to-text transcription as well as grammar-based speech recognition. Both real-time and offline use cases are supported.

You can see the core Voicegain API documentation here.

The complete documentation for the API covered by this SDK is available here - this link requires an account on the Voicegain portal - see below for how to sign up.

Requirements

In order to use this API you need account with Voicegain. You can create an account by signing up on Voicegain Portal. No credit card required to sign up.

You can see pricing here - basically, it is 1 cent a minute for off-line and 1.25 cents a minute for real-time. There is a Free Tier of 600 minutes that renews each month.

Installation

From PyPI directly:

pip install voicegain_speech

Examples

  • sync_transcribe example:

configuration:

from voicegain_speech import ApiClient
from voicegain_speech import Configuration
from voicegain_speech import TranscribeApi
import base64


# configure your JWT token
JWT = "Your <JWT>"

configuration = Configuration()
configuration.access_token = JWT

api_client = ApiClient(configuration=configuration)

transcribe local file:

transcribe_api = TranscribeApi(api_client)
file_path = "Your local file path"

with open(file_path, "rb") as f:
    audio_base64 = base64.b64encode(f.read()).decode()

response = transcribe_api.asr_transcribe_post(
    sync_transcription_request={
        "audio": {
            "source": {
                "inline": {
                    "data": audio_base64
                }
            }
        }
    }
)

alternatives = response.result.alternatives
if alternatives:
    local_result = alternatives[0].utterance
    print("result from file: ", local_result)

else:
    local_result = None
    print("no transcription")

More examples can be found in examples folder on our GitHub


Learn more about the Voicegain Voice AI Platform at www.voicegain.ai

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

voicegain_speech-1.139.0.tar.gz (8.7 MB view details)

Uploaded Source

File details

Details for the file voicegain_speech-1.139.0.tar.gz.

File metadata

  • Download URL: voicegain_speech-1.139.0.tar.gz
  • Upload date:
  • Size: 8.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for voicegain_speech-1.139.0.tar.gz
Algorithm Hash digest
SHA256 e39253da47b455930e9ad57e11f36e62077eea2a8566ddc72344c51fccb8a331
MD5 3290a99776b1bd8869874c52e39dde3d
BLAKE2b-256 944fc8173949eda09abff1d1a8670b1d6153cdc9085334057c241f248871069d

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.139.0 This release

1 file

1.138.0

1 file

1.137.0

1 file

1.136.0

1 file

1.135.0

1 file

1.134.0

1 file

1.133.0

1 file

1.132.0

1 file

1.131.0

1 file

1.130.0

1 file

1.129.0

1 file

1.128.0

1 file

1.127.0

1 file

1.126.0

1 file

1.125.0

1 file

1.124.0

1 file

1.123.0

1 file

1.122.0

1 file

1.121.0

1 file

1.120.0

1 file

1.119.0

1 file

1.118.0

1 file

1.117.0

1 file

1.116.0

1 file

1.115.0

1 file

1.114.0

1 file

1.113.0

1 file

1.111.0

1 file

1.110.0

1 file

1.109.1

1 file

1.109.0

1 file

1.108.0

1 file

1.107.0

1 file

1.106.0

1 file

1.105.0

1 file

1.104.0

1 file

1.101.0

1 file

1.100.1

1 file

1.100.0

1 file

1.99.1

1 file

1.99.0

1 file

1.98.0

1 file

1.97.3

1 file

1.97.2

1 file

1.97.1

1 file

1.97.0

1 file

1.96.0

1 file

1.95.1

1 file

1.95.0

1 file

1.94.1

1 file

1.94.0

1 file

1.93.1

1 file

1.93.0

1 file

1.92.0

1 file

1.91.1

1 file

1.91.0

1 file

1.86.2

1 file

1.86.1

1 file

1.86.0

1 file

1.85.2

1 file

1.85.1

1 file

1.85.0

1 file

1.84.3

1 file

1.84.2

1 file

1.84.1

1 file

1.84.0

1 file

1.83.0

1 file

1.82.0

1 file

1.81.0

1 file

1.80.2

1 file

1.80.1

1 file

1.80.0

1 file

1.79.0

1 file

1.78.1

1 file

1.78.0

1 file

1.77.1

1 file

1.77.0

1 file

1.76.0

1 file

1.75.2

1 file

1.75.1

1 file

1.75.0

1 file

1.74.1

1 file

1.74.0

1 file

1.73.1

1 file

1.73.0

1 file

1.72.0

1 file

1.71.1

1 file

1.71.0

1 file

1.70.2

1 file

1.70.1

1 file

1.70.0

1 file

1.69.0

1 file

1.68.1

1 file

1.68.0

1 file

1.67.0

1 file

1.66.1

1 file

1.66.0

1 file

1.65.0

1 file

1.64.1

1 file

1.64.0

1 file

1.63.0

1 file

1.62.1

1 file

1.62.0

1 file

1.61.0

1 file

1.60.4

1 file

1.60.3

1 file

1.60.2

1 file

1.60.1

1 file

1.60.0

1 file

1.59.2

1 file

1.59.1

1 file

1.59.0

1 file

1.58.1

1 file

1.58.0

1 file

1.57.0

1 file

1.56.0

1 file

1.55.1

1 file

1.55.0

1 file

1.54.1

1 file

1.54.0

1 file

1.53.3

1 file

1.53.2

1 file

1.53.1

1 file

1.53.0

1 file

1.52.0

1 file

1.51.0

1 file

1.50.1

1 file

1.50.0

1 file

1.49.3

1 file

1.49.2

1 file

1.49.1

1 file

1.49.0

1 file

1.48.4

1 file

1.48.3

1 file

1.48.2

1 file

1.48.1

1 file

1.48.0

1 file

1.47.1

1 file

1.47.0

1 file

1.46.1

1 file

1.46.0

1 file

1.45.3

1 file

1.45.2

1 file

1.45.1

1 file

1.45.0

1 file

1.44.1

1 file

1.44.0

1 file

1.43.6

1 file

1.43.5

1 file

1.43.4

1 file

1.43.3

1 file

1.43.2

1 file

1.43.1

1 file

1.43.0

1 file

1.42.1

1 file

1.42.0

1 file

1.41.0

1 file

1.40.2

1 file

1.40.1

1 file

1.40.0

1 file

1.39.0

1 file

1.38.0

1 file

1.37.1

1 file

1.37.0

1 file

1.36.3

1 file

1.36.2

1 file

1.36.1

1 file

1.35.0

1 file

1.34.0

1 file

1.24.0

1 file

1.17.0

1 file

1.13.1

1 file

1.12.1

1 file

1.12.0

1 file

0.0.1

1 file

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