Official NovaxVoice Text-to-Speech V2 SDK for Python (sync + async).
Project description
novaxvoice (Python)
Official NovaxVoice Text-to-Speech V2 SDK for Python. Sync and async clients, streaming, and save-to-file. Built on httpx.
Synthesizes Krio text and returns a WAV blob (16-bit mono PCM, 24 kHz).
Install
pip install novaxvoice
Requires Python 3.9+.
Quick start
from novaxvoice import NovaxVoiceClient
client = NovaxVoiceClient() # no API key required
wav = client.synthesize("Kushɛ, aw di bodi?") # -> bytes (WAV)
with open("hello.wav", "wb") as f:
f.write(wav)
Synchronous client
from novaxvoice import NovaxVoiceClient
with NovaxVoiceClient() as client:
# One-shot
wav = client.synthesize("Tɛnki ya.")
# Streaming download
for chunk in client.synthesize_stream("A de go na os."):
...
# Straight to disk
client.synthesize_to_file("out.wav", "A sev am na fail.")
Asynchronous client
import asyncio
from novaxvoice import AsyncNovaxVoiceClient
async def main():
async with AsyncNovaxVoiceClient() as client:
wav = await client.synthesize("Kushɛ from async.")
async for chunk in client.synthesize_stream("streaming"):
...
asyncio.run(main())
Forward-compatible parameters
The backend currently reads only text. Pass new fields as the backend gains support
(e.g. a voice or speed) via extra_body — no SDK upgrade needed:
client.synthesize("...", extra_body={"speed": 1.2})
Configuration
| Argument | Default | Description |
|---|---|---|
endpoint |
https://joshuamcoker--krio-tts-kriotts-generate.modal.run |
Full TTS endpoint URL (POSTed to directly). |
api_key |
NOVAXVOICE_API_KEY env var |
Optional; sent as Bearer if set. |
timeout |
120.0 |
Per-request timeout, seconds (cold ~20s). |
headers |
None |
Extra headers on every request. |
http_client |
None |
Bring your own httpx.Client. |
Error handling
All errors subclass NovaxVoiceError:
NovaxVoiceAPIError— non-2xx (has.status,.code,.body). A missingtextreturns HTTP 400 with the plain-text messagemissing 'text'.NovaxVoiceAuthError— 401/403NovaxVoiceRateLimitError— 429 (has.retry_after)NovaxVoiceTimeoutError/NovaxVoiceConnectionError— network failures
Development
pip install -e ".[dev]"
pytest # httpx mocked, no network
mypy src
License
MIT
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file novaxvoice-0.1.0.tar.gz.
File metadata
- Download URL: novaxvoice-0.1.0.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6c167b0a01d06da55a3d9a7c5fa16cb2eee99a8e5be3ab6023db225164fa9f9
|
|
| MD5 |
ee1fc3de6a54f3afd65b05b97d336ba7
|
|
| BLAKE2b-256 |
062b0c07ab42e07c4748a615577cb34dd9389d2396aaee3ce040e8f6d77c2075
|
File details
Details for the file novaxvoice-0.1.0-py3-none-any.whl.
File metadata
- Download URL: novaxvoice-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c554516167d951f77afa03d4409a4b729605b4b322e692fd49b91b5a2d72f44
|
|
| MD5 |
14d89b8a31c8da0a43848dc97d585bf0
|
|
| BLAKE2b-256 |
4844a5d7563c1920cea025d9991410ed6863071323ef992450bafbf235ec88e0
|