Thin client SDK for the Multilingual Voice Agent service
Project description
sst-voice-agent (client SDK)
Thin Python client for the Multilingual Voice Agent service. One dependency
(httpx), one object, methods that mirror the API.
Install
pip install ./sdk # from this repo
# or, once published to your internal index:
# pip install sst-voice-agent
Usage
from sst_voice_agent import VoiceAgent
agent = VoiceAgent(base_url="http://localhost:8000", api_key="sk-...")
# Text chat (RAG controlled per call)
print(agent.chat("What is your refund policy?").text)
print(agent.chat("Tell me a joke", use_knowledge_base=False).text)
# STT only
with open("question.wav", "rb") as f:
result = agent.stt(f.read())
print(result.text, result.detected_language)
# TTS only
audio = agent.tts("សួស្តី", language="km") # bytes (WAV)
open("reply.wav", "wb").write(audio)
# Full voice pipeline
with open("question.wav", "rb") as f:
out = agent.converse(f.read())
print(out.transcript, "->", out.text, f"({out.detected_language})")
if out.audio_bytes:
open("answer.wav", "wb").write(out.audio_bytes)
The client retries idempotent failures, raises VoiceAgentError on HTTP
errors, and can be used as a context manager (with VoiceAgent(...) as a:).
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 sst_voice_agent-0.1.0.tar.gz.
File metadata
- Download URL: sst_voice_agent-0.1.0.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74bfa664c0d95a203f996aa38da43121c72e3ae5a7a8bb3ed170358e3600c88e
|
|
| MD5 |
3ad9f8356042af112ce123313441832c
|
|
| BLAKE2b-256 |
4fd857a9e34704a84517d591e3f27d757d23a152bf8bdb99f5fec274d12ad87f
|
File details
Details for the file sst_voice_agent-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sst_voice_agent-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed46a31bbf09d17b9f21d4cc70b84d995d5a6d89b10a32184a9088e066dc96c1
|
|
| MD5 |
7c2372aed134b70b8086f6522e20ff75
|
|
| BLAKE2b-256 |
6d5166cfe78427c1f9ef516ca9f7f71140057c3636d7b2ef8e8b92a53bbc94cb
|