Tring
Open-source voice agent stack. One agent contract, any runtime, honest costs.
Tring is the sound of an arriving call. It lets you define a voice agent once and run it on any of three architectures — a cascaded pipeline (STT → LLM → TTS), a speech-to-speech model, or a hybrid of the two — without rewriting anything. It ships with a fully local, $0-per-minute pipeline as a first-class citizen, and it tells you exactly what every call costs.
Built from lessons learned running voice agents across hundreds of thousands of production telephony calls, in multiple languages, where callers code-switch mid-sentence and two seconds of silence means a hangup.
Why Tring
- One contract, three runtimes.
AgentSpecis plain YAML. Switching a customer from a cascade to speech-to-speech is a config change: same tools, same analytics, same cost attribution. - Local-first. faster-whisper for STT, Ollama for the LLM, Kokoro for TTS. Production-tuned turn-taking and interruption handling with zero cloud dependencies. Cloud providers are opt-in upgrades.
- Latency as correctness. In voice, dead air is a conversational error.
Tring's primitives make it structurally impossible rather than patching it:
- Tool-call choreography — the model cannot emit a tool call without
declaring what to say while it runs (
waiting_message,spoken_mode,post_tool_responseare schema-required fields). - Speak-while-thinking — a character-level streaming parser flushes the
speakfield to TTS while the tool call is still being generated. - Interruption reconciliation — TTS generates faster than audio plays; on a barge-in, Tring annotates context so the model never references words the caller never actually heard.
- Cache-safe language lock — the language directive is re-asserted every turn without breaking prompt-cache byte-stability.
- Tool-call choreography — the model cannot emit a tool call without
declaring what to say while it runs (
- Honest cost accounting. Every metered unit carries an
estimatedflag. Per-call, per-connected-minute, per-conversation, and per-outcome roll-ups, so you optimize the denominator instead of the rate. - Per-language provider routing. Real callers code-switch. The best STT engine for one language is often the wrong one for another; Tring routes STT/TTS/LLM per agent and per detected language.
Quickstart
pip install tring[local]
# agent.yaml
name: front-desk
persona: |
You are a friendly front-desk assistant for a dental clinic.
language:
primary: en
runtime:
mode: cascade
routing:
default: { stt: faster_whisper, llm: ollama, tts: kokoro }
from tring import AgentSpec, CallSession
from tring.runtimes.cascade import CascadeRuntime
agent = AgentSpec.from_yaml("agent.yaml")
session = CallSession(agent)
runtime = CascadeRuntime(session)
See examples/ for the full local quickstart, the console
dev loop, and cost reporting.
Status
Early alpha. The core contracts, primitives, cost meter, and local cascade runtime are usable; speech-to-speech and hybrid adapters, telephony ingress (SIP), and the hosted dashboard are on the roadmap.
Architecture
See docs/ARCHITECTURE.md.
License
MIT © Anzal Hussain Abidi
Release files for tring 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tring-0.1.0.tar.gz | 90.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tring-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 163.2 kB
Release files / tring-0.1.0.tar.gz
| Download URL | tring-0.1.0.tar.gz |
|---|---|
| Size | 90.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1f27b127953bb1a75f576680e0aea6f6ec7cb70c842d5f18e1d8c3c9fa71f557
|
|
BLAKE2b-256 checksum How to use checksums |
66e18d27669a1d10876a4b3998bc76d70475d0dbd869c9ba945ea3a44134a28e
|
| 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 18, 2026.
Transparency logRelease files / tring-0.1.0-py3-none-any.whl
| Download URL | tring-0.1.0-py3-none-any.whl |
|---|---|
| Size | 72.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3a2565db1212ad626ce1608d675e9dbef8cc446e52479fbb8a9c6c0418d0be39
|
|
BLAKE2b-256 checksum How to use checksums |
cbd35b95e565b6c59be19c0063f5e67c0e9a3202054c8046b2cd5bcc82ea6185
|
| 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 18, 2026.
Transparency log