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.
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
# To handle non-wav file, additional dependencies are required
uvx --from 'gradium[cli]' gradium stt audio.mp3
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_...
Metadata
Release files for gradium 0.6.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gradium-0.6.4.tar.gz | 1.3 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gradium-0.6.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.4 MB
Release files / gradium-0.6.4.tar.gz
| Download URL | gradium-0.6.4.tar.gz |
|---|---|
| Size | 1.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b7230de41f6931c46a14cbb6ce3dba74902a29fda5fe09822b786a094158857c
|
|
BLAKE2b-256 checksum How to use checksums |
7aaffe31dc88950a0771f182167e4fb2d554b8e663d616223959416bd3a58d8a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.
Transparency logRelease files / gradium-0.6.4-py3-none-any.whl
| Download URL | gradium-0.6.4-py3-none-any.whl |
|---|---|
| Size | 29.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0800afc099f990c4f9609485add4700c880c04b6a1b84f9b001f1d1e5128d132
|
|
BLAKE2b-256 checksum How to use checksums |
f3f8d9f8043737636d9f3df7f6693b8b50e77a2b29f6cad245ec0bd8a14db5f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.
Transparency log