Skip to main content

Python client for Gradium API

Project description

Gradium Python Client

Python client library for the Gradium Voice AI API.

Examples

See the examples/ directory for usage examples:

  • Text-to-Speech Streaming: examples/tts_streaming.py
  • Speech-to-Text Streaming: examples/stt_streaming.py

You can also try it out in Google Colab.

  • EU Server Open In Colab
  • US server Open In Colab

Command Line Interface

The package includes a CLI that can be run via uvx gradium:

# Text-to-speech
uvx gradium tts "Hello world" -o output.wav
uvx gradium tts "Hello world" --voice-id abc123 -o output.ogg

# Speech-to-text
uvx gradium stt audio.wav
uvx gradium stt audio.wav --json  # outputs JSON with timestamps

Run uvx gradium --help for all available options.

Text-to-Speech Streaming Example

You can find some examples in the examples/ directory. Try them out with uv. For the text-to-speech streaming example, run:

uv run --with sphn examples/tts_streaming.py \
    --text "Hello, this is a test of the Gradium TTS streaming API." \
    --api-key gsk_...

Speech-to-Text Streaming Example

You can also try the speech-to-text streaming example:

uv run --with sphn examples/stt_streaming.py \
    --audio test_file.mp3 \
    --api-key gsk_...

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

gradium-0.5.7.tar.gz (2.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gradium-0.5.7-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

Details for the file gradium-0.5.7.tar.gz.

File metadata

  • Download URL: gradium-0.5.7.tar.gz
  • Upload date:
  • Size: 2.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"EndeavourOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for gradium-0.5.7.tar.gz
Algorithm Hash digest
SHA256 0983cefcd205a9be31d14754b94cebb2c8036bf4da9bc238feb242ac2ffbd2ec
MD5 34014994710d52d42fb646ed6aa86f23
BLAKE2b-256 aa99a83305df88b0e3b71a47c6e2591eaa2611c6f13e679e23fa147efb8066bb

See more details on using hashes here.

File details

Details for the file gradium-0.5.7-py3-none-any.whl.

File metadata

  • Download URL: gradium-0.5.7-py3-none-any.whl
  • Upload date:
  • Size: 18.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"EndeavourOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for gradium-0.5.7-py3-none-any.whl
Algorithm Hash digest
SHA256 842b68745e60461f136de3440ea6dc61e590bd5eb2b302a97fd512cf90b92d13
MD5 4bb0d7e680bee3277c9f1f9d78ee57dd
BLAKE2b-256 c6b34979ab1c8b850392b21d223b3a38bf1aaf32a0486c4a3ec0f41ba31f0f56

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